Moodle

Disable guest autologin in upgrade scripts

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Upgrade from 1.8 isn't smooth, after first core uprgades we are bounced to upgradesettings, then

Access denied
Stack trace:
line 5727 of lib/weblib.php: call to debugging()
line 3839 of lib/adminlib.php: call to error()
line 12 of admin/upgradesettings.php: call to admin_externalpage_setup()

Then we continue with the module/block upgrades, and we next get:

Sorry, but you do not currently have permissions to do that (Change site configuration)

Stack trace:
line 5727 of lib/weblib.php: call to debugging()
line 5788 of lib/weblib.php: call to error()
line 836 of lib/accesslib.php: call to print_error()
line 529 of admin/index.php: call to require_capability()

Activity

Hide
Petr Škoda (skodak) added a comment -

hmm, this looks like moodle thinks you are not admin.
Did you open close/open before upgrade?
Did moodle ask you to log in before upgradesettings?
Which PHP version?
Can you login using admin account after this error happens?

Show
Petr Škoda (skodak) added a comment - hmm, this looks like moodle thinks you are not admin. Did you open close/open before upgrade? Did moodle ask you to log in before upgradesettings? Which PHP version? Can you login using admin account after this error happens?
Hide
Dan Poltawski added a comment -

Yeah, its auto-logging me in as a guest.

It doesn't ask me to login before upgrade settings, the upgrade continues fine (aside from upgradesettings) and I can login afterwards.

php5

Show
Dan Poltawski added a comment - Yeah, its auto-logging me in as a guest. It doesn't ask me to login before upgrade settings, the upgrade continues fine (aside from upgradesettings) and I can login afterwards. php5
Hide
Petr Škoda (skodak) added a comment -

is guest autologin enabled?

Show
Petr Škoda (skodak) added a comment - is guest autologin enabled?
Hide
Petr Škoda (skodak) added a comment -

I think I know what is wrong, going to disable guest autologin in admin scripts

Show
Petr Škoda (skodak) added a comment - I think I know what is wrong, going to disable guest autologin in admin scripts
Hide
Petr Škoda (skodak) added a comment -

fixed in cvs, thanks for the report and cooperation

Show
Petr Škoda (skodak) added a comment - fixed in cvs, thanks for the report and cooperation
Hide
Jonathan Harker added a comment -

This issue is not fixed - after a LOT of wasted effort rehearsing an upgrade with a large school (from 1.7.1 to a branch from latest MOODLE_19_STABLE), it turns out I had to turn off autologinguests to get the upgrade to succeed.

Symptoms were the same as in the description above.

Show
Jonathan Harker added a comment - This issue is not fixed - after a LOT of wasted effort rehearsing an upgrade with a large school (from 1.7.1 to a branch from latest MOODLE_19_STABLE), it turns out I had to turn off autologinguests to get the upgrade to succeed. Symptoms were the same as in the description above.
Hide
Petr Škoda (skodak) added a comment -

Hmm, if autologins are enabled you have to go to http://yoursite/admin/ directly, how exactly did you trigger the upgrade?

Show
Petr Škoda (skodak) added a comment - Hmm, if autologins are enabled you have to go to http://yoursite/admin/ directly, how exactly did you trigger the upgrade?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: