Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 3Mar 3 I’m trying to upgrade my self-hosted Invision Community to v5 (my forums are currently down), but I’m stuck on the database character set requirement. I keep getting this error:“Your database character set is not using a 4-Byte UTF-8. You must convert your database to utf8mb4 in order to continue.”However, I’ve already taken the following steps:1. Converted all tables to utf8mb4_unicode_ci by running:ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;• I confirmed this by running:SELECT TABLE_NAME, TABLE_COLLATION FROM information_schema.TABLES WHERE TABLE_SCHEMA = ‘my_database_name’;• All tables are now utf8mb4_unicode_ci.2. Checked individual columns to ensure no latin1 or utf8 columns exist:SELECT TABLE_NAME, COLUMN_NAME, CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘my_database_name’ AND CHARACTER_SET_NAME != ‘utf8mb4’;• This returned zero results, confirming all columns are already utf8mb4.3. Checked the database default character set using:SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = ‘my_database_name’;• It still shows latin1, and GoDaddy blocks me from running:ALTER DATABASE my_database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;• GoDaddy support refuses to update it manually.4. Attempted to force the upgrade by adding this to conf_global.php:‘force_utf8mb4’ => true• But the error persists.My Hosting Setup• Hosting Provider: GoDaddy (cPanel)• PHP Version: 8.2 (can upgrade to 8.4 if needed)• MySQL Version: 10.6.20-MariaDB• Self-hosted licenseMy Questions1. Why is Invision still detecting an issue when all tables and columns are already utf8mb4?2. Does Invision v5 require the database default charset to be utf8mb4, even if all tables/columns are correct?3. Is there another way to bypass this check if my host won’t allow ALTER DATABASE?I’d appreciate any insights or suggestions from those who have upgraded to v5. Thanks in advance! Edited March 3Mar 3 by mr_hopp
March 4Mar 4 Author Anyone? I've felt like I've tried everything and still getting that same error message ...What's frustrating is that there wasn't anything about this when I ran the compatibility checker before and it all checked out. It was only after I started the upgrade procedure that I got this error and was unable to proceed. So now I'm stuck. :( Edited March 4Mar 4 by mr_hopp
March 4Mar 4 Author Okay, I finally got that one to work, but now I'm running into an issue with a table error:Table 'invisionNEWigoxXyA6BLXXX.core_social_promote' doesn't existBut I created the core_social_promote table manually as suggested. Here’s the structure I used:CREATE TABLE core_social_promote ( promote_id INT(11) NOT NULL AUTO_INCREMENT, member_id INT(11) NOT NULL, promote_date DATETIME NOT NULL, promote_data TEXT NOT NULL, PRIMARY KEY (promote_id));However, the issue still persists, and I’m unable to proceed with the upgrade. It seems that the upgrade script is still unable to recognize the existence of the table. Could you kindly provide further guidance on how to resolve this issue? I’m unsure why the system isn’t recognizing the table even after I’ve manually created it.
March 4Mar 4 Author Actually, every time I go to try the upgrade procedure again, it seems to delete the table, then it gives me the error again:Table 'invisionNEWigoxXyA6BLXXX.core_social_promote' doesn't existSo I keep creating the core_social_promote table manually as suggested. So I feel like a dog chasing his own tail over here; I’m unable to proceed with the upgrade. Totally stuck!How can I fix this? For what it's worth, I don't even need the social promote functionality on my forums anyway.
March 4Mar 4 Once you get to the point you want to try this again, you need to convert to UTF8 from the support area in your admin CP, before you start uploading any files or anything like that. Also ensure you are upgraded to the latest release of 4. Once you have done both those things, then try again with the upgrade.
March 4Mar 4 Don't convert the tables through direct queries. Invision Community includes a tool to convert the data to UTF8MB4, and it even has a CLI script you can run from the command line.Restore a backup and then use that tool. You can find it in the folder /admin/convertutf8.It will guide you through all the required steps and even provide instructions on how to update your conf_global.php file to get the forum to recognize the new charset. Edited March 4Mar 4 by teraßyte
March 5Mar 5 Author Okay thanks @Marc! I restored from backup and went into the support area of the admin CP, but it says there are no issues identified with the database?Also, thanks for the heads up @teraßyte , I just checked it out and it says I should be good to go ... so I don't understand why I was getting that error when I went through the v5 upgrade? Edited March 5Mar 5 by mr_hopp
March 5Mar 5 14 minutes ago, mr_hopp said:Also, thanks for the heads up @teraßyte , I just checked it out and it says I should be good to go ... so I don't understand why I was getting that error when I went through the v5 upgrade?Not sure. 🤷♂️Do you also have the correct variables in the conf_global.php file?'sql_charset' => 'utf8mb4', 'sql_utf8mb4' => true,If you still get the same error you can force a re-conversion using the CLI script. That should fix it once and for all.
March 5Mar 5 Author Thanks for all your help! I just updated the patch so running the latest version — 4.7.20 — and it looks like everything else is good to go. See the screenshot at bottom. Only recommendations are 1) Status updates have been removed in v5 and 2) Open tagging has been replaced with a new system in v5 (neither of which I need).So now the next step to upgrade to v5 would be the following, right? (Forgive me, I'm not a database guy and not technically savvy in this arena, so just trying to scrape by here — thanks to your help!)Here's my list I'll follow:Backup Everything: I will make sure that both my website files and database are fully backed up beforehand.Delete Old Files: I will delete all existing files from the root of my Invision Forums folder so there are no conflicts with the new v5 files.Upload v5 Files: After deleting the old files, I will upload and expand the new Invision Community v5 zip file into the root of my Invision Forums folder. Update conf_global.php: I'll update the conf_global.php file with my database details and add the following two lines to enable UTF-8 conversion (thanks @teraßyte!):'sql_charset' => 'utf8mb4', 'sql_utf8mb4' => true,Visit the /admin/upgrade Page: Once the files and configuration are updated, I will visit the /admin/upgrade page in my forum and hopefully there will be no issues like last time!Upload New v5 Theme: After the upgrade process completes, I will upload the new theme file created by my developer specifically for v5. If any UTF-8 conversion issues are still there after the upgrade, I can run the CLI script at "/admin/convertutf8" (to force the re-conversion). After this is settled, I'll delete the "constants.php" file in the UTF8Converter folder.Permissions Check: After upgrade is complete, I will make sure the permissions for files and folders are set correctly (e.g., 755 for folders, 644 for files) to avoid potential access issues.Am I missing anything or do I have anything wrong?
March 6Mar 6 Author @Marc Does my list above look right? I’m just a bit paranoid after the first upgrade not working, so want to be as sure as I can I have everything covered before diving back in. 😅 Thank you! Edited March 6Mar 6 by mr_hopp
March 6Mar 6 Author Thanks for setting my mind at ease, @Marc!By the way, is this normal behavior? And is it okay that when I get that 502 error every now and again that it continues from there? (It's currently at &mr=250 so I don't know how long this is supposed to take — I guess each one of these is a table it's upgrading in the database?) Edited March 6Mar 6 by mr_hopp
March 6Mar 6 Author Okay, that resolved just fine and the forums look to be back up! Thanks so much for all your help!
March 6Mar 6 Author @Marc Why is a broken image link showing where the like image should be? How to fix? Edited March 6Mar 6 by mr_hopp
March 6Mar 6 3 minutes ago, mr_hopp said:@Marc Why is a broken image link showing where the like image should be? How to fix?You would need to ensure that the image exists on your server and was properly transferred if you did any kind of server transfer/move.
March 6Mar 6 Author Yeah, for some reason the "reactions" folder wasn't in uploads. Works now. Thanks!
March 6Mar 6 Author @Marc @Jim M Now I'm getting a message saying I should upgrade from PHP 8.1 on my server to 8.2, but when I go into my GoDaddy hosting account and change it to 8.2, my website gives a 500 error. When I switch back to 8.1, it's back up again. What's the most likely cause of this and how can I fix it so I can move to 8.2?
March 6Mar 6 Just now, mr_hopp said:@Marc @Jim M Now I'm getting a message saying I should upgrade from PHP 8.1 on my server to 8.2, but when I go into my GoDaddy hosting account and change it to 8.2, my website gives a 500 error. When I switch back to 8.1, it's back up again. What's the most likely cause of this and how can I fix it so I can move to 8.2?You would need to ensure that PHP 8.2 has all modules required using the requirements checker:
March 6Mar 6 This is due to you ran it on PHP 8.1. Everything is working for you there. You need to run it on PHP 8.2
March 6Mar 6 Author @Jim M But when I switch to 8.2 then run it, I get a 500 error. Edited March 6Mar 6 by mr_hopp
March 6Mar 6 You would need to investigate the 500 internal server error with your hosting provider then by fetching the server error log entry from your server.