X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   4.5.0 Database upgrade packs released (https://forum.x-cart.com/showthread.php?t=63693)

rocky 05-21-2012 04:50 AM

4.5.0 Database upgrade packs released
 
1 Attachment(s)
We are glad to announce that 4.5.0 database upgrade packs have been released and available for downloading in your personal HelpDesk -> X-Cart -> 4.5.0 folder.

The upgrade instruction is attached to this message

ISG 05-23-2012 07:25 AM

Re: 4.5.0 Database upgrade packs released
 
Thanks!

I ran into a few small problems in the process of upgrading from 4.2.3 to 4.5.0. Just listing them here in case they happen to anyone else.

The first problem had to do with caching, I think. As soon as I ran upgrade_sql.php, it said, "ERROR in upg_get_all_languages_charsets function. $all_languages array is empty". I couldn't figure out how to get the charsets cache to work, so I just added these lines to simulate cached values:

Code:

@@ -1139,6 +1139,7 @@
    } else {
        $translators = _upg_get_language_translators();
        $all_languages = func_data_cache_get('charsets');
+        $all_languages = array('US' => 'utf-8');
        $_new_all_languages = array();
        foreach ($all_languages as $k => $value) {
            $_new_all_languages[$translators[$k]] = $value;
@@ -1961,6 +1962,7 @@
        $all_languages = func_data_cache_get('languages', array('en'));
    } else {
        $all_languages = func_data_cache_get('charsets');
+        $all_languages = array('US' => 'utf-8');
        $_new_all_languages = array();
        foreach ($all_languages as $k => $value) {
            $_new_all_languages[$translators[$k]] = $value;
@@ -4335,6 +4337,7 @@
                $all_languages = func_data_cache_get('languages', array('en'));
    } else {
        $all_languages = func_data_cache_get('charsets');
+        $all_languages = array('US' => 'utf-8');
        foreach ($all_languages as $k => $value) {
            $all_languages[$k] = array();
            $all_languages[$k]['charset'] = $value;



The second problem occurred while the tables were being upgraded. This query:

Code:

ALTER TABLE $sql_tbl[address_book] ADD UNIQUE `no_dups_in_addressbook` (title,firstname,lastname,userid,address,city,county,state,country,zipcode)

failed with a MySQL error: "Specified key was too long; max key length is 1000 bytes". That's because my database's default charset was already UTF-8, so when the upgrade pack created the xcart_address_book table, it was UTF-8. Then, upgrade_sql.php tried to create an index with about 700 characters. That would work with an ISO 8859 table, but with UTF-8, MySQL assumes each character will take up 3 bytes for this purpose, so 700 charcters = 2100 bytes, which exceeds the 1000-byte maximum.

To get around this, I just used a shorter index:

Code:

ALTER TABLE $sql_tbl[address_book] ADD UNIQUE `no_dups_in_addressbook` (userid,address,zipcode)

When the conversion was done, I found that some characters (in user data and category names) were garbled when I browsed the store, because the store was set to display pages as ISO 8859-1, but the data was actually UTF-8. So I changed my language's charset to UTF-8.

Code:

UPDATE xcart_language_codes SET charset='UTF-8' WHERE lngid = 40;

I'm not sure if this is the right way to do what I want, but it seems to be the equivalent of changing the charset setting while editing a language in older versions of X-Cart. (I had set my language's charset to UTF-8 in the 4.2.3 version of the store.)

cflsystems 05-23-2012 08:30 AM

Re: 4.5.0 Database upgrade packs released
 
Thanks for sharing. You may wanna pass this to QT, hopefully rocky is monitoring and will look into it

rocky 05-23-2012 09:30 PM

Re: 4.5.0 Database upgrade packs released
 
Quote:

Originally Posted by ISG
Thanks!

I ran into a few small problems in the process of upgrading from 4.2.3 to 4.5.0. Just listing them here in case they happen to anyone else.



Thank you for the report. Could you please post the same to our open bugtracker so that our maintenance engineers could investigate it further?

https://bugtracker.qtmsoft.com/bug_report_page.php

Thank you in advance.

cflsystems 07-19-2012 09:59 AM

Re: 4.5.0 Database upgrade packs released
 
This 2 exact same issues happened to me today but on 4.3.2-4.5.0 upgrade. The day before with 4.2.3-4.5.0 upgrade all went ok - the problems were not present. Alex are you re-releasing the patches to account for this?

peccos 01-13-2013 10:34 AM

Re: 4.5.0 Database upgrade packs released
 
Hi, I am having the issues with 4.1.12 to 4.5.0. Is it possible to have a patch or something to bypass this issue?

Thanks

thebluedoorboutique 01-16-2013 02:58 PM

Re: 4.5.0 Database upgrade packs released
 
Can you explain to me what these "upgrade packs" are? Does this make going from a version like 4.4.2 to 4.5 easier? Please advise.

sym0n 01-18-2013 03:33 AM

Re: 4.5.0 Database upgrade packs released
 
I am having issue too.

I am upgrading from 4.2.3 to 4.5.

I used the fix ISG posted (thanks ISG) for the "ERROR in upg_get_all_languages_charsets function. $all_languages array is empty" error, which got me past that point.

Now i am getting :

Applying table differences 4.2.3-4.4.0.
SQL error #1267 : Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
SQL query: UPDATE xcart_customer_bonuses INNER JOIN xcart_customers ON xcart_customers.username=xcart_customer_bonuses.lo gin SET xcart_customer_bonuses.userid=xcart_customers.id

Not really sure where to go from here.

Any help would be good.

Thanks

sym0n 01-18-2013 03:53 AM

Re: 4.5.0 Database upgrade packs released
 
Quote:

Originally Posted by sym0n
Now i am getting :

Applying table differences 4.2.3-4.4.0.
SQL error #1267 : Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
SQL query: UPDATE xcart_customer_bonuses INNER JOIN xcart_customers ON xcart_customers.username=xcart_customer_bonuses.lo gin SET xcart_customer_bonuses.userid=xcart_customers.id



I fixed the above by restarting apache.

Now i am getting :

Creating a new tables definition for 4.2.3-4.4.0.
SQL error #1075 : Incorrect table definition; there can be only one auto column and it must be defined as a key
SQL query: ALTER TABLE xcart_customers DROP PRIMARY KEY

peccos 01-29-2013 06:38 PM

Re: 4.5.0 Database upgrade packs released
 
I am getting something similar, how did you fix this ?

Creating a new tables definition for 4.1.12-4.4.0. .
SQL error #1075 : Incorrect table definition; there can be only one auto column and it must be defined as a key
SQL query: ALTER TABLE xcart_customers DROP PRIMARY KEY


All times are GMT -8. The time now is 09:29 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.