rwthmoodle / moodle-mod_pdfannotator

PDF Annotation Tool
19 stars 24 forks source link

MESSAGE_DEFAULT_LOGGEDOFF / MESSAGE_DEFAULT_LOGGEDIN final deprecation in Moodle 4.5 #118

Open nomisge opened 1 month ago

nomisge commented 1 month ago

In Moodle 4.5 MESSAGE_DEFAULT_LOGGEDOFF / MESSAGE_DEFAULT_LOGGEDIN have been finally deprecated. Following Code will not work any more:

https://github.com/rwthmoodle/moodle-mod_pdfannotator/blob/ef34c0eecf289ca48bc1712c713f3dc1bf4f0c1e/db/messages.php#L34

The fix is supposedly easy: Change MESSAGE_DEFAULT_LOGGEDIN + MESSAGE_DEFAULT_LOGGEDOFF to MESSAGE_DEFAULT_ENABLED

slaudel commented 2 weeks ago

When trying to upgrade my testsystem from 4.4 to 4.5 I'm getting the following error message:

-->message_airnotifier
!!! Fehler: Undefined constant "MESSAGE_DEFAULT_LOGGEDIN" !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 34 of /mod/pdfannotator/db/messages.php: Error thrown
* line 692 of /lib/messagelib.php: call to require()
* line 487 of /lib/messagelib.php: call to message_get_providers_from_file()
* line 629 of /lib/upgradelib.php: call to message_update_processors()
* line 771 of /lib/upgradelib.php: call to upgrade_component_updated()
* line 1937 of /lib/upgradelib.php: call to upgrade_plugins()
* line 274 of /admin/cli/upgrade.php: call to upgrade_noncore()
 !!
++ Failed to connect to Redis at localhost:6379, the error returned was: Cannot assign requested address ++
* line 344 of /cache/stores/redis/lib.php: call to debugging()
* line 206 of /cache/stores/redis/lib.php: call to cachestore_redis->new_redis()
* line 575 of /cache/classes/helper.php: call to cachestore_redis->__construct()
* line 540 of /cache/classes/helper.php: call to core_cache\helper::purge_store()
* line 1596 of /lib/upgradelib.php: call to core_cache\helper::purge_all()
* line 1575 of /lib/upgradelib.php: call to upgrade_finished()
* line 162 of /lib/classes/shutdown_manager.php: call to upgrade_finished_handler()
* line ? of unknownfile: call to core_shutdown_manager::shutdown_handler()

I think this error is related to this issue?

nomisge commented 2 weeks ago

Yes it is. Thats why I already open https://github.com/rwthmoodle/moodle-mod_pdfannotator/pull/119#issue-2582721077, that successfully fixes it on my system. Hasn't been merged yet...