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

Javascript warning/error on section page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 4.5
    • Course
    • MOODLE_405_STABLE
    • HQ 2024 Sprint I3.3 Moppies

      When going on a section page (integration branch and main), we can see an error in the console due to the fact that we try to attach an action to the new section button (that does not exist in section page).

       

      To reproduce:

      • Create a course
      • Turn editing on
      • Go to any section page
      • Check the browser developper console

      You should have something like:
       
       

      log.js:32 TypeError: Cannot read properties of null (reading 'querySelector')
      at _default._setAddSectionLocked (actions.js:781:45)  
      at _default._checkSectionlist (actions.js:190:14)  
      at _default.stateReady (actions.js:126:14)  at reactive.js:316:31  

      I took a first look and it seems to be caused by the the absence of the add section button (here)
       

            tusefomal Ferran Recio
            laurent.david@moodle.com Laurent David
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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