Problem upgrading from 1.9.8 to 2.0.3 - Data too long for column 'intro' at row 1

Problem upgrading from 1.9.8 to 2.0.3 - Data too long for column 'intro' at row 1

by Daniel Tran -
Number of replies: 2

Hi,

I'm in the process of upgrading from 1.9.8 to 2.0.3.  I'm encountering this error:

mod_forum

Debug info: Data too long for column 'intro' at row 1
UPDATE mdl_forum SET intro = ?,introformat = ? WHERE id=?

...

....

...

Stack trace:
  • line 394 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 980 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1012 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
  • line 232 of /mod/forum/db/upgrade.php: call to mysqli_native_moodle_database->update_record()
  • line 526 of /lib/upgradelib.php: call to xmldb_forum_upgrade()
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1425 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 311 of /admin/index.php: call to upgrade_noncore()

 

I found a  somewhat similar thread here:  http://moodle.org/mod/forum/discuss.php?d=158870 . Any idea how to fix this ?

OS = CentOS 5.5, mysql = 5.5.12, php = 5.3.6

 

Average of ratings: -
In reply to Daniel Tran

Re: Problem upgrading from 1.9.8 to 2.0.3 - Data too long for column 'intro' at row 1

by Daniel Tran -

After looking at the other thread mentioned above and looking at http://fisheye.moodle.org/changelog/Moodle?cs=7f38a28d41ef2442220cbfad871f9fcccca5f5bd#libZ002fdbZ002finstall.xml

We proceeded to change the database manually in an attempt to get past that error.  We changed the length of the intro field in mdl_forum table.  We changed it from text to longtext as:

alter table mdl_forum change `intro` `intro` longtext NOT NULL;

After that, we we able to continue with the upgrade.

Average of ratings: Useful (1)
In reply to Daniel Tran

Re: Problem upgrading from 1.9.8 to 2.0.3 - Data too long for column 'intro' at row 1

by Alex Jal -

Thank you 

This saved me