-
Bug
-
Resolution: Duplicate
-
Critical
-
None
-
2.3.6, 2.4, 2.5
-
None
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
Detected upgrading one 2.4dev site to current 2.5beta:
Debug info: ORA-00904: "SHOW_EXPANDED": invalid identifier
|
SELECT id, name, display, show_expanded, intro, introformat FROM m_folder WHERE id = :o_id
|
[array (
|
'o_id' => '21',
|
)]
|
Error code: dmlreadexception
|
Stack trace:
|
.....
|
.....
|
line 429 of /mod/folder/lib.php: call to moodle_database->get_record()
|
line 936 of /course/lib.php: call to folder_get_coursemodule_info()
|
line 1457 of /lib/modinfolib.php: call to get_array_of_activities()
|
line 1463 of /lib/db/upgrade.php: call to rebuild_course_cache()
|
line 1530 of /lib/upgradelib.php: call to xmldb_main_upgrade()
|
line 292 of /admin/index.php: call to upgrade_core()
|
With the problem being the call to rebuild_course_cache() without params, aka, forcing the rebuild and trying to access to a non-existing-yet column folder->show_expanded.
That call in upgrade code is forbidden and, alternatively, this should be used instead:
rebuild_course_cache(0, true);
|
because it's a safe alternative not using the cm api for regenerating the information but just a pair of raw sql statements.
So this is about to change all the incorrect uses to correct ones, to avoid upgrade problems here and there.
Ciao
- duplicates
-
MDL-38541 incorrect rebuild_course_cache() calls in upgrade (display, show_expanded problems)
-
- Closed
-