Jump to content

IPB 4 Upgrade stuck on query step


Prank

Recommended Posts

Posted

The upgrade has been going for hours and hours on my local machine as I test the process and find any required additional steps.

At one point, I'm asked to run some queries manually;

Quote

Manual Action Required

Some changes need to be made to your database. Because this affects a very large table, doing this automatically may time out. Therefore, it is recommended that you make these changes by manually running the queries listed below through the command line on your MySQL server.

UPDATE ibf_core_attachments SET attach_location=SUBSTR( attach_location, 2 ) WHERE attach_location LIKE '/%';

UPDATE ibf_core_attachments SET attach_thumb_location=SUBSTR( attach_thumb_location, 2 ) WHERE attach_thumb_location LIKE '/%';

Both queries run without issue;

mysql> UPDATE ibf_core_attachments SET attach_location=SUBSTR( attach_location, 2 ) WHERE attach_location LIKE '/%';
Query OK,  rows affected (0.45 sec)
Rows matched:   Changed:   Warnings: 

mysql> UPDATE ibf_core_attachments SET attach_thumb_location=SUBSTR( attach_thumb_location, 2 ) WHERE attach_thumb_location LIKE '/%';
Query OK,  rows affected (0.41 sec)
Rows matched:   Changed:   Warnings: 

But, clicking the 'I have run the queries ... ' button just takes me back to the same step. I've done this step 20+ times now and cannot progress.

I have refreshed the page and also opened and 'continued' the upgrade through a different browser, neither works. It will just not go to the next step.

Any ideas what I need to do?

Thanks in advance.

Posted

I commented out all the generating code and got to the next step with a refresh...

 

        public function step3()
        {
        //      $toRunQueries   = array(
        //              array(
        //                      'table' => 'core_attachments',
        //                      'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_attachments SET attach_location=SUBSTR( attach_location, 2 ) WHERE attach_location LIKE '/%'",
        //              ),
        //              array(
        //                      'table' => 'core_attachments',
        //                      'query' => "UPDATE " . \IPS\Db::i()->prefix . "core_attachments SET attach_thumb_location=SUBSTR( attach_thumb_location, 2 ) WHERE attach_thumb_location LIKE '/%'",
        //              )
        //      );

        //      $toRun = \IPS\core\Setup\Upgrade::runManualQueries( $toRunQueries );
        //
        //      if ( count( $toRun ) )
        //      {
        //              $mr = \IPS\core\Setup\Upgrade::adjustMultipleRedirect( array( 'extra' => array( '_upgradeStep' => 3 ) ) );

        //              /* Queries to run manually */
        //              return array( 'html' => \IPS\Theme::i()->getTemplate( 'forms' )->queries( $toRun, \IPS\Http\Url::internal( 'controller=upgrade' )->setQueryString( array( 'key' => $_SESSION['uniqueKey'], 'mr_continue' => 1, 'mr' => $mr ) ) ) );
        //      }

                return TRUE;
        }

Aware that this is a bit brute force, but it worked.

 

Gah! The issues continue ... 

Quote

array_key_exists() expects parameter 2 to be array, null given 
/Users/cbiggins/Sites/sau4/ips/system/Text/Parser.php::706

 

Posted
27 minutes ago, Nathan Explosion said:

It's at times like this that you step back & revert to your backups, and do a test upgrade on a test site.

You're absolutely correct!  Oh ... wait!

5 hours ago, Prank said:

on my local machine as I test the process and find any required additional steps.

 

Posted

For the record, this upgrade is going through 8 million posts and 500,000 topics. Starting again is not an option, its taken 24 hours to get it to this stage.

It has fresh code (none of the 3.4 install is here) and is only using my old database, theres no reason to restore a backup and start again, there are no variables here, nothing can change by starting again.

Having to comment code from the script to continue to upgrade is not ideal but is what i've needed to do - thats not an issue with my database and if it is, then the installer should handle it as it is an IPB db. ^_^

Posted
27 minutes ago, Prank said:

(none of the 3.4 install is here)

For clarity - none at all? You will need to keep the public, uploads and (obviously) the conf_global.php file (assuming it was a non-Downloads site) If you have Downloads then you will also need to keep your downloads and screenshots folder too (after upgrade, public can be discarded as it's contents are converted over to uploads, if there are any that need to be moved...and I believe downloads/screenshots can too, if you have downloads)

Did you have a working IPS 3.4 install there, with modifications made to paths etc if different to your live site, too?

Posted

I'm trying to ascertain at this point how the upgrade on the data will go. In past major upgrades there have been lots of problems.

The uploads folder contains 170GB so not viable to put on my local machine yet. The goal is for a functioning IPB4 forum so I can see how we will go with some of the apps we've purchased. 

We don't use Downloads so that is ok.

conf_global was copied and updated to use local services.

The only real issue I had was one step getting 'stuck' as it refused to notice that I had made the req'd queries and kept requesting I make the same ones (which I did run 5+ times each before i noticed it was the same ones! :D)

I had to comment out the code to get to the next step and its been ok since then. 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...