Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

First v7 site to v8 upgrade a success!


Print Track
After 2 new installs of version v8 and reintegrating all most all modifications from v7 into the new v8 files, I was ready today for my first upgrade of an existing v7 site.

It didn't went smooth, but after today's experience I'm confident the rest of the old v7 sites will go smooth!

Problems encountered.
- htaccess was rewritten which caused the update script to fail. Reverting to the old htaccess fixed this problem. For what it is worth this occurred on a subdomain, the url showed the subdomain twice. (merged old and new htaccess files afterwards)
- config.php needs to be updated, but the installer forgets to mention to remove/comment the old line: $db_driver = "mysqli"; (I don't think this causes problems because the line $db_driver = "pdo"; is placed later).
- I didn't upload the new themes directory, because I didn't want to lose customization in the themes. But this prevented me to go to the administration environment, because in v8 this is completely new. Renamed my old themes with the addition -v7 and uploaded the new themes. After that the complete site is functional.
- The error log was full of new errors, but that was because I tested the site before uploading all new files. After clearing the error log, no new error messages have appeared.

On my new v8 installs I encountered problems with multiple languages. I completely screwed my site over by adding and removing languages. After that I decided to only use the English locale directory, but translate the contents to the language I want. (Note, I left the admin environment in English, just the public parts are translated. In my opinion every webmaster should know some basic English.)

So before I upgraded v7 to v8 I switched to English and uploaded my English (in fact Dutch) Upgrade_7.02.07_8.00.22 files. After upgrading I uploaded all the (including custom modded) v8 files, including locale/English (containing Dutch). Result a fine working v8 site.
Upgrade was done on php 7.0 (yes this was a modded v7 version to work with php7). After that I switched to php 7.2, still everything ok. smile

21 replies

As I am contemplating upgrading a 7.02.07 site which is on a subdomain, I appreciate your post. BTW, where did you get version 8.00.22, as I thought it had been upgraded to 8.00.21 only? I will definitely be reviewing this post as I attempt my upgrade.

Quote

- htaccess was rewritten which caused the update script to fail. Reverting to the old htaccess fixed this problem. For what it is worth this occurred on a subdomain, the url showed the subdomain twice. (merged old and new htaccess files afterwards)
That is good info, we need to check that, https://github.com/php-fusion/PHP-Fusion/issues/2211

Quote

- config.php needs to be updated, but the installer forgets to mention to remove/comment the old line: $db_driver = "mysqli"; (I don't think this causes problems because the line $db_driver = "pdo"; is placed later).

It should not affect if placed below as mentioned. On an ordinary 7 install that line does not exist. Only mods have it.

Quote

- The error log was full of new errors, but that was because I tested the site before uploading all new files. After clearing the error log, no new error messages have appeared.

Yes, fully normal until all is settled.

Quote

On my new v8 installs I encountered problems with multiple languages.

We had some issues on the early versions but afaik, they should have been resolved on 8.00.2x
Wanabo has replied to this - 4 months ago

afoster wrote:

@afoster - BTW, where did you get version 8.00.22, as I thought it had been upgraded to 8.00.21 only?

It's on Github: PHP-Fusion/tree/8.00.22

Falk wrote:

@Falk - On my new v8 installs I encountered problems with multiple languages.
We had some issues on the early versions but afaik, they should have been resolved on 8.00.2x


The version is 8.00.22 when I got the language problems. It could be I used incomplete language files. But this shouldn't matter when you switch back to a language file that is v8 compatible.

Some other thoughts about v8:
- gateway is not usable on non English sites because of the calculation question. Answers cannot be translated to for example Dutch. How can I disable only the calculation question? (Better is an universal solution.)
- I seem to have missed a setting somewhere in the admin panels for limiting the size of the users avatar. On profile and in forum big avatars messing up the lay out. (made a temporary fix to limit avatars to 100x100)
- In theme Atom-X8 there are missing gender icons/pictures. Also it produces errors because user_gender is not installed or present. Because I needed a user_gender field I used 1 of the old user_gender fields, which was luckily compatible with Atom-X8. Instead of pictures I used in themes\Atom-X8\tpl\profile.tpl.php:

CodeDownload  
 } else if ($field_value['field_name'] == 'user_gender') {

 if ($field_value['value'] == '0') {
// $value = "<img src='".IMAGES."unspecified.gif'> ".$locale['ax8_13'];
 $value = "<font style='font-size:16px; font-weight:bold;'>?</font> ".$locale['ax8_13']; // mod Wanabo instead of not found images.
 } else if ($field_value['value'] == '1') {
// $value = "<img src='".IMAGES."female.gif'> ".$locale['ax8_14'];
 $value = "<font style='font-size:16px;'>♀</font> ".$locale['ax8_14']; // mod Wanabo instead of not found images.
 } else if ($field_value['value'] == '2') {
// $value = "<img src='".IMAGES."male.gif'> ".$locale['ax8_15'];
 $value = "<font style='font-size:16px;'>♂</font> ".$locale['ax8_15']; // mod Wanabo instead of not found images.
 }



Edit: forgot to mention the missing hamburger icon on Atom-X8 when mobile viewing, it shows an empty square. Perhaps class='icon-bar' is missing in css
Fixed it:
themes\Atom-X8\functions.php
CodeDownload  
 $html .= "<button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#navbar-atom'>
 <span class='sr-only'>Toggle Navigation</span>
<!-- <span class='icon-bar'></span>
 <span class='icon-bar'></span>
 <span class='icon-bar'></span> -->
 <span class='glyphicon glyphicon-menu-hamburger'></span>
 </button>"; // mod Wanabo. I want the hamburger menu for mobile sites
 $html .= "</div>\n";

 $html .= "<div id='navbar-atom' class='navbar-collapse collapse'>\n";



Nicer would be open and close hamburger menu.
V8.00.19 : https://github.com/php-fusion/PHP-Fusion/blob/8.00.19/themes/Atom-X8/functions.php#L71

Better way
CodeDownload  
if ($field_value['value'] == '0') {
 $value = "<i class='fa fa-user'></i> ".$locale['ax8_13'];
 } else if ($field_value['value'] == '1') {
 $value = "<i class='fa fa-venus'></i> ".$locale['ax8_14'];
 } else if ($field_value['value'] == '2') {
 $value = "<i class='fa fa-mars'></i> ".$locale['ax8_15'];
 }

Wanabo has replied to this - 4 months ago

RobiNN wrote:

@RobiNN - Better way
CodeDownload  
if ($field_value['value'] == '0') {
 $value = "<i class='fa fa-user'></i> ".$locale['ax8_13'];
 } else if ($field_value['value'] == '1') {
 $value = "<i class='fa fa-venus'></i> ".$locale['ax8_14'];
 } else if ($field_value['value'] == '2') {
 $value = "<i class='fa fa-mars'></i> ".$locale['ax8_15'];
 }



Yes it works, but you need to enable font awesome. Perhaps with a FA check this would be better. (Or use images like in the original) If FA is enabled do it your way. If FA is disabled do it my way.

Failed to see a solution for the hamburger menu at: V8.00.19 : https://github.com/php-fusion/PHP-Fusion/blob/8.00.19/themes/Atom-X8/functions.php#L71
Bootstrap hamburger menu css icon
CodeDownload  
<span class='icon-bar'></span>
 <span class='icon-bar'></span>
 <span class='icon-bar'></span>



Quote

Yes it works, but you need to enable font awesome. Perhaps with a FA check this would be better. (Or use images like in the original) If FA is enabled do it your way. If FA is disabled do it my way.

Yeah
Wanabo has replied to this - 4 months ago
Thanks for the insight Wanabo... doing my next few attempts this weekend, if it fails again.... well, back to square 0.

RobiNN wrote:

@RobiNN - Bootstrap hamburger menu css icon
CodeDownload  
<span class='icon-bar'></span>
 <span class='icon-bar'></span>
 <span class='icon-bar'></span>


That leaves me with an empty square. No lines are displayed. Hence my mod with hamburger glyph icon to put 3 horizontal lines in the square.
Bootstrap, entypo are enabled. Font awesome is not. But the class icon-bar is nowhere found in the corresponding css. In bootstrap.css however icon-bar is found, but I can not determine if the correct code is there.

@Homdax. I'll report back any further findings.

Quote

- gateway is not usable on non English sites because of the calculation question. Answers cannot be translated to for example Dutch. How can I disable only the calculation question? (Better is an universal solution.)

The idea is to build on this one, we will give it a configuration interface with more dynamics and custom options.
The question and correct answers in words are all localized, should not "What is Sixteen + 8 in Words" be translatable?
Example: What is Twenty + 6 in Words
Answer: twentysix
In Dutch the answer would be: zesentwintig (translated literally to English; sixandtwenty)
This cannot be anticipated when translating the gateway.php locale file.
$locale['gateway_021'] = "Twenty";
$locale['gateway_006'] = "Six";

We don't say: twintigzes
And there is no locale for en
Problem encountered updating. After updating the standard theme was NOT Atom-X8, this was caused by a user_field which was enabled in the past to set a theme in your profile.
The upgrade script should reset the theme for the user who is doing the upgrade to default in table users column user_theme to prevent any confusion. (Perhaps even reset to default for all users, to prevent old not 100% compatible themes throwing errors in the error log or worse)
Thought about multi locale.
Always use English for upgrade (check language setting in your site to be English)
Enabling other languages afterward which are not 100% compatible with new v8 causes problems. The php-fusion software only checks if a locale file is present but it should all so check if the corresponding locale string is present. If not use default English. I think this could prevent a lot of errors and problems.
Homdax has replied to this - 4 months ago

Wanabo wrote:

@Wanabo - Thought about multi locale.
Always use English for upgrade (check language setting in your site to be English)
Enabling other languages afterward which are not 100% compatible with new v8 causes problems. The php-fusion software only checks if a locale file is present but it should all so check if the corresponding locale string is present. If not use default English. I think this could prevent a lot of errors and problems.


Hokay, if I get that right this means we really need to put some emphasis on getting locales completed or stuff won't work properly. String check against English turning up an error, would that invalidate the locale set completely? Or generate a report? How do we want this to work?

I guess a report would be nice since you can translate on the fly? Yes, many reports and many checks, but with the advantage of actually seeing the missing string instead of it lurking and causing some werd issue down the line. Dunno if that is even possible...
Wanabo has replied to this - 4 months ago

Homdax wrote:

@Homdax -Hokay, if I get that right this means we really need to put some emphasis on getting locales completed or stuff won't work properly. String check against English turning up an error, would that invalidate the locale set completely? Or generate a report? How do we want this to work?

I guess a report would be nice since you can translate on the fly? Yes, many reports and many checks, but with the advantage of actually seeing the missing string instead of it lurking and causing some werd issue down the line. Dunno if that is even possible...


My idea is just to show an English string if the other locale file does not have it. So first try to look in the corresponding locale file, if the string is not there show the corresponding English string. It would be nice if it had for an example red background so you know you have to add it to your locale file. Then you can ask your members to hunt down missing strings.


Ran in two other problems when upgrading sites.

- Used symlinks on my server. When uploading new files to my server the symlinks were not overwritten by the new files. So still pointing to non upgraded files. It's highly unlikely any one else faces this problem. Removed symlinks, uploaded the new files again and problem solved. (Made symlinks to only mod 1 file in stead of 9)
- On one domain I have 9 subdomains with php-fusion websites, all using the same database with different table prefixes. This causes the update script to fail. I don't think it has to do with the max_execution_time, but perhaps of different table prefixes. Created for every site it's own database, after that upgrade was a walk in the park.

@the coders, would ini_set('max_execution_time', 43200); //12 hours in the upgrade script help prevent timing out the script?

Edit: found a new problem.
Wanted to delete a thread, but leads to a blank page. forum/options.php?step=delete&forum_id=8&thread_id=245
It was deleted from table post, but not from table threads

Quote

@the coders, would ini_set('max_execution_time', 43200); //12 hours in the upgrade script help prevent timing out the script?

Yes, but you need to boost both PHP and MySQL execution times, depending on database sizes more resource heavy actions might also need a tad more memory.

Quote

Wanted to delete a thread, but leads to a blank page. forum/options.php?step=delete&forum_id=8&thread_id=245

Ok, the blank page should not be, but the other is a known issue inherited from 7 afaik. : https://github.com/php-fusion/PHP-Fusion/issues/2039
Wanabo has replied to this - 4 months ago

Falk wrote:

@Falk -

Quote

Wanted to delete a thread, but leads to a blank page. forum/options.php?step=delete&forum_id=8&thread_id=245

Ok, the blank page should not be, but the other is a known issue inherited from 7 afaik. : https://github.com/php-fusion/PHP-Fusion/issues/2039


Never experienced this on v7. Deleting a user removed all his posts and when the deleted user had started a thread also the complete thread was removed with all other posts. I'll double check if the blank page isn't because I modded something.

I reported in the past that when deleting a user his shouts and submissions are not deleted. I'll attach my modded administration/members.php which will add extra checks for that. And some other "improvements" like showing more info on the member page. It's working but I'm just a hobby coder, so any input on improvements are welcome and perhaps you see something that would make it in v8 permanently.

Oh dear, just checking the file and the error could very well be something I did. DELETE IGNORE might be the culprit. (worked in the past). Come to think of it, I didn't delete a member just a thread, so this routine was not executed.

The file /forum/options.php is original, but that is where the error occurred.

Edit: Update removing a thread on forum/viewforum.php?forum_id=2&rowstart=0 via the checkbox works OK. Removing a thread via dropdown panel below post "moderator options" and choosing delete thread leads to my error. (you can select yes / no etc. but when the actual deletion should happen it fails)
Wanabo attached the following file:
members.zip [6.76kB / 20 Downloads]
Upgraded https://www.phpfusion-nederlands.info/ to v8.

I was a little nervous because this is the first site with a large database (20mb) and this would be a showcase if the rest of the sites with big databases will encounter problems.
The UTF-8 conversion took about 35 minutes, but after 30 minutes I got a 504 Gateway timeout from Nginx. But by monitoring the load of my server I guessed the conversion process was still running.
Afterwards I double checked if new tables were there and the old ones where altered to utfmb4. All seemed in order. After uploading the new files all worked as expected. smile
Good news!
On a side note, to reduce loading time you can identify Chars needed for conversion on your given language and cut the function short.
Now it takes our full list and compare them all, naturally that will cause some increased load.

For exaple in Swedish I only need, ( Also for lower case ) and in scenarios questions marks etc.. But it still reduce the load by a lot.

CodeDownload  
dbquery("UPDATE ".$table." SET ".$column['Field']." = REPLACE(".$column['Field']." ,'Ã¥','Å')");
dbquery("UPDATE ".$table." SET ".$column['Field']." = REPLACE(".$column['Field']." ,'ö','ö')");
dbquery("UPDATE ".$table." SET ".$column['Field']." = REPLACE(".$column['Field']." ,'Ä','Ä')");

author Wanabo
forumUpgrading issues - 8
replies22 posts
viewed527 times
activeLast updated on 4 months ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Homdax, Wanabo, afoster, RobiNN