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

Error writing to database when adding block to course category page

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Blocks
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

    Description

      When attempting to add a block e.g. html block to a course category page, the following error is obtained:

      Error writing to database

      Debug info: Data too long for column 'pagetypepattern' at row 1
      INSERT INTO mdl_block_instances (blockname,parentcontextid,showinsubcontexts,pagetypepattern,subpagepattern,defaultregion,defaultweight,configdata) VALUES(?,?,?,?,?,?,?,?)
      [array (
      0 => 'comments',
      1 => '117',
      2 => 0,
      3 => 'admin-course-category',
      4 => NULL,
      5 => 'side-pre',
      6 => 4,
      7 => '',
      )]
      Stack trace:

      • line 381 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 716 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      • line 759 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      • line 594 of /lib/blocklib.php: call to mysqli_native_moodle_database->insert_record()
      • line 628 of /lib/blocklib.php: call to block_manager->add_block()
      • line 1017 of /lib/blocklib.php: call to block_manager->add_block_at_end_of_default_region()
      • line 992 of /lib/blocklib.php: call to block_manager->process_url_add()
      • line 1070 of /lib/pagelib.php: call to block_manager->process_url_actions()
      • line 671 of /lib/pagelib.php: call to moodle_page->starting_output()
      • line 565 of /lib/outputrenderers.php: call to moodle_page->set_state()
      • line 165 of /course/category.php: call to core_renderer->header()

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              tsala Helen Foster
              Nobody Nobody
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                24/Nov/10