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

Call to undefined method cache_disabled::check_lock_state() on install #129

Open
sharpchi opened this issue Dec 7, 2022 · 1 comment
Open

Comments

@sharpchi
Copy link

sharpchi commented Dec 7, 2022

When running php admin/tool/phpunit/cli/init.php
I get the above error. The stack trace leads back to a oublog settings "hack" -

// Dodgy hack to setup the global blog instance (section not created yet on install).

This seems to be failing because of a recent update to Moodle: moodle/moodle@ea01fb2

Commenting out the oublog "hack" enabled installation to continue.

Moodle 4.1, PHP 8.0, MOODLE_311_STABLE branch of this plugin

Stack trace:
Default exception handler: Exception - Call to undefined method cache_disabled::check_lock_state() Debug:
Error code: generalexceptionmessage

  • line 670 of /lib/modinfolib.php: Error thrown
  • line 649 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()
  • line 478 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()
  • line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()
  • line 2532 of /lib/modinfolib.php: call to course_modinfo::instance()
  • line 589 of /course/lib.php: call to get_fast_modinfo()
  • line 632 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 140 of /lib/classes/plugininfo/mod.php: call to include()
  • line 47 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
  • line 8831 of /lib/adminlib.php: call to require()
  • line 8857 of /lib/adminlib.php: call to admin_get_root()
  • line 522 of /lib/installlib.php: call to admin_apply_default_settings()
  • line 468 of /lib/phpunit/classes/util.php: call to install_cli_database()
  • line 150 of /admin/tool/phpunit/cli/util.php: call to phpunit_util::install_site()

!!! Exception - Call to undefined method cache_disabled::check_lock_state() !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 670 of /lib/modinfolib.php: Error thrown

  • line 649 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()
  • line 478 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()
  • line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()
  • line 2532 of /lib/modinfolib.php: call to course_modinfo::instance()
  • line 589 of /course/lib.php: call to get_fast_modinfo()
  • line 632 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 140 of /lib/classes/plugininfo/mod.php: call to include()
  • line 47 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
  • line 8831 of /lib/adminlib.php: call to require()
  • line 8857 of /lib/adminlib.php: call to admin_get_root()
  • line 522 of /lib/installlib.php: call to admin_apply_default_settings()
  • line 468 of /lib/phpunit/classes/util.php: call to install_cli_database()
  • line 150 of /admin/tool/phpunit/cli/util.php: call to phpunit_util::install_site()
    !!
@marxjohnson
Copy link

This is due to a core bug https://tracker.moodle.org/browse/MDL-76745

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