Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Tansy on April 28, 2017, 08:16:47 PM

Title: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 28, 2017, 08:16:47 PM
When I found this topic I thought, "Whoo Hoo, my problem solved!" 
But no.
Like Tyffyn, I was running SMF 1.1.19 and wanted to upgrade to 2.0.13 and got the english language error message.
So backed myself out, restored my files and made sure my forum was working again (yes).
Then I extracted and upgraded to 2.0.12 and tried again.  Boom, language error again.
So backed myself out again, restored my files, made sure my forum was working again (yes).
Then extracted and updated the only theme on my forum other than core & default and checked everything was working (yes).
Then tried to upgrade again to 2.0.12 and again Boom, language error message.

Arrgghh ... help?  Suggestions greatly appreciated!
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Steve on April 28, 2017, 08:23:18 PM
If I remember correctly, you need to be on 1.1.21 before upgrading to 2.x.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 29, 2017, 12:04:40 AM
Quote from: Steve on April 28, 2017, 08:23:18 PM
If I remember correctly, you need to be on 1.1.21 before upgrading to 2.x.

Apologies, I was/am on 1.1.21 before trying to upgrade ....
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Sir Osis of Liver on April 29, 2017, 12:26:25 AM
Assuming you've uploaded the complete 2.0.13 large upgrade package, all of the english language files have this at the top -



// Version: 2.0;



... except for index.english.php -



// Version: 2.0.12; index



... and ManagePaid.english.php -



// Version: 2.0.10; ManagePaid



Try changing them to 2.0, see what happens.  I've used the upgrade package many times, and have never seen this problem.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Sir Osis of Liver on April 29, 2017, 12:43:48 AM
The error is thrown by upgrade.php here -



elseif (!isset($_GET['skiplang']))
{
$temp = substr(@implode('', @file($modSettings['theme_dir'] . '/languages/index.' . $upcontext['language'] . '.php')), 0, 4096);
preg_match('~(?://|/\*)\s*Version:\s+(.+?);\s*index(?:[\s]{2}|\*/)~i', $temp, $match);

if (empty($match[1]) || $match[1] != SMF_LANG_VERSION)
return throw_error('The upgrader found some old or outdated language files, for the forum default language, ' . $upcontext['language'] . '.<br /><br />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.<br />&nbsp;&nbsp;&nbsp;[<a href="' . $upgradeurl . '?skiplang">SKIP</a>] [<a href="' . $upgradeurl . '?lang=english">Try English</a>]');
}



Looks like it checks version in index.english.php (or whichever language is selected in Settings.php), and errors out if there's no match.  Too tired to understand the preg_match, but editing the version number in that file may fix the problem.

  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fbor.gif&hash=cba0817857a10dc1cd975d2b49a33ba2fc822800)
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Illori on April 29, 2017, 05:58:17 AM
topic split, please open a separate topic for your issue, the other topic belongs to someone else.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 30, 2017, 01:13:12 PM
Apologies Illori for tagging onto another user's question ... different forums, different rules, will do better next time!

Sir Osis of Liver - will happily try your suggestions today and let you know what happens!  Thank you
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 30, 2017, 07:25:53 PM
Nope, still not working ...  this is the message I get ... same message I was getting before ...

Simple Machines Forum

    1: Login
    2: Upgrade Options
    3: Backup
    4: Database Changes
    5: Delete Upgrade

0%          : 0 , 0 .                          Updating Your SMF Install!

The 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.
SMF ©2015, Simple Machines


I've tried the "try English" link and nothing it just returns to this screen.


Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 30, 2017, 07:27:13 PM
When I use "SKIP", I get the following and then it doesn't recognize my forum admin login information and I bounce back to the screen in the previous post

Simple Machines Forum

    1: Login
    2: Upgrade Options
    3: Backup
    4: Database Changes
    5: Delete Upgrade

0%          : 0 , 0 .           Updating Your SMF Install!

!!

Admin Login:
For security purposes please login with your admin account to proceed with the upgrade.
Username:    
Password:    

Note: If necessary the above security check can be bypassed for users who may administrate a server but not have admin rights on the forum. In order to bypass the above check simply open "upgrade.php" in a text editor and replace "$disable_security = 0;" with "$disable_security = 1;" and refresh this page.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Illori on April 30, 2017, 07:32:37 PM
can you restore your SMF 1.1.* files you had before then run What is repair_settings.php? (http://wiki.simplemachines.org/smf/Repair_settings.php) making sure all the paths are correct then run the upgrade again.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on April 30, 2017, 08:00:23 PM
Thank you Illori - will try as you suggest and will let you know what happens!
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on May 01, 2017, 12:27:21 AM
Reloaded my original 1.1.21 forum, checked to make sure it worked then downloaded & ran repair_settings.php no problem.

All of the settings look like they should ... paths are correct, server information is correct and the language is "english" (lowercase "e" - would that make a difference?)

Uploaded the large upgrade 2.0.13 files and ran upgrade.php and got exactly the same error messages.

Have I missed something implied in the step-by-step instructions? (these ones - https://wiki.simplemachines.org/smf/Upgrading)

Any suggestions, advice would be greatly appreciated!!



Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Illori on May 01, 2017, 05:06:05 AM
is the default theme path/URL defined correctly? so it actually goes to the default themes folder?
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on May 03, 2017, 01:03:15 AM
Okey dokey, managed to make a big leap ahead but am now stalled again.

So, started from scratch once again.  Ran repair_settings again.  Checked all the paths and there was one URL pointing to an old location for the forum.  Fixed it.  Downloaded 2.0.13 large upgrade again. Uploaded to my forum and ran the upgrade.  DID NOT get the language error again (whoo hoo!) and managed to complete the upgrade no problem.  Checked forum out and all the data looked wonderful!!  Wasn't keen about the theme so not taking any chances, checked out the themes that were compatible with 2.0.13, found four I thought might be workable so downloaded them to see how they would work with the way I have set up my forum - a couple are very different looking so could only decide by actually trying them out.  Downloading seemed to go fine.  Didn't actually try to "install" or "activate" them as I couldn't stay to play.  So removed repair_settings.php and upgrade.php and left my computer. 

Came back a couple of hours later, tried to open up my forum and all I get is Unable to load the 'main_above' template.  And now I am stumped.  Repair_settings looks good, don't know if upgrading again will fix or make the problem worse or if I need to manually modify a file or part of my SQL database .... argh, so close to being back up and running .... sigh.

Thank you for helping me get this far, and I hope you can help again ...
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Kindred on May 03, 2017, 06:21:58 AM
the error has nothing to do with the database.

if you had a theme left over from the 1.1.x installation that might cause issues.

try using index.php?theme=1 as your url....  then reset everyone to the default (Curve) theme
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on May 03, 2017, 04:00:01 PM
Thanks for the suggestion Kindred ... tried it as suggested and got the same message I'm afraid.

Had a look at the files in the root directory of my forum and I have two index.php files - one is index.php and the other is index1.php.  Can't say that I saw it before, but wasn't looking so it could be right where it is supposed to be.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Sir Osis of Liver on May 03, 2017, 11:54:17 PM
Use phpmyadmin to reset default theme to Curve.  In smf_settings set theme_default to 1.
Title: Re: Upgrade error upgrading from 1.1.21 to 2.0.13
Post by: Tansy on May 07, 2017, 04:34:52 PM
SUCCESS!!  ;D
Thank you so very much for your help everyone! 

I am now back on track and all looks to be working perfectly. 
Hopefully I don't screw it up now  :o