Jump to:

1160 Posts in 2618 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Upgrade to 2.4.0 fails totally

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: 1116 Views
  • Junglefish
    Avatar
    Community Member
    104 Posts

    Upgrade to 2.4.0 fails totally Link to this post

    Hi

    I am attempting to upgrade from 2.3.3 to 2.4.0. I replace the cms, googlesitemaps and sapphire directories and run /dev/build/. All I get is the big default SS error saying:

    "Website Error
    There has been an error
    The website server has not been able to respond to your request."

    When I copy the 2.3.3 directories back, /dev/build/ runs fine again.

    Where do I even start looking for the problem?

    jf/

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Upgrade to 2.4.0 fails totally Link to this post

    Additional info...

    My 2.3.3 installation also includes the Event Calendar and User Forms modules. Might it be a compatibility issue?

    jf/

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: Upgrade to 2.4.0 fails totally Link to this post

    Hi!

    > Where do I even start looking for the problem?

    Here: http://doc.silverstripe.org/debugging

    Those modules can be the problem…

    Hope it helps,
    Juan

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Upgrade to 2.4.0 fails totally Link to this post

    Thanks for the tips guys.

    I've isolated the problem down to the Event Calendar. Here's what I've done so far...

    I've installed the latest version of Event Calendar
    I've installed Dataobject Manager (I didn't have this installed before but the new Event Calendar seems to require it)
    I've installed Legacydatetimefields (not sure if it's needed though...)

    /dev/build/ now runs fine and I have 2.4.0. However, the Event Calendar is well broke

    I run into an immediate problem with this error on both my site and the CMS:
    "Fatal error: Call to a member function AbsoluteLink() on a non-object in C:\wamp\[path]\SilverStripe\event_calendar\code\CalendarUI.class.php on line 17"

    The offending code looks like this:
             var controller_url_segment = '" . $controller->AbsoluteLink() . "';
             var current_url_segment = '" . Controller::curr()->Link() . "';

    The code in my old version of Event Calendar used to look like this:
             var controller_url_segment = '" . $controller->URLSegment . "';
             var current_url_segment = '" . Controller::curr()->URLSegment . "';

    Changing the code to the old version creates more errors. Removing those lines altogether allows the site and the CMS to load up, but the module fails to load properly in the CMS (of course).

    So, what now? Should I be playing around with the Event Calendar code, or is there some other dependency I'm unaware of that I have to install? Or something else??

    jf/

  • Junglefish
    Avatar
    Community Member
    104 Posts

    Re: Upgrade to 2.4.0 fails totally Link to this post

    For the record...

    It all went wrong because at some point during the upgrade, the database records for Calendars and CalendarEvents got corrupted, ie. the value in the ClassName column was set to NULL.

    To fix it, I ran this query directly on the database:

    SELECT *
    FROM SiteTree_live
    WHERE ClassName is null or ClassName = ''

    ...to identify which records were corrupt and manually inserted the values "Calendar" or "CalendarEvent" against each record as appropriate.

    1116 Views
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.