Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin causes error during install on Moodle 4.1 #135

Open
cwarwicker opened this issue Jun 16, 2023 · 2 comments
Open

Plugin causes error during install on Moodle 4.1 #135

cwarwicker opened this issue Jun 16, 2023 · 2 comments

Comments

@cwarwicker
Copy link

!!! Cannot be executed during upgrade !!!
!! 
Error code: cannotexecduringupgrade !!
!! Stack trace: * line 1464 of /lib/setuplib.php: moodle_exception thrown
* line 2569 of /lib/modinfolib.php: call to upgrade_ensure_not_running()
* line 590 of /course/lib.php: call to get_fast_modinfo()
* line 633 of /course/lib.php: call to course_create_sections_if_missing()
* line 22 of /mod/oublog/settings.php: call to course_add_cm_to_section()
* line 158 of /lib/classes/plugininfo/mod.php: call to include()
* line 47 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
* line 8780 of /lib/adminlib.php: call to require()
* line 8810 of /lib/adminlib.php: call to admin_get_root()
* line 281 of /admin/cli/upgrade.php: call to admin_apply_default_settings()
 !!

This is due to the "Dodgy hack to setup the global blog instance (section not created yet on install)." on line 17 of settings.php

@sammarshallou
Copy link
Member

sammarshallou commented Jul 3, 2023

Yeah. Um, we're running 4.1 but I guess this doesn't break because we already installed it... Not quite sure why it doesn't break Behat tests etc, perhaps it's ok if you install the whole system together and only fails if you have the system installed but not oublog yet.

The code should probably be changed so that if it needs to do part of creation after install, it does so with an ad-hoc task. (Maybe just do the whole thing as ad-hoc task instead of the weird split it seems to have at the moment.)

I've filed an issue #695254 in our internal tracking system, it's not my team so I don't know when it might get fixed.

@MichaelReyesCatcan
Copy link

MichaelReyesCatcan commented Sep 13, 2024

Merge request for MOODLE_401_STABLE. To transfer it into a adhoc task

#146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants