jsxgraph / moodle-filter_jsxgraph

moodle plug-in for JSXGraph
https://jsxgraph.org
1 stars 6 forks source link

Error when installing together with Moodle #24

Closed t-schroeder closed 3 years ago

t-schroeder commented 3 years ago

Setting up Moodle with this plugin fails. That's because this Plugin calls set_config in its version.php. The version.php, however, gets executed during Moodle setup when the config_plugins table doesn't exist yet. That produces the error below.

Default exception handler: Table "config_plugins" does not exist Debug: Error code: ddltablenotexist

  • line 665 of /lib/dml/moodle_database.php: dml_exception thrown
  • line 1703 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
  • line 1427 of /lib/moodlelib.php: call to moodle_database->get_field()
  • line 44 of /filter/jsxgraph/version.php: call to set_config()
  • line 314 of /lib/classes/plugin_manager.php: call to include()
  • line 344 of /lib/classes/plugin_manager.php: call to core_plugin_manager->load_present_plugins()
  • line 221 of /lib/classes/plugininfo/base.php: call to core_plugin_manager->get_present_plugins()
  • line 147 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base->load_disk_version()
  • line 100 of /lib/classes/plugininfo/base.php: call to core\plugininfo\base::make_plugin_instance()
  • line 404 of /lib/classes/plugin_manager.php: call to core\plugininfo\base::get_plugins()
  • line 364 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins_of_type()
  • line 765 of /lib/classes/plugin_manager.php: call to core_plugin_manager->get_plugins()
  • line 181 of /admin/cli/install_database.php: call to core_plugin_manager->all_plugins_ok()
andreas-web commented 3 years ago

Thank you for your bug report! I've tried your constellation and I guess you want to install the filter AT THE SAME TIME with Moodle. Here I was able to reproduce the error. It will be fixed in the next version with a try-catch block (see commit 62b8f1d46baf9563dee59d22ba5ab17bf6b0061b). Anyway, this is not very advisable. The usual way to install is: First install an EMPTY moodle (then the table config_plugins also exists) and then install the plugin. Maybe that's a workaround until the new version is released. Many greetings, Andreas

t-schroeder commented 3 years ago

Hi Andreas, thanks for fixing this. Yes, that's what I meant. We noticed this when we created a new Moodle instance by copying the files of an existing one. That included all third-party plugins that we use. Except for this error there were no problems with installing everything in one go.