just a couple of glitches with the 2.0.19 update

Started by Chen Zhen, December 22, 2021, 10:54:12 PM

Previous topic - Next topic

Chen Zhen


I noticed a few glitches when using the upgrade and the patch for SMF 2.0.19.

The patch neglects to edit the Settings.php file to update the forum version number.

The upgrade package during step 0 has an option to skip any language file issues it detects but opting the skip option throws an error exception and redirects to the admin login where the entire process just loops.

Imo line 3699 of the upgrade.php file just needs the skiplang parameter added to the form action if it 's in the URL from previously clicking the option.

ie.
<form action="', $upcontext['form_url'], isset($_GET['skiplang']) ? ';skiplang' : '', '" method="post" name="upform" id="upform" ', empty($upcontext['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $upcontext['rid'] . '\');"' : '', '>
 

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

live627

Quote from: Chen Zhen on December 22, 2021, 10:54:12 PMThe patch neglects to edit the Settings.php file to update the forum version number.
No patch has ever done that. The one in my live site, for example, says 2.0 RC3 and uses the old license format, while the actual codebase is at 2.0.17.

Aleksi "Lex" Kilpinen

Just to further clarify that, the forum version is actually defined in index.php
$forum_version = 'SMF 2.0.19';
And because this edit doesn't break functionality, and there may be situations where the versioning is non standard, it is marked as non-vital for the update - so you are able to succesfully update even if this edit fails.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Shades.

Quote from: Chen Zhen on December 22, 2021, 10:54:12 PMI noticed a few glitches when using the upgrade and the patch for SMF 2.0.19.

The patch neglects to edit the Settings.php file to update the forum version number.

The upgrade package during step 0 has an option to skip any language file issues it detects but opting the skip option throws an error exception and redirects to the admin login where the entire process just loops.

Imo line 3699 of the upgrade.php file just needs the skiplang parameter added to the form action if it 's in the URL from previously clicking the option.

ie.
<form action="', $upcontext['form_url'], isset($_GET['skiplang']) ? ';skiplang' : '', '" method="post" name="upform" id="upform" ', empty($upcontext['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $upcontext['rid'] . '\');"' : '', '>
 

Quote from: Shades. on November 08, 2021, 05:52:20 PMJust installed the Upgrader to a backup of my old 2.0.18 and I'm getting:

QuoteThe upgrader found some old or outdated language files, for the forum default language, english.

Please make certain you uploaded the new versions of all the files included in the package, even the theme and language files for the default theme.
  [SKIP] [Try English]

Click here to try again.

Quote from: shawnb61 on November 09, 2021, 07:26:04 PMYou may need to change SMF_LANG_VERSION to 2.0.18 at the top of upgrade.php.


Quote from: Shades. on November 09, 2021, 07:52:11 PM
Quote from: shawnb61 on November 09, 2021, 07:26:04 PMYou may need to change SMF_LANG_VERSION to 2.0.18 at the top of upgrade.php.

That worked perfectly and upgrade completed! Thanks! 8)

ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shawnb61

Shades - that was during beta testing, before the language files were updated.  That step should not be required now.

Chen Zhen - what versions were you upgrading from / to?  What languages were installed? 


Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Shades.

Quote from: shawnb61 on December 24, 2021, 10:06:47 AMShades - that was during beta testing, before the language files were updated.  That step should not be required now.

Well I downloaded the 2.0.19 final and had to still change the version cause it still going in circles but when I changed the language version the upgrade worked.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shawnb61

What versions were you upgrading from/to?

Were you using the upgrader to go from 2.0.18 to 2.0.19?
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Shades.

Yes from 2.0.18 to 2.0.19 upgrader. But I'll download and try it again! ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shawnb61

There is definitely something to Chen Zhen's post.

IIRC, there is an old bug where you can get caught in a loop if there is a problem with the language files.  I cannot reproduce it though.

(As others have noted, the version & comments in Settings.php remain unchanged.  Mine says I'm on 1.1...)
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Shades.

Yeah I just tried a fresh downloaded copy 2.0.19 large upgrade and it's still looping unless I change define('SMF_LANG_VERSION', '2.0.19'); to define('SMF_LANG_VERSION', '2.0.18'); ???
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

shawnb61

Yep.  Confirmed here, too. 

Thanks for the report, Chen Zhen. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

Two workarounds:
 - Chen Zhen's fix above works
 - Changing SMF_LANG_VER as noted above

Logged internally, #253
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Chen Zhen

My upgrade testing was done for 2.0.18 to 2.0.19.
Imo as long as it gets fixed somehow so it doesn't loop when opting to skip the detected language issue (although I didn't look closer to see why it flagged a problem to begin with).



As for the forum version when using the patch:
My bad as I see now that the edit is for the main index.php file.
For Simple Portal I have that variable set in the Settings.php file.
At the moment I don't remember why I did that or if it may have been added by Sinan at some point.
This part works fine for localhost testing.

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Sesquipedalian

The large upgrade packages for 2.0.19 available at https://download.simplemachines.org have now been fixed to solve this problem.

If you have already successfully updated to 2.0.19, no further action is needed on your part.

If you previously had trouble running the large upgrade, please download a fresh copy from https://download.simplemachines.org and try again.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Advertisement: