-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.2, 3.10, 4.0
-
MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
Part of the 3.10 web server error logs review (MDL-69971).
It has been detected that there is a coding_exception in the logs, only when using "classic", while running the 'Do a H5P attempt' behat feature (or, more exactly, when running the 'To an attempts and check on course log report' scenario within it.
Error:
[Wed Oct 21 11:31:42.709547 2020] [php7:notice] [pid 24769] [client 127.0.0.1:64373] Default exception handler: Coding error detected, it must be fixed by a programmer: Error: Can't find data record in database table course. (SELECT * FROM
Unknown macro: {course}WHERE id = ?\n[array (\n 0 => '0',\n)]) Debug: \nError code: codingerror\n* line 120 of /lib/ajax/getnavbranch.php: coding_exception thrown\n, referer: http://127.0.0.1/~stronk7/behatgit/report/log/user.php?id=457001&course=185000&mode=today
Reproduce it with:
$ php admin/tool/behat/cli/run.php --profile=<<your_profile>> --suite=classic \
|
--name='To an attempts and check on course log report'
|
Note that the behat execution ends ok, for some reason that coding exception is not being caught (that can be normal). So just look to the web server logs to see it.
The error is not reproducible before 3.10, so far.