Jump to:

1160 Posts in 2632 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » 2.4.0 upgrade issues

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 1419 Views
  • redactuk
    Community Member
    117 Posts

    2.4.0 upgrade issues Link to this post

    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 '%mysite.co.uk%') ORDER BY "Sort" Unknown column 'SiteTree.Priority' in 'field list'
    GET /

    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


  • redactuk
    Community Member
    117 Posts

    Re: 2.4.0 upgrade issues Link to this post

    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?


  • Willr
    Forum Moderator
    5508 Posts

    Re: 2.4.0 upgrade issues Link to this post

    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). http://doc.silverstripe.org/environment-management

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.