Database update script fails (4.3.0 to 4.3.1 and 4.3.5)

If you aren't speaking german, you can ask for support or post your request here.
Antworten
rjwhite
Beiträge: 6
Registriert: 7. Mär 2024, 02:09

Database update script fails (4.3.0 to 4.3.1 and 4.3.5)

Beitrag von rjwhite »

I use the Softaculous app installer in cPanel at my hosting site. I used it to upgrade from Admidio 4.3.0 to 4.3.1, which brought me to the usual request to update the database, which failed. I left the problem unsolved for a few weeks, and today I upgraded again to version 4.3.5, hoping the problem was temporary, but the same error occurred.

https://.../members/adm_program/ reports:

Code: Alles auswählen

Admidio - Update
The database version 4.3.0 is lower than the version of the Admidio scripts 4.3.5.
Please perform database update to version .
Clicking on "database update" (not "Next") leads to https://.../members/adm_program/installation/update.php which reports:

Code: Alles auswählen

Welcome to the Admidio update
You have already updated the directories of Admidio with a new version. Now the database has to 
be updated from the current version 4.3.0 to the version 4.3.5, so that Admidio can run with the new 
version.
If you have questions or problems with the update, please check our update instruction or contact 
our support forum.
Current database version: 4.3.0
Database version after update: 4.3.5
Clicking on "Update database" leads to https://.../members/adm_program/installation/update.php?mode=2

Code: Alles auswählen

S C R I P T - E R R O R
An error occured within the update script. Please visit our support forum https://www.admidio.org/forum and provide the following information.
VERSION: 4.3.0
STEP: 1080
MESSAGE: No Category with the given uuid 2 was found in the database.

B A C K T R A C E
0 /home/.../public_html/members/adm_program/system/classes/ComponentUpdateSteps.php(68): TableUserField->setValue('usf_cat_id', '2')
1 /home/.../public_html/members/adm_program/system/classes/ComponentUpdate.php(124): ComponentUpdateSteps::updateStep43AddSocialNetworkProfileFields()
2 /home/.../public_html/members/adm_program/system/classes/ComponentUpdate.php(171): ComponentUpdate::executeUpdateMethod('ComponentUpdate...')
3 /home/.../public_html/members/adm_program/system/classes/ComponentUpdate.php(266): ComponentUpdate->executeStep(Object(SimpleXMLElement), '4.3.0')
4 /home/.../public_html/members/adm_program/system/classes/Update.php(90): ComponentUpdate->update('4.3.5')
5 /home/.../public_html/members/adm_program/installation/update.php(300): Update->doAdmidioUpdate('4.3.0')
6 {main}
The error_log file contains:

Code: Alles auswählen

[30-Jan-2024 23:40:29 Europe/London] [2024-01-30 23:40:29.560621] Admidio.ERROR: L10N: Could not found text-id! {"textId":"SYS_EMAIL_DESC"} {"file":"/home/.../public_html/members/adm_program/system/classes/Language.php","line":115,"class":"Language","callType":"->","function":"get"}

[30-Jan-2024 23:59:25 Europe/London] [2024-01-30 23:59:25.839148] Admidio.ERROR: L10N: Could not found text-id! {"textId":"SYS_EMAIL_DESC"} {"file":"/home/.../public_html/members/adm_program/system/classes/Language.php","line":115,"class":"Language","callType":"->","function":"get"}

[06-Mar-2024 22:24:16 Europe/London] [2024-03-06 22:24:16.007884] Admidio.ERROR: L10N: Could not found text-id! {"textId":"SYS_EMAIL_DESC"} {"file":"/home/.../public_html/members/adm_program/system/classes/Language.php","line":115,"class":"Language","callType":"->","function":"get"}
UPDATE 1:
After noticing a reference to enabling debug mode in viewtopic.php?t=9896, I added the line $gDebug = true to adm_my_files/config.php. After another attempt to convert the database, I noticed that there are several error_log files, but the one which changed was adm_program/error_log which contains:

Code: Alles auswählen

[06-Mar-2024 23:52:53 Europe/London] [2024-03-06 23:52:53.432652] Admidio.ERROR: L10N: Could not found text-id! {"textId":"SYS_EMAIL_DESC"} {"file":"/home/sabgtk/public_html/members/adm_program/system/classes/Language.php","line":115,"class":"Language","callType":"->","function":"get"}

[09-Mar-2024 11:46:11 Europe/London] [2024-03-09 11:46:11.050129] Admidio.ERROR: L10N: Could not found text-id! {"textId":"SYS_EMAIL_DESC"} {"file":"/home/sabgtk/public_html/members/adm_program/system/classes/Language.php","line":115,"class":"Language","callType":"->","function":"get"}
with no apparent additional debugging information.

UPDATE 2:
I have got my installation working temporarily by manually reverting adm_program to version 4.3.0, thus avoiding the need to update the database. However, it would be good to know how to return to the mainstream versions as they are released.

I have made an SQL dump of the database for safety and in case it contains information which might help to solve the problem. Any help would be gratefully received. Thank you.
Benutzeravatar
fasse
Administrator
Beiträge: 6182
Registriert: 12. Nov 2005, 16:06

Re: Database update script fails (4.3.0 to 4.3.1 and 4.3.5)

Beitrag von fasse »

Thanks for the detailed error description.
I think I found the problem why your system doesn't want to update properly.

Could you replace the extracted file within the folder adm_program/system/classes and than retry the update.
Dateianhänge
ComponentUpdateSteps.php.zip
(10.66 KiB) 393-mal heruntergeladen
mtn
Beiträge: 5
Registriert: 1. Mai 2014, 21:57

Re: Database update script fails (4.3.0 to 4.3.1 and 4.3.5)

Beitrag von mtn »

fasse hat geschrieben: 16. Mär 2024, 08:22 Thanks for the detailed error description.
I think I found the problem why your system doesn't want to update properly.

Could you replace the extracted file within the folder adm_program/system/classes and than retry the update.
I'm not the OP, but faced a similar error. I replaced the file as instructed and the database was sucessfully updated!
Thank you
rjwhite
Beiträge: 6
Registriert: 7. Mär 2024, 02:09

Re: Database update script fails (4.3.0 to 4.3.1 and 4.3.5)

Beitrag von rjwhite »

Sorry about the delayed response.
The ComponentUpdateSteps.php fix worked perfectly. :)
Danke schön, Markus - I've "bought you a coffee" (oder Bier!)
Good to see that your response benefitted another user (mtn) as well.

Just for the record, in case it helps anyone else, the steps I performed were:

First I made some backups:
  • Using my hosting service's File Manager (or, more conveniently, mounting the web-space locally using ''sshfs''), I copied the installation folder ''public_html/members'' (yours may have a different name) to a new folder I named ''public_html/members-4.3.0-saved-20240322''[/li]
  • Using the hosting service's phpMyAdmin, I exported the current database (v.4.3.0) ''<prefix>_admidio'' to ''<prefix>_admidio-20240322.sql''[/li]
  • Using Admidio itself, I backed up the current database (v.4.3.0) to ''db_backup.2024-03-22.215933.sql.gz'' (in addition to the previous step, for extra safety)[/li]
Then, following the instructions here: https://www.admidio.org/dokuwiki/doku.p ... 2.0:update, I updated the installation folder ''members'' to v.4.3.5. In summary:
  • I downloaded Admidio (''admidio-4.3.5.zip'' was the latest when downloaded on 16/03/2024) from http://www.admidio.org/download.php?language=en and unzipped (I used ''mc'').
  • I deleted the directory ''adm_program'' and the file ''index.php'' on my Admidio webspace.
  • I copied the unzipped directory ''adm_program'' including all files and subfolders as well as the file ''index.php'' to my webspace in the Admidio main directory (''public_html/members/'').
  • I copied the entire contents of ''adm_plugins/'' (I think no local changes had been made)
  • I copied the entire contents of ''adm_themes/'' (I think no local changes had been made, but "[Had] you made changes to a few files, then you can update the unchanged files and customize the other file with help from our change history for themes (https://www.admidio.org/dokuwiki/doku.p ... _themes_43)."
  • I replaced ''ComponentUpdateSteps.php'' in the installation folder ''members/adm_program/system/classes/'' with the supplied version (from Markus's post above - beware this may not be correct for other users or other Admidio versions)
NOTE:
  • ''adm_my_files/'' will still contain the essential original ''config.php'' file describing the installation details.
  • Following the instructions mentioned above, just going to the server's Admidio installation web page was sufficient to run the database update script, which successfully converted the database from version 4.3.0 to version 4.3.5.
Furthermore (after repeating the backup steps again, just to be safe), the Softaculous package updater used by my hosting provider upgraded version 4.3.5 to the latest 4.3.6, running the database upgrade script successfully (after receiving "The following problem has occurred when processing the data. Invalid or missing CSRF token!" which seems to happen quite often. I think it's a hosting issue, not Admidio, but can be resolved by reloading the page).
Antworten