General plugins

Nanogong error

Picture of Pam Ridd
Nanogong error

I have just installed nanogong for Moodle 2.00 but get this error message when I attempt to upgrade from the plugins check. Hope someone can help

  • line 462 of /lib/upgradelib.php: plugin_defective_exception thrown
  • line 265 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1426 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 290 of /admin/index.php: call to upgrade_noncore()
Average of ratings: -
Picture of AL Rachels
Re: Nanogong error
Core developersParticularly helpful MoodlersPlugin developersTesters


Could you please tell us which version of Moodle, whether you were installing the activity or

the tinymce plugin, and which folder you were installing into?


Average of ratings: -
Picture of Pam Ridd
Re: Nanogong error

I have moodle 2.00 and installing both the activity module and tiny mce plugin.  I followed the instructions on the nanogong tutorial to the T.  The activity in the mod folder and the tiny mce in the lib/editor/tinymce/tiny_mce/ and I also copied and pasted the code provided in the lib/editor/tinymce/lib.php file as instructed. 

php file attached.

Average of ratings: -
Picture of AL Rachels
Re: Nanogong error
Core developersParticularly helpful MoodlersPlugin developersTesters

The Nanogong documentation shows they did extensive testing for Moodle versions 2.0.8+ and 2.1.5+ and 2.2.1+ but some folks have been having problems with them anyway.

Personally both the activity and plugin worked as advertised in my Moodle 2.3+ dev site but only the activity worked in my production 2.2.3+ site without making some changes.

To get the plugin to work I had to change the nanogong.php file in the plugin as noted by Nicolas Dunand in the release because it was not finding the other plugin files.

There have been a number of TinyMCE versions - you have my production site is 3.4.9, and my dev site is that might be the cause of the problem although I suspect it might be partially due to the changes in the site config.php file. I had to change mine for my production site to get the Nanogong filter to work.

Anyway, here is a copy of the plugin file I changed. I added line 55 and commented out 56.


Average of ratings: -
Picture of Andrus Rähni
Re: Nanogong error


I've this kind of problem. Everything worked out fine - all the installation, activity selection and adding. But problem started when I Save and return to course, it shows this message:

Debug info: Field 'message' doesn't have a default value
INSERT INTO mdl_nanogong (name,maxduration,course,timecreated) VALUES(?,?,?,?)
[array (
0 => 'NanoGong',
1 => '300',
2 => '542',
3 => 1345225867,
Stack trace:
  • line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 893 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 935 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 85 of /mod/nanogong/lib.php: call to mysqli_native_moodle_database->insert_record()
  • line 443 of /course/modedit.php: call to nanogong_add_instance()

How to fix this problem? Please help!

I have recently upgraded Moodle 1.9 to 2.2.3+ (Build: 20120519) and wanted to add nanogong 4.2.2.

Average of ratings: -
Picture of Olga M-N
Re: Nanogong error


I got the same message... I've got a fresh moodle 2.3 installation.

Is there anything I could do to make it work?

Average of ratings: -
Picture of danilo lujambio
Re: Nanogong error

Hi Andrus

Could you solve this error ?

I am working with moodle 2.4.1+ , nanogong and I am getting the same error.

Any help will be greatly appreciated



Average of ratings: -
Picture of Lee Taylor
Re: Nanogong error

Not entirely the same issue but one of our clients gets this error when they attempt to duplicate course material.....

Error reading from database

More information about this error
Debug info: Unknown column 't.intro' in 'field list'
SELECT, t.intro
FROM mdl_nanogong t
JOIN mdl_backup_ids_temp b ON b.newitemid =
WHERE b.backupid = ?
AND b.itemname = ?
[array (
0 => '2c8c79f1cf4e9aaeba3cb5e00217d0cc',
1 => 'nanogong',
Stack trace:

line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 768 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 103 of /backup/util/helper/restore_decode_content.class.php: call to mysqli_native_moodle_database->get_recordset_sql()
line 72 of /backup/util/helper/restore_decode_content.class.php: call to restore_decode_content->get_iterator()
line 81 of /backup/util/helper/restore_decode_processor.class.php: call to restore_decode_content->process()
line 423 of /backup/moodle2/restore_stepslib.php: call to restore_decode_processor->execute()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_decode_interlinks->define_execution()
line 153 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 148 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 315 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 90 of /course/modduplicate.php: call to restore_controller->execute_plan()


The site is running Moodle 2.2.4+ with nanongong version 4.2.2 Any insight would be most gratefully received.

Average of ratings: -
Picture of Lai Wei
Re: Nanogong error

Hi Pam,

I know it's a long shot, but here are my findings.

Whenever you see this error, it means that the DB tables relating to mod_nanogong are out of date. This typically means that you have tables from mod_nanogong for Moodle 1.9.

The solution is simple: just remove mod_nanogong from admin interface, and install it again. There is no code change required. After re-installation, DB tables working with mod_nanogong for Moodle 2+ will be created, and mod_nanogong will work.

Note that performing this will remove any data related to mod_nanogong for Moodle 1.9. AFAIK, there is officially no way to migrate mod_nanogong data from M1.9 to M2.



Average of ratings: -