h5p / moodle-mod_hvp

H5P Plugin for Moodle
GNU General Public License v3.0
134 stars 171 forks source link

4.5 compatibility - install failure #562

Closed aspark21 closed 4 weeks ago

aspark21 commented 2 months ago
    !!! Exception - Undefined constant "MESSAGE_DEFAULT_LOGGEDIN" !!!
    !!
    Error code: generalexceptionmessage !!
    !! Stack trace: * line 37 of /mod/hvp/db/messages.php: Error thrown
    * line 692 of /lib/messagelib.php: call to require()
    * line 419 of /lib/messagelib.php: call to message_get_providers_from_file()
    * line 617 of /lib/upgradelib.php: call to message_update_providers()
    * line 891 of /lib/upgradelib.php: call to upgrade_component_updated()
    * line 645 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    * line 1931 of /lib/upgradelib.php: call to upgrade_plugins()
    * line 494 of /lib/installlib.php: call to upgrade_noncore()
    * line 492 of /lib/phpunit/classes/util.php: call to install_cli_database()
    * line 152 of /admin/tool/phpunit/cli/util.php: call to phpunit_util::install_site()
otacke commented 2 months ago

For reference: Deprecated since version 4.0 of moodle: https://github.com/moodle/moodle/blob/13c12756b4d7e85f2d2e34038216179fd287c9c2/lib/upgrade.txt#L716 and final deprecation is about to be immanent with version 4.5 to be released on 7 October 2024. Cmp. https://tracker.moodle.org/browse/MDL-73284

lkcivan commented 1 month ago

MESSAGE_DEFAULT_LOGGEDIN and MESSAGE_DEFAULT_LOGGEDOFF are now deprecated, so plugins should be updated if db/messages.php is present and replace MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF to MESSAGE_DEFAULT_ENABLED.

jmmeijer commented 1 month ago

Just got the same errors when installing 1.27 on Moodle 4.5. I've created a PR, hopefully it'll get resolved soon: https://github.com/h5p/moodle-mod_hvp/pull/566

bmackenty commented 1 month ago

This is a show stopper for an upgrade.