Help please! I cannot update my site, and there are constant database errors. As far as I can tell, this began in April 2024, when I tried to install UNA Classes from the Apps store. We were not able to fix the issue completely, there were still errors, but the site worked despite the errors so I decided to hold off trying to fix it further until 14.0.0 stable was released.
Now I am trying to update from 14.0.0-B2 to 14.0.0 through the beta channel. But when I try to update the site, the site does not update, and no new lines are created in updates.log. Instead, a new message appears in sys_modules.log:
Jan 18 03:02:01 [0] CRON :
[upgrade] Cannot get a list of modules which require to be updated.
Auto-update is enabled, so there are about 2,000 lines of this, as every auto-update since July of 2024 has failed!
I believe that this is occurring because of the database errors related to Classes. When I tried to install it from the App store the install failed, but parts of Classes were added. The constant database errors occur when UNA tries to find something classes-related, but can't, here is an example:
Jan 10 19:52:23 [4] /searchExtended.php?action=get_mention&symbol=%23&term=ir&i=text&f=bx_timeline_post&fi=&m=bx_timeline Database query error
Error: Table 'indiesel_una566.bx_classes_meta_keywords' doesn't exist
Query: SELECT `object_id`, `keyword` FROM `bx_classes_meta_keywords` WHERE `keyword` LIKE ? ORDER BY CHAR_LENGTH(`keyword`) DESC
Account ID: 3
This morning I thought, well, the update is failing because parts of Classes are installed and parts of Classes are not installed, so maybe I can just try to install Classes from the Apps module and see if it works now. I tried that, and I was able to download it, but at the install step I get a forever spinning icon. I checked and there is a new error in sys_db.log:
Jan 18 11:12:27 [1] /studio/store.php Database query error
Error: Duplicate entry 'bx_classes-added' for key 'alert'
Query: INSERT INTO
`bx_timeline_handlers`
SET
`group`=?,
`type`=?,
`alert_unit`=?,
`alert_action`=?,
`content`=?,
`privacy`=?
Account ID: 1
It's a catch 22! I can't update without having my list of active modules match what UNA thinks they should be, but I can't get Classes installed because the system thinks I have it already.
Before when we tried to fix this, we were going to be using the UNA site to host a virtual convention in a week, so I was in a huge hurry to just get it functional for the 200-ish people attending the convention. Now there is no rush. What do I need to do to get the site working and error free, ideally with the Classes app installed (love the functionality it adds to Groups)?
- 110
Just sharing an update (thanks for the help @Leonid S !) The issue turned out to be the Cron job trying to use an outdated version of PHP. The fix was going to cron jobs, and modifying the command to use the current PhP version (change "/local/php74/bin/" to "/local/php83/bin/").
If you find this discussion while trying to troubleshoot update issues, here is my task-list and notes for applying an update:
First, create a backup. Check PhP version, update if necessary!
Go to Una Studio/Dashboard and do a server audit. Make sure everything says OK!
If in the beta channel, the update will happen one release at a time. If in the stable channel, you are able to update from one stable release to the next stable release.
Go to direct-admin/cpanel and raise PhP limits temporarily:
Click the update button, then go to file manager and public_html/logs. The log for the update (if applied) will appear in upgrade.log. When the update fails, a new log appears in sys_modules.
If the update fails, check the cron job to make sure the php matches the php version the site is using, IE:
/usr/local/php83/bin/php -q /home/(site address)/cron.php