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

Page versions issue


Reply


315 Views

Avatar
Tony Air

Community Member, 13 Posts

2 February 2013 at 3:17pm

Hi I have an issue with page versions when SiteConfig extenders are used.

Here's my extension:
class SiteConfigMod extends DataExtension {
public static $many_many = array(
      'TopMenu' => 'SiteTree',
   );
}

Here's an error:
URL: http://localhost/page-2/?archiveDate=2013-01-29+15%3A02%3A14

Couldn't run query: SELECT DISTINCT "SiteTree_versions"."ClassName", "SiteTree_versions"."Created", "SiteTree_versions"."LastEdited", "SiteTree_versions"."URLSegment", "SiteTree_versions"."Title", "SiteTree_versions"."MenuTitle", "SiteTree_versions"."Content", "SiteTree_versions"."MetaDescription", "SiteTree_versions"."ExtraMeta", "SiteTree_versions"."ShowInMenus", "SiteTree_versions"."ShowInSearch", "SiteTree_versions"."Sort", "SiteTree_versions"."HasBrokenFile", "SiteTree_versions"."HasBrokenLink", "SiteTree_versions"."ReportClass", "SiteTree_versions"."CanViewType", "SiteTree_versions"."CanEditType", "SiteTree_versions"."Priority", "SiteTree_versions"."MetaTitle", "SiteTree_versions"."CustomCSS", "SiteTree_versions"."CSSVersion", "SiteTree_versions"."Version", "SiteTree_versions"."ParentID", "SiteTree_versions"."RecordID" AS "ID", CASE WHEN "SiteTree_versions"."ClassName" IS NOT NULL THEN "SiteTree_versions"."ClassName" ELSE 'SiteTree' END AS "RecordClassName", "SiteTree_versions"."RecordID", "SiteTree_versions"."WasPublished", "SiteTree_versions"."AuthorID", "SiteTree_versions"."PublisherID" FROM "SiteTree_versions" INNER JOIN "SiteConfig_TopMenu_versions" ON "SiteConfig_TopMenu_versions"."SiteTreeID" = "SiteTree_versions"."RecordID" WHERE ("SiteConfig_TopMenu_versions"."SiteConfigID" = '1') AND ("SiteConfig_TopMenu_versions"."Version" = "SiteTree_versions"."Version") AND ("SiteTree_versions"."Version" IN SELECT LatestVersion FROM SELECT "SiteTree_versions"."RecordID", MAX("SiteTree_versions"."Version") AS LatestVersion FROM "SiteTree_versions" WHERE "SiteTree_versions"."LastEdited" <= '2013-01-29 15:02:14' GROUP BY "SiteTree_versions"."RecordID" ) AS "SiteTree_versions_latest" WHERE "SiteTree_versions_latest"."RecordID" = "SiteTree_versions"."RecordID" )) ORDER BY "SiteTree_versions"."Sort" ASC Table 'silverstripe.SiteConfig_TopMenu_versions' doesn't exist