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

Upgrade from 1.9.6 fails if wiki data for field tomissingpage is larger than 255 characters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • 2.0.2
    • 2.0
    • Wiki (2.x)
    • None
    • Moodle Preview 3 running on PostgreSQL
    • PostgreSQL
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE
    • Easy

      Staging large Moodle 1.9.6 upgrade to 2.0 P3 generates this error when the insert fails :-

      Default exception handler: Error writing to database Debug: ERROR: value too long for type character varying(255)
      INSERT INTO mdl_wiki_links (subwikiid,frompageid,tomissingpage) VALUES($1,$2,$3) RETURNING id
      [array (
      'subwikiid' => '357',
      'frompageid' => '3101',
      'tomissingpage' => ']]=

      {0, 1, 3, 2}

      ;             //encoding pattern of a quadrature encoder:

      {00, 01, 11, 10}

      <br /><br />// From Here is the encoder read interrupt routine for encoders<br /><br />//the Interrupt service routine for Pin Change Interrupt 0.<br />ISR(PCINT0_vect){                     <br /> <br /> encoder0PINB = PINB & 0b00000011;  //select only PINB0,1  -  OTHER PINB and PIND digital pins are used for other applications, so do not want to include them in the comparison<br /> encoder2PINB = PINB & 0b00110000;  //select only PINB4,5<br /> <br /> if (encoder_sequence[[(encoder0+1)&3',
      )]

      • line 381 of /lib/dml/moodle_database.php: dml_write_exception thrown
      • line 227 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      • line 768 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      • line 821 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      • line 305 of /mod/wiki/locallib.php: call to pgsql_native_moodle_database->insert_record()
      • line 277 of /mod/wiki/locallib.php: call to wiki_refresh_page_links()
      • line 210 of /mod/wiki/db/upgrade.php: call to wiki_refresh_cachedcontent()
      • line 510 of /lib/upgradelib.php: call to xmldb_wiki_upgrade()
      • line 294 of /lib/upgradelib.php: call to upgrade_plugins_modules()
      • line 1275 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 114 of /admin/cli/upgrade.php: call to upgrade_noncore()

      Upgraded successfully after running this command to increase the field size :-

      alter table mdl_wiki_links alter column tomissingpage type char(1024);

            dongsheng Dongsheng Cai
            tlock Tim Lock
            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.