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

Duplicate block_positions are possible in file plugin check

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 2.3.3, 2.4
    • Blocks
    • MOODLE_23_STABLE, MOODLE_24_STABLE

      A friend reported their site wasn't showing some images on front page.

      Turned out to be duplicate records in the block_positions check:

      Debug info: 
      Error code: filenotfound
      Stack trace:
      line 467 of /lib/setuplib.php: moodle_exception thrown
      line 1917 of /lib/filelib.php: call to print_error()
      line 4242 of /lib/filelib.php: call to send_file_not_found()
      line 38 of /pluginfile.php: call to file_pluginfile()
      Output buffer: <div class="notifytiny">Error: mdb->get_record() found more than one record!<ul style="text-align: left"><li>line 1372 of /lib/dml/moodle_database.php: call to debugging()</li><li>line 1332 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()</li><li>line 1311 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()</li><li>line 4239 of /lib/filelib.php: call to moodle_database->get_record()</li><li>line 38 of /pluginfile.php: call to file_pluginfile()</li></ul></div>

      In the database was:

       id | blockinstanceid | contextid |   pagetype   | subpage | visible |  region   | weight 
      ----+-----------------+-----------+--------------+---------+---------+-----------+--------
       10 |             274 |      1193 | user-profile | 9       |       0 | side-post |      9
        8 |             274 |         2 | site-index   |         |       1 | side-post |      0

      We need to work out whether the check is wrong, or block positions are wrong.

            moodle.com Moodle HQ
            poltawski Dan Poltawski
            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.