Jump to:

1136 Posts in 1984 Topics by 403 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » Shifted server, can't logon - tried to upgrade, site won't work at all. Help!

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1 2 3 4
Go to End
Author Topic: 2009 Views
  • banal
    Avatar
    Community Member
    901 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    You can set an admin user/password in your _config.php to get access to the CMS. There you can reset your admin password and after doing so, delete the line from _config.php..
    This is what you would add:

    Security::setDefaultAdmin('username', 'password');

  • Philwm
    Avatar
    Community Member
    22 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    I'm trying to work through this myself but have reached a dead-end.

    After up grading an existing site to 2.4.0 I can't login to the CMS.

    So - I've successfully upgraded but still have the original problem!!

    I've gone into mysite/-config.php file and checked I'm using the same default admin login. Thanks Banal, I've redone this but still

    when I append admin to the URL I end up with a cms-styled page saying (impenetrably unhelpfully):

    Website Error
    There has been an error

    The website server has not been able to respond to your request.

    Please help, this is the second day I've spent trying to access this CMS.

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    Did you try to append "?isDev=1" to your URL? That should prompt you for username/password and would let you to rebuild the DB.

  • Philwm
    Avatar
    Community Member
    22 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    Thanks Banal, I've just tried it but it just goes straight to the front-end/homepage.

    Do you reckon it's something to do with javascript with the change to 2.4.0.?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    So you didn't get a login-prompt at all when using isDev? That's strange.

    Add:

    Director::set_environment_type('dev');

    to your _config.php. That should at least give you a more meaningful error output instead of just "There has been an error"

  • Philwm
    Avatar
    Community Member
    22 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    Thanks banal

    the config file already has this in it -

    Director::set_dev_servers(array(
       'localhost',
       '127.0.0.1',
    ));

    But I figure that's no problem and added suggested code.

    Appending admin now gives me a big page of errors:

    [User Error] Bad RecordClassName '' and $baseClass not set
    GET /admin

    Line 2705 in /usr/local/www/vhosts/*sitename*.co.nz/httpdocs/sapphire/core/model/DataObject.php

    Source

    2696       foreach($records as $record) {
    2697          if(empty($record['RecordClassName'])) {
    2698             $record['RecordClassName'] = $record['ClassName'];
    2699          }
    2700          if(class_exists($record['RecordClassName'])) {
    2701             $results[] = new $record['RecordClassName']($record);
    2702          } else {
    2703             if(!$baseClass) {
    2704                user_error("Bad RecordClassName '{$record['RecordClassName']}' and "
    2705                   . "\$baseClass not set", E_USER_ERROR);
    2706             } else if(!is_string($baseClass) || !class_exists($baseClass)) {
    2707                user_error("Bad RecordClassName '{$record['RecordClassName']}' and bad "
    2708                   . "\$baseClass '$baseClass not set", E_USER_ERROR);
    2709             }
    2710             $results[] = new $baseClass($record);
    2711          }

    Trace

    Bad RecordClassName '' and $baseClass not set
    Line 2705 of DataObject.php
    DataObject->buildDataObjectSet(MySQLQuery)
    Line 569 of Hierarchy.php
    Hierarchy->liveChildren(1,1)

    etc..... there's half a page of these ...

    That's a more fulsome error output but, for me, no more meaningful - although I do comprehend "user error" !

    Anyone out there who can interpret this and assist me to get it back on track?

  • Philwm
    Avatar
    Community Member
    22 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    There's a couple of other entries in the forums with $baseClass not set", E_USER_ERROR (I Googled it and found them) Both seem to have happened after upgrading to 2.4.0 and are related to modules. In one instance the poster could have blog, or ecommerce but not both.

    I went and deleted the mollom and spamprotection modules completely off the server, and flushed.

    But I still get the same result when I append admin.

    I'm now assuming that the database still has empty ClassName fields in the File table from when it was built, and that just deleting the files makes no difference.

    I don't know how yet, but I'm going to try and inspect the database for empty fields.

    Feeling like I'm moving further and further from getting this sorted - any help is greatly appreciated!

  • Philwm
    Avatar
    Community Member
    22 Posts

    Re: Shifted server, can't logon - tried to upgrade, site won't work at all. Help! Link to this post

    My reading today has resulted in a note from the SS datamodel page ( http://doc.silverstripe.org/datamodel?s=static%2520defaults ):

    Generating the database-schema

    The Silverstripe database-schema is generated automatically by visiting the URL.

    http://<mysite>/dev/build

    Note: You need to be logged in as an administrator to perform this command.

    If I can't login how is the database being rebuilt? Is this the root of my problem?

    2009 Views
Page: 1 2 3 4
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.