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

Moodle 1.9 -> 2.2 upgrade Data too long for column 'mainfile' error in mod_resource

XMLWordPrintable

    • MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      1. Create a 1.9 instance.
      2. Create a resource with a ratty filename (the example in the description should work).
      3. Upgrade to 2.2. Verify that the resource is skipped.

      Show
      1. Create a 1.9 instance. 2. Create a resource with a ratty filename (the example in the description should work). 3. Upgrade to 2.2. Verify that the resource is skipped.

      In upgrade from moodle-latest-19 to moodle-latest-22 (2.2.2+ Build: 20120504)

      Debug info: Data too long for column 'mainfile' at row 1
      UPDATE mdl_resource SET tobemigrated = ?,mainfile = ?,filterfiles = ?,legacyfiles = ?,display = ?,displayoptions = ? WHERE id=?
      [array (
      0 => 0,
      1 => '/Mount St. Helens is an active stratovolcano located in Skamania County, Washington, in the Pacific Northwest region of the United States. It is 96 miles (154 km) south of Seattle and 50 miles (80 km) northeast of Portland, Oregon. Mount St. Helens takes i',
      2 => '1',
      3 => 0,
      4 => 6,
      5 => 'a:4:

      {s:12:"printheading";i:0;s:10:"printintro";i:1;s:10:"popupwidth";s:3:"620";s:11:"popupheight";s:3:"450";}

      ',
      6 => '11531',
      )]
      Stack trace:
      line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 999 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1031 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
      line 173 of /mod/resource/db/upgradelib.php: call to mysqli_native_moodle_database->update_record()
      line 181 of /mod/resource/db/upgrade.php: call to resource_20_migrate()
      line 540 of /lib/upgradelib.php: call to xmldb_resource_upgrade()
      line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      line 1437 of /lib/upgradelib.php: call to upgrade_plugins()
      line 269 of /admin/index.php: call to upgrade_noncore()

            cfulton Charles Fulton
            kimballjohnson Kimball Johnson
            Dan Poltawski Dan Poltawski
            Sam Hemelryk Sam Hemelryk
            David Monllaó David Monllaó
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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