Installation help

error installing 2.7

 
 
Picture of Hunter Allspaugh
error installing 2.7
 

I am installing an instance of v. 2.7 and using the moodle data from our current moodle server for testing purposes.  When moodle is going through its upgrade process from the browser, it starts off by failing on the mod_quiz module saying there was a coding error, and then it shows the following if I try to run the upgrade from within moodle again:



mod_quiz

Debug info: Data truncated for column 'slot' at row 17268
ALTER TABLE mdl_quiz_slots MODIFY COLUMN slot BIGINT(10) NOT NULL after id
Error code: ddlexecuteerror
Stack trace:
  • line 449 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 839 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 76 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 583 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 620 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
  • line 723 of /mod/quiz/db/upgrade.php: call to database_manager->change_field_notnull()
  • line 697 of /lib/upgradelib.php: call to xmldb_quiz_upgrade()
  • line 420 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1615 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 432 of /admin/index.php: call to upgrade_noncore()
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: error installing 2.7
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

You may be seeing MDL-45522 or MDL-45523 which Eric Merill found and fixed last night. Those two fixes shoudl be included in this week's 2.7+ weekly release which should be out in a few days.

 
Average of ratings: -
Picture of Hunter Allspaugh
Re: error installing 2.7
 

Ok, great.  Thanks for the information.  I will try again at the end of the week and see if it goes differently.

 
Average of ratings: -
Picture of Hunter Allspaugh
Re: error installing 2.7
 

Here is the latest error I am getting after the git update that was pushed out today or yesterday.


mod_quiz

DDL sql execution error

More information about this error

Debug info: Data truncated for column 'slot' at row 17268
ALTER TABLE mdl_quiz_slots MODIFY COLUMN slot BIGINT(10) NOT NULL after id
Error code: ddlexecuteerror
Stack trace:
  • line 449 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 839 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 76 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 583 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 620 of /lib/ddl/database_manager.php: call to database_manager->change_field_type()
  • line 727 of /mod/quiz/db/upgrade.php: call to database_manager->change_field_notnull()
  • line 697 of /lib/upgradelib.php: call to xmldb_quiz_upgrade()
  • line 420 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1615 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 432 of /admin/index.php: call to upgrade_noncore()
 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: error installing 2.7
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

I'm confused by that. The error of happening at line 727 of mod/quiz/db/upgrade.php which is trying to set the slot column to be NOT NULL.

Before doing that, on line 713 we do 

        // Now, if any quiz_slots rows are left with slot or page NULL, something
        // is badly wrong.
        if ($DB->record_exists_select('quiz_slots', 'slot IS NULL OR page IS NULL')) {
            throw new coding_exception('Something went wrong in the quiz upgrade step for MDL-43749. ' .
                    'Some quiz_slots still contain NULLs which will break the NOT NULL constraints we need to add. ' .
                    'Please report this problem at http://tracker.moodle.org/ so that it can be investigated. Thank you.');
        }

Oh, I see. Back in the first post you say you got a different error the first time. Well, that was it.

So, anyway, you have some bad data in your database, which does not fit any of the patterns of bad data that the code has already been taught to clean up. If you can work out where this bad data came from, then we can probalby handle it.

So, can you work out where this bad data came from? Do you have a backup of the database from before the upgrade? Can you work out which quiz it relates to? Can you work out what happened to that quiz?

 
Average of ratings:Useful (1)
Picture of Hunter Allspaugh
Re: error installing 2.7
 

We ended up doing a 2.4 - 2.6 - 2.7 upgrade path and that went flawlessly.

 
Average of ratings:Useful (1)