Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5818

Side bar block breaks course page after sections are moved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 2.7.9, 2.9
    • Block: Side bar
    • None

      In Moodle 2.7 and beyond, under certain conditions the side bar block can prevent the course page from displaying, without any option for the user to fix the problem.

      To reproduce:

      • Create a course in "weekly" format, add a side bar block, and add an activity to the side bar.
      • In edit mode, click the "Add section" button on the bottom of the course page twice. (Both the "side bar" section and a new section below it will now be visible.)
      • Move the empty section on top of the "side bar" section.
      • Click "turn editing off".

      From now on, the course page will display an "error writing to database" whenever it is called.

      The immediate reason is that block_side_bar tries to correct the numbering of sections, and for that purpose tries to write to the course_sections table when the course page is viewed, which results in a unique index violation.

      The actual problem is somewhat deeper I think. (Am developing a patch.)

            jfilip Justin Filip (Inactive)
            bostelm Henning Bostelmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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