Moodle 2.0 preview 4

Moodle 2.0 preview 4

by Craig Douglas -
Number of replies: 5
I'm not sure if this is in the right place, but I'm upgrading (on a dev server) from Moodle 1.9.8+ (Build: 20100414) and I'm getting a serious error during upgrade.

First of all it errored on mod_folder due to a database write error but it could still continue, then it errored on mod_resource saying:

Unknown error upgrading mod_resource to version 2009062600, can not continue.

I don't really know what information to provide, but I'm running Apache 2.2 on windows server 2003 with PHP 5.2.11. All php extensions were present during the pre-installation checks and it all seemed to be going ok.

I couldn't see any error logs within the installation directory and nothing showed up in php or apache logs either.

EDIT: just to add that with debugging on, the current stack trace shown is:

Stack trace:
  • line 183 of \lib\upgradelib.php: upgrade_exception thrown
  • line 102 of \mod\resource\db\upgrade.php: call to upgrade_mod_savepoint()
  • line 510 of \lib\upgradelib.php: call to xmldb_resource_upgrade()
  • line 294 of \lib\upgradelib.php: call to upgrade_plugins_modules()
  • line 1277 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 260 of \admin\index.php: call to upgrade_noncore()

Average of ratings: -
In reply to Craig Douglas

Re: Moodle 2.0 preview 4

by Craig Douglas -
Just restored the server to its previous state (virtual server) and run it all again with debugging on.

On mod_folder, I get:

Debug info: Incorrect string value: '\xEF\x83\x9E\x09EU...' for column 'alltext' at row 2
INSERT INTO mdl_resource_old (oldid, course, name, type, reference, intro, introformat, alltext, popup, options, timemodified, cmid)
SELECT r.id, r.course, r.name, r.type, r.reference, r.summary, 0, r.alltext, r.popup, r.options, r.timemodified, cm.id
FROM mdl_resource r
LEFT JOIN mdl_course_modules cm ON (r.id = cm.instance AND cm.module = ?)
[array (
0 => '13',
)]
Stack trace:
  • line 381 of \lib\dml\moodle_database.php: dml_write_exception thrown
  • line 545 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 252 of \mod\resource\db\upgradelib.php: call to mysqli_native_moodle_database->execute()
  • line 43 of \mod\folder\db\upgradelib.php: call to resource_20_prepare_migration()
  • line 42 of \mod\folder\db\install.php: call to folder_20_migrate()
  • line 489 of \lib\upgradelib.php: call to xmldb_folder_install()
  • line 294 of \lib\upgradelib.php: call to upgrade_plugins_modules()
  • line 1277 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 260 of \admin\index.php: call to upgrade_noncore()

and mod_resource I just get:

Stack trace:
  • line 183 of \lib\upgradelib.php: upgrade_exception thrown
  • line 102 of \mod\resource\db\upgrade.php: call to upgrade_mod_savepoint()
  • line 510 of \lib\upgradelib.php: call to xmldb_resource_upgrade()
  • line 294 of \lib\upgradelib.php: call to upgrade_plugins_modules()
  • line 1277 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 260 of \admin\index.php: call to upgrade_noncore()




One thing I forgot to add was that the dev server has an exact copy of our live server but it doesn't have any of the data files. Looking at these particular errors it doesn't seem related but thought I'd mention it anyway. Before upgrading it works fine (obviously links to files don't work) but I run into these two problems when upgrading.

In reply to Craig Douglas

Re: Moodle 2.0 preview 4

by Craig Douglas -
Not sure if this helps, but last time I hadn't included the files from non-standard modules. After adding the files for non-standard modules, it still gave the same problem on mod_folder but I didn't get the error for mod_resource. Instead it takes me to:

/login/index.php?authldap_skipntlmsso=1

Where I then get an "Error reading from database" message with the following debug info:

Debug info: Unknown column 'display' in 'field list'
SELECT id, name, display, displayoptions, tobemigrated, revision FROM mdl_resource WHERE id = ?
[array (
0 => '13',
)]
Stack trace:
  • line 378 of \lib\dml\moodle_database.php: dml_read_exception thrown
  • line 632 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1216 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1188 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
  • line 1168 of \lib\dml\moodle_database.php: call to moodle_database->get_record_select()
  • line 233 of \mod\resource\lib.php: call to moodle_database->get_record()
  • line 1103 of \course\lib.php: call to resource_get_coursemodule_info()
  • line 1740 of \course\lib.php: call to get_array_of_activities()
  • line 2887 of \lib\moodlelib.php: call to rebuild_course_cache()
  • line 1300 of \lib\navigationlib.php: call to get_fast_modinfo()
  • line 47 of \course\format\topics\lib.php: call to global_navigation->load_generic_course_sections()
  • line 1273 of \lib\navigationlib.php: call to callback_topics_load_content()
  • line 968 of \lib\navigationlib.php: call to global_navigation->load_course_sections()
  • line 2083 of \lib\navigationlib.php: call to global_navigation->initialise()
  • line 610 of \lib\pagelib.php: call to navbar->has_items()
  • line 4 of \theme\base\layout\general.php: call to moodle_page->has_navbar()
  • line 612 of \lib\outputrenderers.php: call to include()
  • line 570 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
  • line ? of unknownfile: call to core_renderer->header()
  • line 964 of \lib\setuplib.php: call to call_user_func_array()
  • line ? of unknownfile: call to bootstrap_renderer->__call()
  • line 316 of \login\index.php: call to bootstrap_renderer->header()


Does this mean it could be a NTLM/SSO problem?
In reply to Craig Douglas

Re: Moodle 2.0 preview 4

by Craig Douglas -
Anyone?
In reply to Craig Douglas

Re: Moodle 2.0 preview 4

by Mathias Wortmann -
I had the same error when i try to upgrade from 1.9.8 to 2.0 Prev3. See my post http://moodle.org/mod/forum/discuss.php?d=149899.

The problems were missing files in the data directory. As you has mentioned, your test system comes without any user data. So i think there is your problem. Moodle 2.0 has a complete different structure for user data files. During the update process all resources are check for inconsistencies.

Best regards,
Mathias