Moodle

UPGRADE fails from 1.6.4+ to 1.8 Beta+

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8, 1.9
  • Component/s: Installation
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

Install fails:
Upgrading Moodle database from version 1.6.4+ (2006050540) to 1.8 Beta + (2007021402)...

--------------------------------------------------------------------------------
(mysql): SELECT * FROM mdl_role_capabilities WHERE roleid = '1' AND capability = 'moodle/legacy:user' AND contextid = '1' LIMIT 1
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
(mysql): SELECT * FROM mdl_capabilities
--------------------------------------------------------------------------------

Error: no capabilitites defined!

then loops through the pages......

I'm tracing the code now - will post more details in the next hour or so.....

Issue Links

Activity

Hide
Petr Škoda (skodak) added a comment -

Thanks for looking into this,

I guess this problem is caused by the fact that roles are used in upgrade before they are initialized. Maybe some some upgrades should be made optional based on value of $CFG->rolesactive

Show
Petr Škoda (skodak) added a comment - Thanks for looking into this, I guess this problem is caused by the fact that roles are used in upgrade before they are initialized. Maybe some some upgrades should be made optional based on value of $CFG->rolesactive
Hide
Petr Škoda (skodak) added a comment -

Most probably the problem was caused by my commit, because it was me who was introduced legacy:user

Show
Petr Škoda (skodak) added a comment - Most probably the problem was caused by my commit, because it was me who was introduced legacy:user
Hide
Petr Škoda (skodak) added a comment -

could you please try
if (!empty($CFG->rolesactive) && $result && $oldversion < 2007021401) {

in upgrade.php line 616

thanks

Show
Petr Škoda (skodak) added a comment - could you please try if (!empty($CFG->rolesactive) && $result && $oldversion < 2007021401) { in upgrade.php line 616 thanks
Hide
Dan Marsden added a comment -

bingo!

  • thanks Petr!

Dan

Show
Dan Marsden added a comment - bingo!
  • thanks Petr!
Dan
Hide
Petr Škoda (skodak) added a comment -

sorry for the trouble

Show
Petr Škoda (skodak) added a comment - sorry for the trouble
Hide
Dan Marsden added a comment -

let me know when you have committed the fix and I will check it!

Show
Dan Marsden added a comment - let me know when you have committed the fix and I will check it!
Hide
Petr Škoda (skodak) added a comment -

fixed in cvs, thanks for the report!

Show
Petr Škoda (skodak) added a comment - fixed in cvs, thanks for the report!
Hide
Dan Marsden added a comment -

all good.

Dan

Show
Dan Marsden added a comment - all good. Dan

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: