Skip to content

Update from 4.1 to 4.5 failed (version 1.5.8) #147

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

Open
sennewood opened this issue Apr 7, 2025 · 3 comments
Open

Update from 4.1 to 4.5 failed (version 1.5.8) #147

sennewood opened this issue Apr 7, 2025 · 3 comments

Comments

@sennewood
Copy link

Moodle Version in use
4.1.17

Plugin Version
1.5.8 (2025032400)

Describe the bug
While updating moodle from 4.1 to 4.5, this messages ends our update process:

-->message_airnotifier
Database transaction aborted automatically in /var/www/moodle_4.05/admin/cli/upgrade.php
Default exception handler: Fehler: Undefined constant "MESSAGE_DEFAULT_LOGGEDIN" Debug:
Error code: generalexceptionmessage
* 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()

!!! 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()
 !!

To Reproduce
Steps to reproduce the behavior:

  1. download and unzip moodle 4.5
  2. copy plugins, themes, config.php, etc. from 4.1 into 4.5 directories
  3. run admin/cli/upgrade.php --non-interactive
  4. see error

Expected behavior
An update from moodle 4.1 to 4.5 without errors.

Desktop (please complete the following information):

  • OS: Win 11
  • Browser: Firefox

Additional context
Instead of copying the old folder from 4.1 we also tried to use directly version 2025032500 before running the upgrade.php, but the result is the same.

@Amrita1991
Copy link
Contributor

Amrita1991 commented Apr 29, 2025

MESSAGE_DEFAULT_LOGGEDIN has been deprecated in 4.5 and replaced by MESSAGE_DEFAULT_ENABLED which is correctly reflected here.

Please check if you are pulling your code from the correct branch

UPDATE
You can either:

  1. update pdfannotator and then your moodle OR
  2. update both simultaneously

@sennewood
Copy link
Author

We pull the code from here: https://moodle.org/plugins/mod_pdfannotator/versions - I don't know which branch is used there.

@Amrita1991
Copy link
Contributor

Amrita1991 commented May 6, 2025

The version you mentioned v1.5.8(2025032400) is for Moodle 4.0-4.3.x
Since you are upgrading to Moodle 4.5 the correct version for you will be v1.5.8(2025032500)

Although both have the same release number v1.5.8 the latter's icon conforms to 4.5 regulation and deprecated functions and constants (like MESSAGE_DEFAULT_LOGGEDIN) have been substituted.

Have you updated PDFAnnotator to 2025032500 and then upgraded your moodle to 4.5?

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