Page 10 of 13
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Fri Jun 17, 2016 9:51 pm
by labeshops
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
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Fri Jun 17, 2016 11:25 pm
by pm-netti
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?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sat Jun 18, 2016 12:56 am
by labeshops
Afraid I don't know - the upgrade script code is beyond my limited php knowledge

Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sat Jun 18, 2016 3:28 pm
by pm-netti
labeshops wrote:Afraid I don't know - the upgrade script code is beyond my limited php knowledge

You can try, 1000.php line 258:
change to:
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 12:26 am
by Jentoo
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
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 12:57 am
by labeshops
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
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 3:01 am
by pm-netti
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");
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 3:11 am
by labeshops
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)?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 3:25 am
by pm-netti
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
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 3:26 am
by beebl3brox
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,
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 2:31 pm
by pm-netti
@beelbl3rox
It is possible
@labeshops
Is your operating system Linux?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 7:24 pm
by labeshops
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?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 8:07 pm
by pm-netti
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.

Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Sun Jun 19, 2016 8:27 pm
by labeshops
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?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Mon Jun 20, 2016 12:09 am
by pm-netti
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:
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-
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Mon Jun 20, 2016 4:02 pm
by pm-netti
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.
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Tue Jun 21, 2016 3:31 am
by EvolveWebHosting
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
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Tue Jun 21, 2016 10:08 am
by labeshops
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

Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Thu Jun 23, 2016 8:19 am
by kirkhall
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?
Re: 2.2.0.0 Upgrade Script Improvements by Qphoria - TEST PL
Posted: Thu Jun 23, 2016 9:24 am
by labeshops
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.