0

I have created a plugin/webservice in moodle in my local folder in moodle, when i converted the folder to zip and then installed it; it would install correctly in local folder in moodle. Now i want to install it in the mod folder so i changed the path from local to mod everywhere in my plugin and now when i try installing i get the following error.

XML database file errors found

More information about this error

Debug info: File does not exist
Error code: ddlxmlfileerror

Stack trace:
line 346 of \lib\ddl\database_manager.php: ddl_exception thrown
line 370 of \lib\ddl\database_manager.php: call to database_manager->load_xmldb_file()
line 841 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
line 576 of \lib\upgradelib.php: call to upgrade_plugins_modules()
line 1929 of \lib\upgradelib.php: call to upgrade_plugins()
line 713 of \admin\index.php: call to upgrade_noncore()

I don't want to add anything to the database when installing my plugin, i even created an empty install.xml but i get a different error i.e.

Debug info: Errors found in XMLDB file: Missing TABLES section
Error code: ddlxmlfileerror

Can anyone provide me with a solution, Thank you in advance.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Feb 14 '22 at 12:15

1 Answers1

0

Activity plugins are not the same as local plugins.

With local plugins you can do pretty much anything you like.

But Activity plugins have a lot of requirements - including a main database table which is the same name as the plugin. So you will need to create an install.xml file.

There is documentation here on creating an activity plugin.

https://docs.moodle.org/dev/Activity_modules#install.xml

Russell England
  • 9,436
  • 1
  • 27
  • 41