Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
CannonFolly Posted May 6, 2023 Posted May 6, 2023 (edited) Webhost switched site to php8 from php7.4 which broke forums. Was running version 4.2 which was only compatible with php7 when I went to 8 just got a white screen. Switched back and it all worked fine. Reading around realized I needed a version of forums compatible with php8 so I upgraded and downloaded the files for a manual upgrade since I can't upgrade thru the admin panel. I ran the compatibility check and it reported no errors. Started manual upgrade and everything goes fine at first until I get the following error which seems to be related to the database? Need some help, I've tried retry and continue and both options reproduce this error and halt the upgrade. Edit: Also, I have no plugins Edited May 6, 2023 by CannonFolly spelling, note about plugins
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 (edited) Also not sure if this will help or not, but it points to this file in the upgrade directory and seems to reference line 58 which is highlighted in the attached image. Also attached message when visiting site since update is in progress Edited May 6, 2023 by CannonFolly
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Error seems to be evolving. I left the page for a while, came back reloaded and went back thru. Did this several times eventually after some time it changed to the attached and is still stuck again. I also went and checked my database in phpmyadmin (I don't know what I'm doing, but trying to follow that log) The message reads like it is trying to modify the database and drop a column called pf_admin_only. However, that column does not exist in that specific table according to phpmyadmin
Adlago Posted May 6, 2023 Posted May 6, 2023 When you flashed back the 7.x PHP and restored your forum, it was OK. right? After downloading ips 4.7.9 files, and upload it, you should change php to 8.x and then run update.
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Thanks for replying, Yes when I went back to php7.4 it was ok, no errors and functioning like normal. I then downloaded the files and manually uploaded them via SFTP. I also moved back to php8.1. After that I started the upgrade and this is when I encountered the message. I also checked that compatibility file again before starting the upgrade and everything was green as shown in the first image.
Adlago Posted May 6, 2023 Posted May 6, 2023 Open your PhPMyAdmin - your database, open menu SQL Copy the last line in the red message, and paste in Then Go. Once done, repeat site/admin/upgrade CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 (edited) I get the following error in phpmyadmin Edit: Also, not sure if this is related, but any reason why my database backups vary in size so much? There were no additional posts/uplaods/etc... to my knowledge. I haven't restored any of those backups btw. Also after query failed same error persists between some of those dates. Edited May 6, 2023 by CannonFolly Edit for additional context on database size?
Adlago Posted May 6, 2023 Posted May 6, 2023 Try this: In this command, replace DROP with ADD This will create the missing column, then upgrader will successfully remove it. I.e. After successfully creating it, run upgrader CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Something about my syntax is wrong: ALTER TABLE `ibf_core_pfields_data` ADD COLUMN `pf_admin_only`; Reports: Error SQL query: Copy ALTER TABLE `ibf_core_pfields_data` ADD COLUMN `pf_admin_only`; MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 I tried changing the apostrophes as well
Adlago Posted May 6, 2023 Posted May 6, 2023 Try this ALTER TABLE ibf_core_pfields_data ADD pf_admin_only varchar(255); CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 (edited) Oh dear, it's evolving further. So that query worked and then that specific error went away on the upgrade, but it brought up a new one now. How screwed up is my database!?!?? Don't really get it since it was working fine on php7.4 This one says there is a duplicate entry. I don't see this specific table in phpmyadmin. I see the table, but without the "PRIMARY" at the end. Forgot the error message Edited May 6, 2023 by CannonFolly
Adlago Posted May 6, 2023 Posted May 6, 2023 (edited) Copy and Go this command in SQL Edited May 6, 2023 by Adlago CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 (edited) Edited May 6, 2023 by CannonFolly Syntax?
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 The command went thru and inserted 1 row, but the same error persists Table after query:
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 I went to that upgrade file and then found those lines around 160 foreach ( array( 'new_reg_notify' => 'core_NewRegComplete', 'spm_notify' => 'core_Spammer', 'error_notify_level' => 'core_Error' ) as $settingKey => $notificationKey ) { if ( \IPS\Settings::i()->$settingKey ) { $member = \IPS\Member::load( \IPS\Settings::i()->email_in, 'email' ); if ( $member->member_id ) { \IPS\Db::i()->insert( 'core_acp_notifications_preferences', array( 'member' => $member->member_id, 'type' => $notificationKey, 'view' => 1, 'email' => 'always' ) ); } } }
Adlago Posted May 6, 2023 Posted May 6, 2023 (edited) Try (1,core_NewVersion,1,always) Edited May 6, 2023 by Adlago CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Error persists, I also tried to change "core_NewVersion" to something like "core_4.7" and the error also persisted
Adlago Posted May 6, 2023 Posted May 6, 2023 This is my table Create a row you are missing CannonFolly 1
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Ok, I may have briefly clicked into the wrong table and got into "ibf_core_acp_notifications" instead of ibf_core_acp_notifications_preferences" briefly Would you mind double checking your ibf_core_acp_notifications and comparing it to mine to make sure I didn't remove anything I shouldn't? I went back and made my table look like yours for the Preferences version and it got rid of that error and moved onto another one. This table looks like this for me:
CannonFolly Posted May 6, 2023 Author Posted May 6, 2023 Ok I have a quick update. I went thru that table all the rows and got to the very end. I deleted the favicon row (bye my little icon) and then it threw another one for a favicon share one. I deleted that too. Then the favicon error message came back and I deleted it again. This has let the upgrade proceed a little more. It's currently going thru "Upgrading Database" so fingers crossed. Well that success was rather short lived... now I'm just sad 😞
Recommended Posts