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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

2.4.0 upgrade issues

Go to End

3 Posts   1880 Views


Community Member, 117 Posts

6 June 2010 at 6:40am

I'm trying to upgrade a 2.3.2 installation to 2.4.0 and as usual I'm tearing my hair our with "there has been an error"

When I switch to dev mode I get:

[User Error] Couldn't run query: SELECT "SiteTree"."ClassName", "SiteTree"."Created", "SiteTree"."LastEdited", "SiteTree"."URLSegment", "SiteTree"."Title", "SiteTree"."MenuTitle", "SiteTree"."Content", "SiteTree"."MetaTitle", "SiteTree"."MetaDescription", "SiteTree"."MetaKeywords", "SiteTree"."ExtraMeta", "SiteTree"."ShowInMenus", "SiteTree"."ShowInSearch", "SiteTree"."HomepageForDomain", "SiteTree"."ProvideComments", "SiteTree"."Sort", "SiteTree"."HasBrokenFile", "SiteTree"."HasBrokenLink", "SiteTree"."Status", "SiteTree"."ReportClass", "SiteTree"."CanViewType", "SiteTree"."CanEditType", "SiteTree"."ToDo", "SiteTree"."Version", "SiteTree"."Priority", "SiteTree"."ParentID", "Page"."CartLink", "NewsPage"."Date", CASE WHEN "SiteTree"."ClassName" IN ('SideBarPage') THEN "SideBarPage"."SideBarContent" WHEN "SiteTree"."ClassName" IN ('SideBarPageCart') THEN "SideBarPageCart"."SideBarContent" ELSE NULL END AS "SideBarContent", "ErrorPage"."ErrorCode", "RedirectorPage"."RedirectionType", "RedirectorPage"."ExternalURL", "RedirectorPage"."LinkToID", "VirtualPage"."VersionID", "VirtualPage"."CopyContentFromID", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree" LEFT JOIN "Page" ON "Page"."ID" = "SiteTree"."ID" LEFT JOIN "NewsPage" ON "NewsPage"."ID" = "SiteTree"."ID" LEFT JOIN "SideBarPage" ON "SideBarPage"."ID" = "SiteTree"."ID" LEFT JOIN "SideBarPageCart" ON "SideBarPageCart"."ID" = "SiteTree"."ID" LEFT JOIN "ErrorPage" ON "ErrorPage"."ID" = "SiteTree"."ID" LEFT JOIN "RedirectorPage" ON "RedirectorPage"."ID" = "SiteTree"."ID" LEFT JOIN "VirtualPage" ON "VirtualPage"."ID" = "SiteTree"."ID" WHERE ("HomepageForDomain" LIKE '') ORDER BY "Sort" Unknown column 'SiteTree.Priority' in 'field list'

Line 536 in /home/myso/public_html/sapphire/core/model/MySQLDatabase.php

Now a few things I'm confused about:

1. I can access /dev/ area and when I run build it reports table SiteConfig created, yet when I check database there is no table of that name.

2. Why does my old config file start with

global $databaseConfig;
$databaseConfig = array(

yet the default config file with 2.4 is

global $database;
$database = array(

I tried changing my config to just $database but then I then fail to even get default " there has been an error page". Is my existing config value ok?

Point 2 may not even be related, just trying to understand the issue here.

Also I'm not using any modules.

Any help appreciated



Community Member, 117 Posts

6 June 2010 at 7:43am

Well I've now got this site working, but pretty surprised at the reason. From above it seems that dev/build was failing half-way though and not makin ANY of the required changes i.e. adding new tables etc... While I went through and manually compared each table with table on another new test installation and manually corrected any differences, it seems that the correction that resolved the problem was that my previous QueuedEmail table was called QueuedeMail. As soon as i changed that /dev/build completed and changes it made actually stuck and site then worked.

I would still like to know answer to point 2 above id a dev reading this could spare a minute?



Forum Moderator, 5523 Posts

6 June 2010 at 11:39am

global $database; is the name of the database, not the config settings. We recommend storing your database information in an environment file and not the sites _config.php. (Though if you used the installer with the 'use _ss_environment file' unticked it will write the standard $databaseConfig array to your _config as well).