Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76064

Fix problems reported in apache logs before 4.1 release






      This is about to inspect apache logs for complete behat runs and fix as many notices / problems are shown there. Aggregating information from all supported themes.

      Used this regexp against goutte and chrome webserver logs:

      ag -v 'POST|GET|OPTIONS|\] (checking plan|(saving|calculating|loading|setting) controller|(applying|loading|instantiating) (backup|restore|plan)|(activity|section) skipped|setting file inclusion|processing file aliases|Unknown setting: (questionbank|overwrite_conf|course_shortname|course_fullname|course_startdate))|Failed Login: ' aggregated.txt > results.txt

      (where aggregated.txt is the union of goutte and chrome web server logs of all core themes)

      Trick: When it's difficult to find which exact behat test is causing the problem, it's useful to run the tests with the --pretty command, getting the date prepended, that way later can match them with the dates in apache error logs. To do so just add the following to your behat run command:

      vendor/bin/behat ......  --format pretty --no-colors | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'

      You can see the actual results @ results.txt

      Trick: Always look to previous release issue to verify if the error already was detected there and considered ok.


      Problem A: Cannot find session record. It happens 2 times.

      Happens in scenario "As a student, request deletion of account and data"

      84489:[Tue Nov 15 07:49:13.754595 2022] [php:notice] [pid 2614] [client] Cannot find session record 7f9cc8dd1979da40214a1b80be3ae843 for user 103000, creating new session., referer: http://webserver131d771ed741fc3b/behatrun3/user/profile.php

      Confirmed that it's testing exactly that the session has expired (see prev. release). So 100% ignorable.

      Problem B: User id 'xxxxxx' already has a grade. It happens 2 times.

      Happens with scenario "Delete and restore a quiz with user data.

      185918:[Tue Nov 15 09:22:41.372725 2022] [php:notice] [pid 5581] [client] User id '106001' already has a grade entry for grade item id '169000', referer: http://webserver131d771ed741fc3b/behatrun2/admin/tool/recyclebin/index.php?contextid=107002

      Confirmed that it's trying to recreate already existing course grade (see MDL-68961 and prev. release). So 100% ignorable.

      Problem C & D from 4.0 inspection (MDL-72815) are not happening anymore with 4.1.

      Added a note to MDL-68996

      Problem E: Debugging: String [filterrowlegend,core_user] is deprecated. It happens 26 times.


      2162:[Tue Nov 15 06:02:52.137271 2022] [php:notice] [pid 508] [client] Debugging: String [filterrowlegend,core_user] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation in

      • line 397 of /lib/classes/string_manager_standard.php: call to debugging()
      • line 117 of /lib/external/externallib.php: call to core_string_manager_standard->get_string()
      • line 261 of /lib/externallib.php: call to core_external::get_string()
      • line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
      • line 33 of /lib/ajax/service-nologin.php: call to require_once()
        , referer: http://webserver131d771ed741fc3b/behatrun3/user/index.php?id=100000

      Problem F: PHP8 warning in theme_config->editor_css_files(). It happens 12 times.


      160656:[Tue Nov 15 09:02:05.331079 2022] [php:notice] [pid 4853] [client] Default exception handler: Exception - Warning: foreach() argument must be of type array|object, null given in [dirroot]/lib/outputlib.php on line 968 Debug:
      Error code: generalexceptionmessage

      Problem G: Using deprecated magic setters/getters in tool_lp\external::data_for_competency_summary(). It hapeens 8 times.


      154782:[Tue Nov 15 08:57:36.330964 2022] [php:notice] [pid 4607] [client] Debugging: Use of magic setters and getters is deprecated. Use get() and set(). in


        Issue Links



              stronk7 Eloy Lafuente (stronk7)
              jpataleta Jun Pataleta
              2 Vote for this issue
              5 Start watching this issue



                Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0 minutes
                  Time Spent - 1 day, 15 minutes
                  1d 15m


                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.