Post by Randem » Fri Jan 08, 2016 7:09 pm

I would suggest using the automated migration, order will be showing in that, you just cannot edit them. This is a bug in v2.1.0.1.

Did you disable all MODS and extensions in your upgrade?

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by HAO » Fri Jan 08, 2016 9:58 pm

How to using the automated migration?

If you are referring to OpenCart-Migration-Upgrade-Tool-2.0.5

That I executed many times, but Can not be to turn data into the database, So it will use text comparison tool to manually input.

How can I correct use OpenCart-Migration-Upgrade-Tool-2.0.5 it?

HAO
Active Member

Posts

Joined
Fri Jun 03, 2011 2:52 pm

Post by Randem » Sat Jan 09, 2016 4:04 am

No, I was referring to - http://www.randemsystems.com/support/op ... n-2-1-0-1/

Which is referenced in this thread a few times.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by AllenConquest » Sat Jan 09, 2016 9:55 pm

I found a small bug in the upgrade.php file. Line 25 currently reads:

Code: Select all

$line = str_replace("CREATE TABLE `" . DB_PREFIX . "", "CREATE TABLE `" . DB_PREFIX, $line);
It should be:

Code: Select all

$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . DB_PREFIX, $line);
I have never used a prefix on my tables, so this was causing a problem.

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by AllenConquest » Sun Jan 10, 2016 12:50 am

I think I've found the issue (or at least a major one). I must have run some 'optimization' script on my database and it has created additional indexes. For example there is another index on `category_path` that is the same as the correct PRIMARY index, but called something else. The upgrade script tries to delete it, and the loops over the keys in the index, and therefore tries to drop it twice (as there are 2 keys, the second attempt fails). The lines of code in the upgrade.php file are around 254.

I'll let you know if this fixes my problem.

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by Randem » Sun Jan 10, 2016 4:20 am

Which upgrade script?
Using the updated "upgrade.php" script solves most immediate problems. It has already been done for you... No need to re-invent the wheel...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by AllenConquest » Sun Jan 10, 2016 5:56 pm

Hi Randem,

I'm not re-inventing the wheel. Your work is brilliant and has helped a lot. After I removed the extra keys that had been added in error by some other mod, your upgrade.php script ran fine (but please could you change this issue?
AllenConquest wrote:I found a small bug in the upgrade.php file. Line 25 currently reads:

Code: Select all

$line = str_replace("CREATE TABLE `" . DB_PREFIX . "", "CREATE TABLE `" . DB_PREFIX, $line);
It should be:

Code: Select all

$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . DB_PREFIX, $line);
I have never used a prefix on my tables, so this was causing a problem.
I now have a working 2.1.0.1 database with my old data

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by Randem » Sun Jan 10, 2016 6:04 pm

Thank you!

Change which issue? I don't understand... My line 25 looks like this:

Code: Select all

        $line = str_replace("DROP TABLE IF EXISTS `oc_", "DROP TABLE IF EXISTS `" . DB_PREFIX, $line);

        $line = str_replace("CREATE TABLE `" . DB_PREFIX . "", "CREATE TABLE `" . DB_PREFIX, $line);

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by AllenConquest » Mon Jan 11, 2016 5:44 am

You just listed 2 lines. The second line is wrong. The code in the first line is correctly replacing the "oc_" hardcoded table prefix with the DB_PREFIX, but the second line doesn't change anything. It should also be changing the hardcoded "oc_" prefix. So it would become:

Code: Select all

$line = str_replace("CREATE TABLE `oc_", "CREATE TABLE `" . DB_PREFIX, $line);
At the moment the line is:

Code: Select all

$line = str_replace("CREATE TABLE `" . DB_PREFIX . "", "CREATE TABLE `" . DB_PREFIX, $line);
Which doesn't replace anything. You only notice the problem if you don't use the default "oc_" table prefix.

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by Randem » Mon Jan 11, 2016 6:20 am

You are correct. It is now changed.
Thanks.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by AllenConquest » Mon Jan 11, 2016 11:33 pm

Thank you for creating this code. I can now migrate to 2.1.0.1 from 1.5.5.1, I just have to find upgrades to my existing mods, or write my own.

The errors I was getting in line 254 were caused by non-PRIMARY composite keys being added to the database (by some other script). This situation would also cause the OC upgrade.php script to fail. The reason is that the SHOW INDEXES command returns multiple rows for a composite index, so the loop in this area of the code tries to drop an index that has already be dropped.

I believe the show indexes query should be changed to something like

Code: Select all

SHOW INDEXES FROM `table` where Seq_in_index = 1
That would ensure only one row per index.

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm

Post by Randem » Tue Jan 12, 2016 3:14 pm

You are welcome. Do you have an SQL database dump of your database with the indexes you described. It does not have to contain the data just the structures. I will need it to test the upgrade script with to make sure that it is handled properly.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Fri Jan 15, 2016 9:24 am

I have implemented the change...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by hebiki » Sun Jan 17, 2016 2:12 pm

so much win in this thread. great work Randem

New member

Posts

Joined
Sun Oct 10, 2010 4:00 pm

Post by webgold » Thu Jan 21, 2016 5:39 pm

yes I'll like to second that, many thanks for your help guys in this thread, it's very helpful.

I've been sitting on the fence for a while now waiting to upgrade and I think I'll go ahead.

Thanks again ;D

Newbie

Posts

Joined
Tue Jul 30, 2013 10:37 pm

Post by troop73 » Fri Aug 19, 2016 11:36 am

I am upgrading from 1.5.5.1 to the most current version as of August 1, 2016. The directions say to drag and drop the files in the upload folder (from the new version) into the update folder (of the old version). My current (old) version of opencart does not have an update folder. How do I proceed? Are there alternate instructions that address this issue?

Newbie

Posts

Joined
Tue Nov 26, 2013 10:00 am

Post by Randem » Fri Aug 19, 2016 11:57 am

Hi troop73,

You are confusing your self; The words update and upload are not interchangeable...
The correct instructions have always been to copy the CONTENTS of the upload folder of the newer version to the folder where you have installed OpenCart. Meaning that what you are really doing is replacing all your files with the newer version and that WILL NOT upgrade your OpenCart. All you will do with those instructions is cause your version 1.5.5.1 to become almost useless.

Where are you getting these instructions from. Please post them. None of my instructions would NEVER tell you to do that. Either you are confused or have gotten a hold of bad instructions.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am
Who is online

Users browsing this forum: No registered users and 12 guests