Silverstripe Version:
4.1.2
Question:
I’ve finally decided to take the plunge and upgrade to SS 4. I can’t say that it’s been a smooth experience at all, and it has been rather frustrating to put it politely. I’ve gotten to the point where I think I’ve made the minimum changes necessary to get the site upgraded and running, but whenever I navigate to the website I get this error:
[Emergency] Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn’t run query: SELECT DISTINCT “SiteTree_Live”.“ClassName”, “SiteTree_Live”.“LastEdited”, “SiteTree_Live”.“Created”, “SiteTree_Live”.“URLSegment”, “SiteTree_Live”.“Title”, “SiteTree_Live”.“MenuTitle”, “SiteTree_Live”.“Content”, “SiteTree_Live”.“MetaDescription”, “SiteTree_Live”.“ExtraMeta”, “SiteTree_Live”.“ShowInMenus”, “SiteTree_Live”.“ShowInSearch”, “SiteTree_Live”.“Sort”, “SiteTree_Live”.“HasBrokenFile”, “SiteTree_Live”.“HasBrokenLink”, “SiteTree_Live”.“ReportClass”, “SiteTree_Live”.“Version”, “SiteTree_Live”.“CanViewType”, “SiteTree_Live”.“CanEditType”, “SiteTree_Live”.“ProvideComments”, “SiteTree_Live”.“ModerationRequired”, “SiteTree_Live”.“CommentsRequireLogin”, “SiteTree_Live”.“ParentID”, “SiteTree_Live”.“SubsiteID”, “SiteTree_Live”.“ID”, CASE WHEN “SiteTree_Live”.“ClassName” IS NOT NULL THEN “SiteTree_Live”.“ClassName” ELSE ‘SilverStripe\CMS\Model\SiteTree’ END AS “RecordClassName” FROM “SiteTree_Live” WHERE (“SiteTree_Live”.“URLSegment” = ?) AND (“SiteTree_Live”.“ParentID” = ?) AND (“SiteTree_Live”.“SubsiteID” IN (0)) ORDER BY “SiteTree_Live”.“Sort” ASC LIMIT 1 42S22-1054: Unknown column ‘SiteTree_Live.ProvideComments’ in 'field list’
Running dev/build has been an exercise in futility:
[vagrant@localhost]$ ./vendor/bin/sake dev/build | grep ProvideComments
+ Field SiteTree.ProvideComments: created as tinyint(1) unsigned not null default '0'
+ Field SiteTree_Live.ProvideComments: created as tinyint(1) unsigned not null default '0'
+ Field SiteTree_Versions.ProvideComments: created as tinyint(1) unsigned not null default '0'
It indicates that it has created the column each and every time I run it, but it is not actually doing anything. When I go to verify that the column exists in the database afterwards, it has not in fact created the column. When I tail the Silverstripe and Apache logs during dev/build nothing shows up to indicate what is going wrong. There are also quite a few other updates in addition to the SiteTree_Live.ProvideComments column that aren’t getting committed to the database, which indicates to me that dev/build is failing for some unknown reason.
I’m about to lose all hope of ever upgrading to SS 4 at this point and was wondering if there is possibly something that I am missing, or if there is anything I can do to troubleshoot dev/build to find out where it is failing?