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

Notices in error.log when using custom events in calendar

XMLWordPrintable

    • MOODLE_37_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-66354-master
    • Hide
      Before test
      1. Tail your PHP error log. e.g.

        tail -f /var/log/path/to/php/error.log
        

        the path to the error log is usually in /var/log/apache2/error.log, but it may be different depending on your system. Make sure to check your PHP configuration if unsure.

      Test
      1. Go to Calendar
      2. Click on 'New event'
      3. Type 'Test event' in 'Event title' field.
      4. Choose todays date
      5. Select type of event 'User'
      6. Click 'Save'
      7. Click on the event we have just created on the calendar
      8. A modal should open showing title, date, time and event type (User event).
      9. Modify the 'eventtype' in the 'mdl_event' table directly in the database for this event and change it from 'user' to 'tool_certification1' and save it.
      10. Go to Calendar and check that you can see the event there and there is no warning.
      11. Check that there is no notice in error.log regarding tool_certification1 eventtype.
      12. Check that the 'Events key' block shows the icons for each event.
      13. Click on 'Hide global events'
      14. Check that the 'Events key' block shows the icons for each event.
      15. Click on 'Show global events'
      16. Check that the 'Events key' block shows the icons for each event.
      Show
      Before test Tail your PHP error log. e.g. tail -f /var/log/path/to/php/error.log the path to the error log is usually in /var/log/apache2/error.log, but it may be different depending on your system. Make sure to check your PHP configuration if unsure. Test Go to Calendar Click on 'New event' Type 'Test event' in 'Event title' field. Choose todays date Select type of event 'User' Click 'Save' Click on the event we have just created on the calendar A modal should open showing title, date, time and event type ( User event ). Modify the 'eventtype' in the 'mdl_event' table directly in the database for this event and change it from 'user' to 'tool_certification1' and save it. Go to Calendar and check that you can see the event there and there is no warning. Check that there is no notice in error.log regarding tool_certification1 eventtype. Check that the 'Events key' block shows the icons for each event. Click on 'Hide global events' Check that the 'Events key' block shows the icons for each event. Click on 'Show global events' Check that the 'Events key' block shows the icons for each event.

      We are using custom event types in Workplace for Programs and Certifications and we are getting notices in error.log about missing icons (It seems that mustache template gets the icons directly with the eventtype name).

       

      [Wed Jul 17 22:48:36.587676 2019] [php7:notice] [pid 43831] [client 127.0.0.1:63264] Default exception handler: Exception - Warning: fopen([localcachedir]/theme/1563391899/workplace/pix/core/i/tool_certification2event.error): failed to open stream: No such file or directory in [dirroot]/theme/image.php on line 168 Debug: \nError code: generalexceptionmessage\n* line 158 of /lib/behat/lib.php: Exception thrown\n* line ? of unknownfile: call to behat_error_handler()\n* line 168 of /theme/image.php: call to fopen()\n, referer: http://127.0.0.1/workplace/calendar/view.php?view=day&course=1&time=1564602516
       
      

      One way to test it would be to change the ‘eventtype’ value directly in database in mdl_event table. Just create one 'User' type event and look for the event in db and eventtype should be = ‘user’. Modify it manually to ‘tool_certification1’ and save it. After that go to Calendar and then check error.log and you should see the message above.

            davidcarrillo David Carrillo
            davidcarrillo David Carrillo
            Marina Glancy Marina Glancy
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 5 minutes
                5h 5m

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