Undefined index: upgrade_upgrade_utility

Started by I, Brian, August 05, 2015, 07:32:32 AM

Previous topic - Next topic

I, Brian

Trying to upgrade from 1.1.12 to 2.0.1. However, am currently getting the following error at the start of the upgrade process:


Notice: Undefined index: upgrade_upgrade_utility in /home/board/public_html/upgrade.php on line 3476
Simple Machines Forum

Notice: Undefined index: upgrade_progress in /home/board/public_html/upgrade.php on line 3488


    Notice: Undefined index: upgrade_step in /home/board/public_html/upgrade.php on line 3493
    1: Login

    Notice: Undefined index: upgrade_step in /home/board/public_html/upgrade.php on line 3493
    2: Upgrade Options

    Notice: Undefined index: upgrade_step in /home/board/public_html/upgrade.php on line 3493
    3: Backup

    Notice: Undefined index: upgrade_step in /home/board/public_html/upgrade.php on line 3493
    4: Database Changes

    Notice: Undefined index: upgrade_step in /home/board/public_html/upgrade.php on line 3493
    5: Delete Upgrade

0%


Notice: Undefined index: upgrade_overall_progress in /home/board/public_html/upgrade.php on line 3502

Notice: Undefined index: upgrade_time_elapsed in /home/board/public_html/upgrade.php on line 3527
: 0
Notice: Undefined index: upgrade_time_mins in /home/board/public_html/upgrade.php on line 3528
, 0
Notice: Undefined index: upgrade_time_secs in /home/board/public_html/upgrade.php on line 3528


I searched the forums and found this had come up before, but there was never any suggested work around that I seem able to use.

A potential issue with theme choice was mentioned previously - the original board was running a custom theme. However, changing theme_allow and theme_default to 1 from 0 in phpmyadmin doesn't appear to have fixed anything.

Any pointers, please? This is simply a straight upgrade - no change in server or domain, and it's only a small forum.

Illori

why are you upgrading to 2.0.1? you should be upgrading to 2.0.10.

Jade Elizabeth

You might want to try redownloading the upgrade package and uploading it again, perhaps something went wrong? :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

margarett

Yes, we've seen this happening. It is because of wrong theme folders/URLs on the default theme yes.

Please open upgrade.php and find the function loadEssentialData. At the end if it (before the closing bracket) add this:

global $upcontext, $boarddir, $boardurl;
//Lets overwrite the theme data because it can be wrong...
if (!isset($modSettings['theme_dir']) || (isset($modSettings['theme_dir']) && !file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))) //Wrong themes dir. Duh!
{
$modSettings['theme_dir'] = $boarddir . '/Themes/default';
$modSettings['images_url'] = $boardurl . 'Themes/default/images';
$modSettings['theme_url'] = $boardurl . 'Themes/default';
}


Then run the upgrade tool again ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

I, Brian

#4
Quote from: margarett on August 05, 2015, 08:15:54 AM
Yes, we've seen this happening. It is because of wrong theme folders/URLs on the default theme yes.

I can change that in settings.php or phpmyadmin, as required?


Quote from: margarett on August 05, 2015, 08:15:54 AM
Please open upgrade.php and find the function loadEssentialData. At the end if it (before the closing bracket) add this:

global $upcontext, $boarddir, $boardurl;
//Lets overwrite the theme data because it can be wrong...
if (!isset($modSettings['theme_dir']) || (isset($modSettings['theme_dir']) && !file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))) //Wrong themes dir. Duh!
{
$modSettings['theme_dir'] = $boarddir . '/Themes/default';
$modSettings['images_url'] = $boardurl . 'Themes/default/images';
$modSettings['theme_url'] = $boardurl . 'Themes/default';
}


Then run the upgrade tool again ;)

Did you mean like this?


loadEssentialData(

global $upcontext, $boarddir, $boardurl;
//Lets overwrite the theme data because it can be wrong...
if (!isset($modSettings['theme_dir']) || (isset($modSettings['theme_dir']) && !file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))) //Wrong themes dir. Duh!
{
$modSettings['theme_dir'] = $boarddir . '/Themes/default';
$modSettings['images_url'] = $boardurl . 'Themes/default/images';
$modSettings['theme_url'] = $boardurl . 'Themes/default';
}

);


That resulted in another error message:

Quote
Parse error: syntax error, unexpected T_GLOBAL, expecting ')' in /home/companyl/public_html/upgrade.php on line 120

EDIT: Simply adding the code after "loadEssentialData();" resulted in no change.

margarett

No you are putting it after the function *call* and you need to put it inside the function definition ;)

The function starts here:
// Load all essential data and connect to the DB as this is pre SSI.php
function loadEssentialData()
{
global $db_server, $db_user, $db_passwd, $db_name, $db_connection, $db_prefix, $db_character_set, $db_type;


So you need to find its closing bracket and put the code before it:

if (!isset($_GET['substep']))
$_GET['substep'] = 0;
// PUT THAT CODE HERE
}


Eg:
if (!isset($_GET['substep']))
$_GET['substep'] = 0;

global $upcontext, $boarddir, $boardurl;
//Lets overwrite the theme data because it can be wrong...
if (!isset($modSettings['theme_dir']) || (isset($modSettings['theme_dir']) && !file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))) //Wrong themes dir. Duh!
{
$modSettings['theme_dir'] = $boarddir . '/Themes/default';
$modSettings['images_url'] = $boardurl . 'Themes/default/images';
$modSettings['theme_url'] = $boardurl . 'Themes/default';
}

}

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

I, Brian

#6
@margarett - I'm afraid that didn't work either.

So I:

- went back to my original files
- upgraded to 1.1.21,
- logged in to SMF admin
- themes > reset themes > Attempt to reset all themes

Looks like the paths were originally tied to an old hosting account username and URL - fixed those

- then upgraded to 2.0.10.


All seems to work fine now.

Hopefully that helps if anyone else gets stuck with this. :)

Many thanks for trying to help as well - even though your code didn't reset my themes in my instance, at least I knew where I needed to fix things. :)

Advertisement: