silverstripe / silverstripe-widgets

Widgets subsystem for Silverstripe CMS
http://silverstripe.org
BSD 3-Clause "New" or "Revised" License
38 stars 55 forks source link

Archive Widget gives User Error #124

Closed DoggersHusky closed 8 years ago

DoggersHusky commented 8 years ago

using latest version of wamp clean install of silverstripe clean install of blog module (dev-master build) clean install of widgets module (dev-master build)

[User Error] Uncaught SS_DatabaseException: Couldn't run query: SELECT DISTINCT "PublishDate" IS NULL AS "_SortColumn0", "SiteTree"."ClassName", "SiteTree"."LastEdited", "SiteTree"."Created", "SiteTree"."URLSegment", "SiteTree"."Title", "SiteTree"."MenuTitle", "SiteTree"."Content", "SiteTree"."MetaDescription", "SiteTree"."ExtraMeta", "SiteTree"."ShowInMenus", "SiteTree"."ShowInSearch", "SiteTree"."Sort", "SiteTree"."HasBrokenFile", "SiteTree"."HasBrokenLink", "SiteTree"."ReportClass", "SiteTree"."CanViewType", "SiteTree"."CanEditType", "SiteTree"."Version", "SiteTree"."ParentID", "BlogPost"."PublishDate", "BlogPost"."AuthorNames", "BlogPost"."Summary", "BlogPost"."FeaturedImageID", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree" LEFT JOIN "BlogPost" ON "BlogPost"."ID" = "SiteTree"."ID" WHERE ("SiteTree"."ParentID" = ?) AND ("SiteTree"."ClassName" IN (?, ?)) GROUP BY DATE_FORMAT("PublishDate", '%Y-%M') ORDER BY "_SortColumn0" DESC, "PublishDate" DESC Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ss_mymusicalopinion.BlogPost.PublishDate' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

DoggersHusky commented 8 years ago

Was an issue with the version of wamp I installed. It wouldn't let me disable sql_mode=only_full_group_by no matter how hard i tried. I was using 3.0 of wamp which came with mysql 5.7~. So, i downgraded to wamp 2.4 which comes with mysql 5.6 and it works!

dhensby commented 8 years ago

This is a bug but it's in framework https://github.com/silverstripe/silverstripe-framework/issues/5451