Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
3.8
-
MOODLE_38_STABLE
-
MOODLE_38_STABLE
-
Description
This is a regression caused by MDL-65646 when using third part plugins having subplugins with moodle 3.8dev (master) .
Basically we introduced some debugging() to tell developers that they third-part plugins should stop using subplugins.php and move to subplugins.json.
But that debugging is happening too early in Moodle's bootstrap/warmup process and debugging() may be not available yet.
Error follows:
[21-Jun-2019 08:46:16 UTC] Default exception handler: error/generalexceptionmessage Debug:
|
Error code: generalexceptionmessage
|
$a contents: Call to undefined function debugging()
|
* line 540 of /lib/classes/component.php: Error thrown
|
* line 471 of /lib/classes/component.php: call to core_component::fetch_subtypes()
|
* line 383 of /lib/classes/component.php: call to core_component::fetch_plugintypes()
|
* line 357 of /lib/classes/component.php: call to core_component::fill_all_caches()
|
* line 293 of /lib/classes/component.php: call to core_component::get_cache_content()
|
* line 112 of /lib/classes/component.php: call to core_component::init()
|
* line ? of unknownfile: call to core_component::classloader()
|
* line 593 of /lib/setup.php: call to spl_autoload_call()
|
* line 57 of /config.php: call to require_once()
|
* line 30 of /index.php: call to require_once()
|
Note that, to be able to see the error above... we had to hack quite a bit because the exception handler itself was breaking (so early in the process). So MDL-65996 has been created about that.
Ciao
PS: Many thanks to daniss for raising the issue and helping to trace it down!
For posterity, the old first section of testing instructions:
A) Forcing the error within core.
- Remove mod/assign/db/subplugins.json
- Go to site main page
- Verify you get a "debugging" error pointing to
line 25 of /mod/assign/db/subplugins.php: Error thrown
line 542 of /lib/classes/component.php: call to include()
That's the importan point (the include one).
- Verify that you get in the web server error logs the message "Use of subplugins.php has been deprecated. Please update your 'YOUR/PATH/TO/mod/assign' plugin to provide a subplugins.json file instead"
Attachments
Issue Links
- has been marked as being related by
-
MDL-65996 Ensure default_exception_handler works ok @ early stages
-
- Closed
-
- has to be done before
-
MDL-66022 Remove old subplugins.php from core
-
- Closed
-
- is blocked by
-
MDL-62758 Completion: 'should be completed' event text not multilingual
-
- Open
-
-
MDL-61634 PHP7 - question/type/multianswer with zero grade for all subquestions breaks quiz statistics
-
- Open
-
-
MDL-65996 Ensure default_exception_handler works ok @ early stages
-
- Closed
-
-
MDL-65646 Move dependencies and subplugins to JSON
-
- Closed
-