Post by labeshops » Fri Jun 17, 2016 9:51 pm

pm-netti wrote:
labeshops wrote:That didn't work - same error :(
How can be same error

Code: Select all

$oldfield['Field'] != $field['name']
So column `affiliate_id`not try change?
Made the change on line 109 you gave me and it still says:

Code: Select all

Error Code(0): Error: Incorrect table definition; there can be only one auto column and it must be defined as a key
Error No: 1075
ALTER TABLE `oc_affiliate` CHANGE `affiliate_id` `affiliate_id` INT(11) NOT NULL AUTO_INCREMENT in /home/xxx/public_html/upgrade-test/system/library/db/mysqli.php on line 40
when I try to run the ugrade script. Same error

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Fri Jun 17, 2016 11:25 pm

I maybe edit wrong line, it is not should go to it loop, line 186:

Code: Select all

if (!in_array($field['name'], $table_old_data[$table['name']]['field_list'])) {
Line 231:

Code: Select all

$sql = "ALTER TABLE `" . $table['name'] . "` CHANGE `" . $field['name'] . "` `" . $field['name'] . "` " . strtoupper($field['type']);
Is this else loop (by line 228) unecessary?

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by labeshops » Sat Jun 18, 2016 12:56 am

Afraid I don't know - the upgrade script code is beyond my limited php knowledge :P

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Sat Jun 18, 2016 3:28 pm

labeshops wrote:Afraid I don't know - the upgrade script code is beyond my limited php knowledge :P
You can try, 1000.php line 258:

Code: Select all

$this->db->query($sql);
change to:

Code: Select all

//$this->db->query($sql);

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by Jentoo » Sun Jun 19, 2016 12:26 am

Hi

I was stuck on upgrading from 1.5 to 2 completely until I uploaded your alternative install folder.

Once I did this and reran the install, the upgrade went through OK. The site shows at the front end with default template.

However I can't access admin at all. I type in the admin path and the browser switches to the url:

mysite/install/index.php

and goes back to install mode

I've cleared cookies and cache and tried 2 different browsers. Also I've tried removing the install folder, but then I simply get a 404 when it tries to access the above url

Am I missing something

Many thanks

Newbie

Posts

Joined
Sat Jun 18, 2016 11:49 pm

Post by labeshops » Sun Jun 19, 2016 12:57 am

well tried that and got another error - *sigh*

Code: Select all

Error Code(0): Error: Incorrect table definition; there can be only one auto column and it must be defined as a key
Error No: 1075
ALTER TABLE `oc_address` DROP PRIMARY KEY in /home/xxxx/public_html/upgrade-test/system/library/db/mysqli.php on line 40

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Sun Jun 19, 2016 3:01 am

labeshops wrote:well tried that and got another error - *sigh*

Code: Select all

Error Code(0): Error: Incorrect table definition; there can be only one auto column and it must be defined as a key
Error No: 1075
ALTER TABLE `oc_address` DROP PRIMARY KEY in /home/xxxx/public_html/upgrade-test/system/library/db/mysqli.php on line 40
You will have a fun server :)
1000.php line 282:

Code: Select all

$this->db->query("ALTER TABLE `" . $table['name'] . "` DROP PRIMARY KEY");
change to:

Code: Select all

//$this->db->query("ALTER TABLE `" . $table['name'] . "` DROP PRIMARY KEY");

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by labeshops » Sun Jun 19, 2016 3:11 am

still not working. seems like everything causes another error.

I have a working test installation of v2.2 - would it be easier to just import my data into it's database (which just has the demo data in it now)?

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Sun Jun 19, 2016 3:25 am

labeshops wrote:still not working. seems like everything causes another error.

I have a working test installation of v2.2 - would it be easier to just import my data into it's database (which just has the demo data in it now)?
You can always try here:
http://www.opencart.com/index.php?route ... n_id=24347

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by beebl3brox » Sun Jun 19, 2016 3:26 am

I have a quick question, I'm still on 1.5 and have made so many changes to core files, and installed many themes/mods etc which may or may not have done the same that I've lost track of them all.

Would it be possible in my case to start with a fresh install (to a test folder somewhere) of 2.2 and just upgrade the database? If so how would I go about that?

Install 2.2 first then import my current 1.5 database and use your upgrade script?

thanks,

User avatar
Newbie

Posts

Joined
Sun Jun 19, 2016 3:19 am

Post by pm-netti » Sun Jun 19, 2016 2:31 pm

@beelbl3rox
It is possible

@labeshops
Is your operating system Linux?

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by labeshops » Sun Jun 19, 2016 7:24 pm

Not sure but I think it is linux. Will have to check with evolve.

I would be interested in just upgrading the database too as I already have a clean 2.2 running - anyone know how to do that?

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Sun Jun 19, 2016 8:07 pm

labeshops wrote:Not sure but I think it is linux. Will have to check with evolve.

I would be interested in just upgrading the database too as I already have a clean 2.2 running - anyone know how to do that?
If your system is Linux, it is reason your upgrade problems. :)
You are do upgrade from version 1.5.x. Yes, it is known how the update is done :) Create new tables, create new columns, rename few colums name, add new setting data, change image paths ('data/' to 'catalog/'), move modules data from table setting, change data to Json format etc. :)

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by labeshops » Sun Jun 19, 2016 8:27 pm

aren't all servers either linux or windows? I know mine isn't windows. I know evolve has upgraded several opencart stores so don't think this is a problem.

I know it's apache. Is apache linux?

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by pm-netti » Mon Jun 20, 2016 12:09 am

labeshops wrote:aren't all servers either linux or windows? I know mine isn't windows. I know evolve has upgraded several opencart stores so don't think this is a problem.

I know it's apache. Is apache linux?
You can look your operating system in this script:

Code: Select all

echo php_uname();
I am tested this me Linux server.
You can try this:
1. Upload clien this install script.
2. When upgrade stop errors: press AGAIN button continue.

-peku-

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by pm-netti » Mon Jun 20, 2016 4:02 pm

recommed, 1000.php line 230:

Code: Select all

$sql = "ALTER TABLE `" . $table['name'] . "` CHANGE `" . $field['name'] . "` `" . $field['name'] . "` " . strtoupper($field['type']);
change to:

Code: Select all

$sql = "ALTER TABLE `" . $table['name'] . "` MODIFY `" . $field['name'] . "` " . strtoupper($field['type']);
Reason: this is not try change column name, but it modify column type necessary.

Image
- - - OpenCart Upgrade Service - - -


User avatar
Active Member

Posts

Joined
Sat Apr 07, 2012 11:22 pm
Location - Kittilä-Finland

Post by EvolveWebHosting » Tue Jun 21, 2016 3:31 am

Her upgrade issues were resolved and it had to do with a column added by an old extension that isn't supported anymore. The script itself is working just fine from 1.5.6.4 to 2.2

Image
https://www.evolvewebhost.com
Unhappy with your current host? We can migrate your account today (usually for no fee)! Visit our website and signup and we'll take care of the rest!
24/7/365 support
Image


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA

Post by labeshops » Tue Jun 21, 2016 10:08 am

Yup, thanks to Evolve, my awesome web hosts, I am upgrade! Have a bunch of work to do mainly in redesign, but everything is working if not pretty yet :)

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by kirkhall » Thu Jun 23, 2016 8:19 am

I'm not sure if this is because I used the script improvements provided in this thread or if it's something else but I just noticed something.
I was trying to change some wording in the language files and was not having any success...I would make the change to the correct language file but nothing would change.
Instead of editing the catalog/language/english/checkout/checkout.php which should be correct in my case I am having to edit catalog/language/en-gb/checkout/checkout.php for example. Not a huge deal but I'm just used to going to the english directory and not en-gb.
The default language in settings is set to English.
If I go to settings>>localization>>languages English is listed but the code is en-gb. If I try to edit the english language and change the code to english from the pull down and save I get an error on the front end.
"Notice: Undefined index: en-gb in /home/username/public_html/mydomain.com/catalog/controller/startup/startup.php on line 81
Do I need to add a language at settings>>localization>>languages , e.g. english there instead of trying to edit the one listed there?

Active Member

Posts

Joined
Thu May 22, 2014 11:31 am
Location - Missouri, USA

Post by labeshops » Thu Jun 23, 2016 9:24 am

Version 2.2 does not use the English folder - it uses the en-gb folder. So any language changes you need to make, you need to do in that folder.

Running Opencart v2.2 with multi-stores from http://www.labeshops.com which has links to all my stores.

Image


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA
Who is online

Users browsing this forum: No registered users and 13 guests