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

#72 didn't account for installed but not yet upgraded #73

Open
aspark21 opened this issue Dec 19, 2024 · 3 comments
Open

#72 didn't account for installed but not yet upgraded #73

aspark21 opened this issue Dec 19, 2024 · 3 comments

Comments

@aspark21
Copy link

aspark21 commented Dec 19, 2024

#72 didn't account for installed but not yet upgraded

Installed site: Moodle 4.4 & tool_abconfig latest (MOODLE_38_STABLE @ fb793c4 )
Deployed code: Moodle 4.5 & latest tool_abconfig

but following error is encountered if accessing site via web interface before upgrade is performed

Exception - Call to undefined function tool_abconfig\tool_abconfig_after_config()
Debug info:
Error code: generalexceptionmessage
Stack trace:
line 69 of /admin/tool/abconfig/classes/hook_callbacks.php: Error thrown
line ? of unknownfile: call to tool_abconfig\hook_callbacks::after_config()
line 318 of /lib/classes/hook/manager.php: call to call_user_func()
line 1199 of /lib/setup.php: call to core\hook\manager->dispatch()
line 109 of /theme/styles.php: call to require()
@djarran
Copy link
Contributor

djarran commented Dec 20, 2024

Hi @aspark21, I've updated the code in commit 6946957 that should fix this issue, not yet merged.

But I'm having issues replicating this. Here's what I've tried:

  1. install vanilla 4.4 site with tool_abconfig installed and configured
  2. updated code with vanilla 4.5, tool_abconfig still installed and configured, site upgrade not yet ran
  3. browse site

Following these steps, I'm not seeing the error. I'm definitely missing something...

@aspark21
Copy link
Author

That's how I ran into in our test sites, where it only had a minor temporary impact.

But in Staging it seems to have gone a bit more problematic than that (WR449037) - preventing the cli upgrade from running and the site being completely unusable from the web interface,

Admittedly I only did this in sites with full data & 100s of other plugins, not vanilla but I'm not sure what would make it worse

@aspark21
Copy link
Author

Ah, so one way to trigger it is to try to enable maintenance mode via CLI it seems. Unfortunately, that was still occurring with the draft fix.

php admin/cli/maintenance.php --enable
!!! Exception - Call to undefined function tool_abconfig\tool_abconfig_after_config() !!!

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

2 participants