Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[Solved] Couldn't run query ... "WHERE SiteTree_ImageTracking"."SiteTreeID" = ...


Reply


3 Posts   828 Views

Avatar
Graphicator

Community Member, 62 Posts

16 February 2012 at 6:55pm

I only have one entry in my SiteTree_ImageTracking table. I believe that is the problem that is not allowing me to create any new pages, or save current pages in the admin of my site tree..

Here is the full error log I receive in my inbox...

user_error(Couldn't run query: SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName", "SiteTree_ImageTracking"."FieldName" FROM "File" INNER JOIN "SiteTree_ImageTracking" ON "SiteTree_ImageTracking"."FileID" = "File"."ID" WHERE ("SiteTree_ImageTracking"."SiteTreeID" = 30) GROUP BY "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END, "SiteTree_ImageTracking"."FieldName" ORDER BY SortOrder ASC Unknown column 'File.ShowInSearch' in 'field list',256) line 525 of MySQLDatabase.php MySQLDatabase->databaseError(Couldn't run query: SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName", "SiteTree_ImageTracking"."FieldName" FROM "File" INNER JOIN "SiteTree_ImageTracking" ON "SiteTree_ImageTracking"."FileID" = "File"."ID" WHERE ("SiteTree_ImageTracking"."SiteTreeID" = 30) GROUP BY "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END, "SiteTree_ImageTracking"."FieldName" ORDER BY SortOrder ASC | Unknown column 'File.ShowInSearch' in 'field list',256) line 123 of MySQLDatabase.php MySQLDatabase->query(SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName", "SiteTree_ImageTracking"."FieldName" FROM "File" INNER JOIN "SiteTree_ImageTracking" ON "SiteTree_ImageTracking"."FileID" = "File"."ID" WHERE ("SiteTree_ImageTracking"."SiteTreeID" = 30) GROUP BY "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END, "SiteTree_ImageTracking"."FieldName" ORDER BY SortOrder ASC,256) line 129 of DB.php DB::query(SELECT "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END AS "RecordClassName", "SiteTree_ImageTracking"."FieldName" FROM "File" INNER JOIN "SiteTree_ImageTracking" ON "SiteTree_ImageTracking"."FileID" = "File"."ID" WHERE ("SiteTree_ImageTracking"."SiteTreeID" = 30) GROUP BY "File"."ClassName", "File"."Created", "File"."LastEdited", "File"."Name", "File"."Title", "File"."Filename", "File"."Content", "File"."Sort", "File"."ShowInSearch", "File"."SortOrder", "File"."ParentID", "File"."OwnerID", "File"."ID", CASE WHEN "File"."ClassName" IS NOT NULL THEN "File"."ClassName" ELSE 'File' END, "SiteTree_ImageTracking"."FieldName" ORDER BY SortOrder ASC,256) line 404 of SQLQuery.php SQLQuery->execute() line 1384 of DataObject.php DataObject->getManyManyComponents(ImageTracking) call_user_func_array(Array,Array) line 711 of Object.php Object->__call(ImageTracking,Array) line 152 of HtmlEditorField.php AdPage->ImageTracking() line 152 of HtmlEditorField.php HtmlEditorField->saveInto(AdPage) line 1415 of SiteTree.php SiteTree->syncLinkTracking() line 1376 of SiteTree.php SiteTree->onBeforeWrite() line 936 of DataObject.php DataObject->write() line 1109 of DataObject.php DataObject->writeWithoutVersion() line 678 of LeftAndMain.php LeftAndMain->save(Array,Form,SS_HTTPRequest) line 329 of Form.php Form->httpSubmission(SS_HTTPRequest) line 143 of RequestHandler.php RequestHandler->handleRequest(SS_HTTPRequest) line 161 of RequestHandler.php RequestHandler->handleRequest(SS_HTTPRequest) line 147 of Controller.php Controller->handleRequest(SS_HTTPRequest) line 282 of Director.php Director::handleRequest(SS_HTTPRequest,Session) line 125 of Director.php Director::direct(/admin/EditForm) line 127 of main.php

Avatar
Graphicator

Community Member, 62 Posts

16 February 2012 at 7:38pm

All the top level pages are saving. Child pages that are type "page" are not saving correctly. It leaves me hanging with the "saving" notice.

Avatar
Graphicator

Community Member, 62 Posts

16 February 2012 at 8:04pm

Figured out that this was due to an underdeveloped module. I removed everyone and found the culprit.