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

Fix problems reported in apache logs before 4.2 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, for reference:

      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 (user profile). It happens 2 times.

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

      114783:[Sat Apr 15 07:52:39.098346 2023] [php:notice] [pid 3205] [client] Cannot find session record 7b626dc16ec3edff31dff3bf86fd016a for user 104000, creating new session., referer: http://webserver4718fa63dcceb5d8/behatrun2/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 4 times.

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

      244036:[Sat Apr 15 09:40:52.638812 2023] [php:notice] [pid 6233] [client] User id '104001' already has a grade entry for grade item id '266000', referer: http://webserver4718fa63dcceb5d8/behatrun2/admin/tool/recyclebin/index.php?contextid=100002

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

      Problem C: Invalid get_string() identifier: 'helplinktext' or component 'tiny_link'. It happens 1846 times.

      It happens with lots of scenarios.

      500095:[Sat Apr 15 07:33:58.068505 2023] [php:notice] [pid 4989] [client] Debugging: Invalid get_string() identifier: 'helplinktext' or component 'tiny_link'. Perhaps you are missing $string['helplinktext'] = ''; in /var/www/html/lib/editor/tiny/plugins/link/lang/en/tiny_link.php? in
      * line 356 of /lib/classes/string_manager_standard.php: call to debugging()
      * line 109 of /lib/external/externallib.php: call to core_string_manager_standard->get_string()
      * line ? of unknownfile: call to core_external::get_string()
      * line 251 of /lib/external/classes/external_api.php: call to call_user_func_array()
      * line 83 of /lib/ajax/service.php: call to core_external
      * line 33 of /lib/ajax/service-nologin.php: call to require_once()
      , referer: http://webserver37dd5abd728cfb47/behatrun3/mod/forum/view.php?id=193000

      Just a missing lang string to be fixed by the issue above.

      Problem D: Cannot find session record (h5p/embed.php). It happens 4 times.

      Unable to reproduce locally (2 full behat runs plus individual component runs didn't show it). Leaving here for future reference.

      268216:[Sat Apr 15 09:56:33.607597 2023] [php:notice] [pid 6794] [client] Cannot find session record 57162ffc28b7cfa886aa466bb7bfc3d6 for user 108003, creating new session., referer: http://webserver4718fa63dcceb5d8/behatrun3/h5p/embed.php?url=http%3A%2F%2Fwebserver4718fa63dcceb5d8%2Fbehatrun3%2Fpluginfile.php%2F103005%2Fmod_h5pactivity%2Fpackage%2F0%2Ffilltheblanks.h5p&preventredirect=1&component=mod_h5pactivity

      These are similar to A, but brand new in Moodle 4.2. Need to be confirmed if they are expected or no.

      Problem E: Exception handler @ course/modedit.php. It happens 16 times.

      Unable to reproduce locally (2 full behat runs plus individual component runs didn't show it). Leaving here for future reference.

      32032:[Sat Apr 15 06:22:38.789438 2023] [php:notice] [pid 811] [client] Default exception handler: Exception - Warning: rename([localcachedir]/theme/1681538349/boost/pix/assign/monologo.svg.tmp,[localcachedir]/theme/1681538349/boost/pix/assign/monologo.svg): No such file or directory in [dirroot]/theme/image.php on line 319 Debug:
      Error code: generalexceptionmessage
      * line 157 of /lib/behat/lib.php: Exception thrown
      * line ? of unknownfile: call to behat_error_handler()
      * line 319 of /theme/image.php: call to rename()
      * line 181 of /theme/image.php: call to cache_image()
      , referer: http://webserver4718fa63dcceb5d8/behatrun2/course/modedit.php?update=193000

      New in 4.2, it has problems to move the monologo.svg icon or so, maybe it doesn't exist?


        Issue Links



              stronk7 Eloy Lafuente (stronk7)
              jpataleta Jun Pataleta
              0 Vote for this issue
              4 Start watching this issue




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