AlegroCart open source E-commerce
Web hosting by Host1Plus

v1.2.1 bugs

Enter AlegroCart Bugs Here, but if you're not certain, post in General support first.

Re: v1.2.x bugs

Postby Brent » Mon Apr 12, 2010 1:21 pm

Yes , the index.php files were a safety net for live windows servers. They should be changed.

As far as the URL change in line 75, I'll have to test that one out.
It seems odd that that line worked fine in the old opencart 7.7, 7.8, and 7.9.
It has never been change since the URL alias was introduced.
I just checked and it was still the same in Chromiumcart.

Code: Select all
 $link = 'index.php?' . $qs;

This creates problems in URL alias. I still think is only masks the problem.
If you turn on url alias in admin, I think your problem will be back.
My suggestion would be to try RewriteBase /ALEGROCART-1.2.1/upload/
in your .htaccess
User avatar
Brent
Site Admin
 
Posts: 4370
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: v1.2.x bugs

Postby gob33 » Fri Apr 16, 2010 2:43 am

index.php is introduced in the address by the RewriteRule of htaccess.
For me, on XP and Apache 2.2.15, someting doesn't work, links on first page are non functionnals.
After tests with own pages in another directory and same htaccess, I can say mod_rewrite is fonctionning on my localhost. The pb is elsewhere (RewiteRule and query string??), Im searching.......

Have looked at OpenCart for comparison, seems 'index.php' is hardcoded in the source, like this line:
Code: Select all
$this->redirect(HTTPS_SERVER . 'index.php?route=localisation/zone' . $url);


My modif on line 75 is NOT good when using alias. It doesnt work in that case.
But I think it could be used with modifications for alias (dont know all Alegro code).
The benefits would be speed and bigger performance as it bypass .htaccess.
gob33
 
Posts: 107
Joined: Wed Apr 07, 2010 3:10 pm

Re: v1.2.x bugs

Postby Brent » Fri Apr 16, 2010 7:52 am

The .htaccess is not the problem.

As far as the links containing the 'index.php' , That should not be required.
It is probably something in httpd.conf not directing you to the index.php.
Check for index.php in this def.
Code: Select all
<IfModule dir_module>
   DirectoryIndex index.html index.php
</IfModule>


You could try WAMP as a test and see what is difference.
Also, Check config.php. I'm sure it is correct though. Should look like:
define('DIR_BASE', 'C:\\XAMPP\\htdocs\\alegro\\');
define('HTTP_BASE', 'http://localhost/alegro/');

This should fix your problem. I test on XAMPP server without URL Alias, with URL alias, and with SEO
Worked fine with all.

In library\environment\url.php
Code: Select all
$link = '?' . $qs;

Change to
Code: Select all
$link = $this->config->get('config_url_alias') ? '?' . $qs : 'index.php?' . $qs;


Try that
User avatar
Brent
Site Admin
 
Posts: 4370
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: v1.2.x bugs

Postby gob33 » Fri Apr 16, 2010 9:37 am

Finally, i get it worked, huh.
All my environment was good as Ive tested with test files in another directory.
http.conf, DIR_BASE, mod_rewrite, ... all verified, re-verified, good.

I based myself on the Query String
Commented RewriteBase (useless here) as physical path same as URI.
Code: Select all
#RewriteBase /


Changed the rules in .htaccess from
Code: Select all
#AlegroCart REWRITES START
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php/$1 [L,QSA]
#AlegroCart REWRITES END

to:
Code: Select all
#AlegroCart REWRITES START
RewriteCond %{QUERY_STRING} ^controller=
RewriteRule ^(.*) $1index.php? [L,QSA]
#AlegroCart REWRITES END

In the old one, conditions (not a directory) prevents execution of the rule (false).
The new condition/rule works for shop and admin parts.
*** Now the rewrite occurs very well ***
If you change ONE char in the new rule, certainly goes to fail directly.
Note that many posts/blogs on internet are not really complete about Query Strings.

Also, I have read that book:
Apress_The_Definitive_Guide_to_Apache_mod_rewrite_Feb_2006 (150p)
but it was not DEEP covering query strings.
gob33
 
Posts: 107
Joined: Wed Apr 07, 2010 3:10 pm

Re: v1.2.x bugs

Postby Brent » Mon Apr 19, 2010 8:11 am

Code: Select all
#AlegroCart REWRITES START
RewriteCond %{QUERY_STRING} ^controller=
RewriteRule ^(.*) $1index.php? [L,QSA]
#AlegroCart REWRITES END

Won't work on XAMPP with SEO enabled
Won't work with URL Alias enabled
Will work with URL Alias off
Won't work unless RewriteBase /Subfolder/ is specified

.htaccess in distribution works with url alias off, on, and SEO Urls.

All the same in WAMP Server, My own windows server using Virtual hosts, and several Unix production server installs. ?
User avatar
Brent
Site Admin
 
Posts: 4370
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: v1.2.1 bugs

Postby gob33 » Mon Apr 19, 2010 2:39 pm

Yeah, you are right, my 2nd modif doesn't work with Alias on. Was so happy I didnt check that.
I re-did a clean install of distro, and re-read all your posts.
Then discovered a missing 'index.php' in my httpd.conf there:
Code: Select all
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

With that, all runs without any modif now, but i dont understand the rule.
Runs also with rule commented out (??) and alias Off.
But not if rule commented out and alias On.
If httpd.conf not configured like that, fails. Rather technical for dummies.
gob33
 
Posts: 107
Joined: Wed Apr 07, 2010 3:10 pm

Re: v1.2.1 bugs

Postby Brent » Mon Apr 19, 2010 3:05 pm

If you are not running URL alias or SEO, the mod_rewrite should not be required, as long as index.php is specified as a default load file in httpd.conf.
In the WAMP and ZAMPP servers, they have just about every possibility listed, about 20.

As soon as you serve a non standard format like url alias or complete SEO, then you need the rule and mod_rewrite.
Don't feel bad, I had to do a lot of playing to find the right solution that would work on all my servers.

When I release the next version, which will be beta due to about 40,000 lines of rewrite, I'll give you some more headaches.
User avatar
Brent
Site Admin
 
Posts: 4370
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: v1.2.1 bugs

Postby gob33 » Wed Apr 21, 2010 10:07 am

I would like to update french regions/departments in TABLE_ZONE.
What is in the file is some old list which is bad/incomplete.
The pb is that I have a number of entries > the old list, so it decals all entries after.
These can drive to incompatibilities with existing DBs (customers address,...).
Is there a possibility to do that ??

Below, an update for TABLE_COUNTRY, with latest ISO 3166-1(IDs are compatible with old ones):
Code: Select all
# --------------------------------------------------------
# ISO 3166-1: official codes of 246 countries, territories, or areas of geographical interest.
#
INSERT INTO `country` VALUES (240, 'Aaland Islands', 0, 'AX', 'ALA', '');    ### New 2004/02/13
INSERT INTO `country` VALUES (  1, 'Afghanistan', 0, 'AF', 'AFG', '');
INSERT INTO `country` VALUES (  2, 'Albania', 0, 'AL', 'ALB', '');
INSERT INTO `country` VALUES (  3, 'Algeria', 0, 'DZ', 'DZA', '');
INSERT INTO `country` VALUES (  4, 'American Samoa', 0, 'AS', 'ASM', '');
INSERT INTO `country` VALUES (  5, 'Andorra', 0, 'AD', 'AND', '');
INSERT INTO `country` VALUES (  6, 'Angola', 0, 'AO', 'AGO', '');
INSERT INTO `country` VALUES (  7, 'Anguilla', 0, 'AI', 'AIA', '');
INSERT INTO `country` VALUES (  8, 'Antarctica', 0, 'AQ', 'ATA', '');
INSERT INTO `country` VALUES (  9, 'Antigua and Barbuda', 0, 'AG', 'ATG', '');
INSERT INTO `country` VALUES ( 10, 'Argentina', 0, 'AR', 'ARG', '');
INSERT INTO `country` VALUES ( 11, 'Armenia', 0, 'AM', 'ARM', '');
INSERT INTO `country` VALUES ( 12, 'Aruba', 0, 'AW', 'ABW', '');
INSERT INTO `country` VALUES ( 13, 'Australia', 0, 'AU', 'AUS', '');
INSERT INTO `country` VALUES ( 14, 'Austria', 0, 'AT', 'AUT', '');
INSERT INTO `country` VALUES ( 15, 'Azerbaijan', 0, 'AZ', 'AZE', '');
INSERT INTO `country` VALUES ( 16, 'Bahamas', 0, 'BS', 'BHS', '');
INSERT INTO `country` VALUES ( 17, 'Bahrain', 0, 'BH', 'BHR', '');
INSERT INTO `country` VALUES ( 18, 'Bangladesh', 0, 'BD', 'BGD', '');
INSERT INTO `country` VALUES ( 19, 'Barbados', 0, 'BB', 'BRB', '');
INSERT INTO `country` VALUES ( 20, 'Belarus', 0, 'BY', 'BLR', '');
INSERT INTO `country` VALUES ( 21, 'Belgium', 0, 'BE', 'BEL', '');
INSERT INTO `country` VALUES ( 22, 'Belize', 0, 'BZ', 'BLZ', '');
INSERT INTO `country` VALUES ( 23, 'Benin', 0, 'BJ', 'BEN', '');
INSERT INTO `country` VALUES ( 24, 'Bermuda', 0, 'BM', 'BMU', '');
INSERT INTO `country` VALUES ( 25, 'Bhutan', 0, 'BT', 'BTN', '');
INSERT INTO `country` VALUES ( 26, 'Bolivia', 0, 'BO', 'BOL', '');
INSERT INTO `country` VALUES ( 27, 'Bosnia and Herzegowina', 0, 'BA', 'BIH', '');
INSERT INTO `country` VALUES ( 28, 'Botswana', 0, 'BW', 'BWA', '');
INSERT INTO `country` VALUES ( 29, 'Bouvet Island', 0, 'BV', 'BVT', '');
INSERT INTO `country` VALUES ( 30, 'Brazil', 0, 'BR', 'BRA', '');
INSERT INTO `country` VALUES ( 31, 'British Indian Ocean Territory', 0, 'IO', 'IOT', '');
INSERT INTO `country` VALUES ( 32, 'Brunei Darussalam', 0, 'BN', 'BRN', '');
INSERT INTO `country` VALUES ( 33, 'Bulgaria', 0, 'BG', 'BGR', '');
INSERT INTO `country` VALUES ( 34, 'Burkina Faso', 0, 'BF', 'BFA', '');
INSERT INTO `country` VALUES ( 35, 'Burundi', 0, 'BI', 'BDI', '');
INSERT INTO `country` VALUES ( 36, 'Cambodia', 0, 'KH', 'KHM', '');
INSERT INTO `country` VALUES ( 37, 'Cameroon', 0, 'CM', 'CMR', '');
INSERT INTO `country` VALUES ( 38, 'Canada', 0, 'CA', 'CAN', '');
INSERT INTO `country` VALUES ( 39, 'Cape Verde', 0, 'CV', 'CPV', '');
INSERT INTO `country` VALUES ( 40, 'Cayman Islands', 0, 'KY', 'CYM', '');
INSERT INTO `country` VALUES ( 41, 'Central African Republic', 0, 'CF', 'CAF', '');
INSERT INTO `country` VALUES ( 42, 'Chad', 0, 'TD', 'TCD', '');
INSERT INTO `country` VALUES ( 43, 'Chile', 0, 'CL', 'CHL', '');
INSERT INTO `country` VALUES ( 44, 'China', 0, 'CN', 'CHN', '');
INSERT INTO `country` VALUES ( 45, 'Christmas Island', 0, 'CX', 'CXR', '');
INSERT INTO `country` VALUES ( 46, 'Cocos (Keeling) Islands', 0, 'CC', 'CCK', '');
INSERT INTO `country` VALUES ( 47, 'Colombia', 0, 'CO', 'COL', '');
INSERT INTO `country` VALUES ( 48, 'Comoros', 0, 'KM', 'COM', '');
INSERT INTO `country` VALUES (237, 'Congo, Democratic Republic of (was Zaire)', 0, 'CD', 'COD', '');    ### New name
INSERT INTO `country` VALUES ( 49, 'Congo, Republic of', 0, 'CG', 'COG', '');
INSERT INTO `country` VALUES ( 50, 'Cook Islands', 0, 'CK', 'COK', '');
INSERT INTO `country` VALUES ( 51, 'Costa Rica', 0, 'CR', 'CRI', '');
INSERT INTO `country` VALUES ( 52, 'Cote d''Ivoire', 0, 'CI', 'CIV', '');
INSERT INTO `country` VALUES ( 53, 'Croatia (local name: Hrvatska)', 0, 'HR', 'HRV', '');
INSERT INTO `country` VALUES ( 54, 'Cuba', 0, 'CU', 'CUB', '');
INSERT INTO `country` VALUES ( 55, 'Cyprus', 0, 'CY', 'CYP', '');
INSERT INTO `country` VALUES ( 56, 'Czech Republic', 0, 'CZ', 'CZE', '');
INSERT INTO `country` VALUES ( 57, 'Denmark', 0, 'DK', 'DNK', '');
INSERT INTO `country` VALUES ( 58, 'Djibouti', 0, 'DJ', 'DJI', '');
INSERT INTO `country` VALUES ( 59, 'Dominica', 0, 'DM', 'DMA', '');
INSERT INTO `country` VALUES ( 60, 'Dominican Republic', 0, 'DO', 'DOM', '');
INSERT INTO `country` VALUES ( 62, 'Ecuador', 0, 'EC', 'ECU', '');
INSERT INTO `country` VALUES ( 63, 'Egypt', 0, 'EG', 'EGY', '');
INSERT INTO `country` VALUES ( 64, 'El salvador', 0, 'SV', 'SLV', '');
INSERT INTO `country` VALUES ( 65, 'Equatorial Guinea', 0, 'GQ', 'GNQ', '');
INSERT INTO `country` VALUES ( 66, 'Eritrea', 0, 'ER', 'ERI', '');
INSERT INTO `country` VALUES ( 67, 'Estonia', 0, 'EE', 'EST', '');
INSERT INTO `country` VALUES ( 68, 'Ethiopia', 0, 'ET', 'ETH', '');
INSERT INTO `country` VALUES ( 69, 'Falkland Islands (Malvinas)', 0, 'FK', 'FLK', '');
INSERT INTO `country` VALUES ( 70, 'Faroe Islands', 0, 'FO', 'FRO', '');
INSERT INTO `country` VALUES ( 71, 'Fiji', 0, 'FJ', 'FJI', '');
INSERT INTO `country` VALUES ( 72, 'Finland', 0, 'FI', 'FIN', '');
INSERT INTO `country` VALUES ( 73, 'France', 0, 'FR', 'FRA', '');
INSERT INTO `country` VALUES ( 74, 'France, Metropolitan', 0, 'FX', 'FXX', '');
INSERT INTO `country` VALUES ( 75, 'French Guiana', 0, 'GF', 'GUF', '');
INSERT INTO `country` VALUES ( 76, 'French Polynesia', 0, 'PF', 'PYF', '');
INSERT INTO `country` VALUES ( 77, 'French Southern Territories', 0, 'TF', 'ATF', '');
INSERT INTO `country` VALUES ( 78, 'Gabon', 0, 'GA', 'GAB', '');
INSERT INTO `country` VALUES ( 79, 'Gambia', 0, 'GM', 'GMB', '');
INSERT INTO `country` VALUES ( 80, 'Georgia', 0, 'GE', 'GEO', '');
INSERT INTO `country` VALUES ( 81, 'Germany', 0, 'DE', 'DEU', '');
INSERT INTO `country` VALUES ( 82, 'Ghana', 0, 'GH', 'GHA', '');
INSERT INTO `country` VALUES ( 83, 'Gibraltar', 0, 'GI', 'GIB', '');
INSERT INTO `country` VALUES ( 84, 'Greece', 0, 'GR', 'GRC', '');
INSERT INTO `country` VALUES ( 85, 'Greenland', 0, 'GL', 'GRL', '');
INSERT INTO `country` VALUES ( 86, 'Grenada', 0, 'GD', 'GRD', '');
INSERT INTO `country` VALUES ( 87, 'Guadeloupe', 0, 'GP', 'GLP', '');
INSERT INTO `country` VALUES ( 88, 'Guam', 0, 'GU', 'GUM', '');
INSERT INTO `country` VALUES ( 89, 'Guatemala', 0, 'GT', 'GTM', '');
INSERT INTO `country` VALUES (241, 'Guernsey', 0, 'GG', 'GGY', '');    ### New 2006/03/29
INSERT INTO `country` VALUES ( 90, 'Guinea', 0, 'GN', 'GIN', '');
INSERT INTO `country` VALUES ( 91, 'Guinea-Bissau', 0, 'GW', 'GNB', '');
INSERT INTO `country` VALUES ( 92, 'Guyana', 0, 'GY', 'GUY', '');
INSERT INTO `country` VALUES ( 93, 'Haiti', 0, 'HT', 'HTI', '');
INSERT INTO `country` VALUES ( 94, 'Heard Island and Mc Donald Islands', 0, 'HM', 'HMD', '');
INSERT INTO `country` VALUES ( 95, 'Honduras', 0, 'HN', 'HND', '');
INSERT INTO `country` VALUES ( 96, 'Hong kong', 0, 'HK', 'HKG', '');
INSERT INTO `country` VALUES ( 97, 'Hungary', 0, 'HU', 'HUN', '');
INSERT INTO `country` VALUES ( 98, 'Iceland', 0, 'IS', 'ISL', '');
INSERT INTO `country` VALUES ( 99, 'India', 0, 'IN', 'IND', '');
INSERT INTO `country` VALUES (100, 'Indonesia', 0, 'ID', 'IDN', '');
INSERT INTO `country` VALUES (101, 'Iran (Islamic Republic of)', 0, 'IR', 'IRN', '');
INSERT INTO `country` VALUES (102, 'Iraq', 0, 'IQ', 'IRQ', '');
INSERT INTO `country` VALUES (103, 'Ireland', 0, 'IE', 'IRL', '');
INSERT INTO `country` VALUES (242, 'Isle of Man', 0, 'IM', 'IMN', '');    ### New 2006/03/29
INSERT INTO `country` VALUES (104, 'Israel', 0, 'IL', 'ISR', '');
INSERT INTO `country` VALUES (105, 'Italy', 0, 'IT', 'ITA', '');
INSERT INTO `country` VALUES (106, 'Jamaica', 0, 'JM', 'JAM', '');
INSERT INTO `country` VALUES (107, 'Japan', 0, 'JP', 'JPN', '');
INSERT INTO `country` VALUES (243, 'Jersey', 0, 'JE', 'JEY', '');    ### New 2006/03/29
INSERT INTO `country` VALUES (108, 'Jordan', 0, 'JO', 'JOR', '');
INSERT INTO `country` VALUES (109, 'Kazakhstan', 0, 'KZ', 'KAZ', '');
INSERT INTO `country` VALUES (110, 'Kenya', 0, 'KE', 'KEN', '');
INSERT INTO `country` VALUES (111, 'Kiribati', 0, 'KI', 'KIR', '');
INSERT INTO `country` VALUES (112, 'Korea, Democratic People''s Republic of', 0, 'KP', 'PRK', '');
INSERT INTO `country` VALUES (113, 'Korea, Republic of', 0, 'KR', 'KOR', '');
INSERT INTO `country` VALUES (114, 'Kuwait', 0, 'KW', 'KWT', '');
INSERT INTO `country` VALUES (115, 'Kyrgyzstan', 0, 'KG', 'KGZ', '');
INSERT INTO `country` VALUES (116, 'Lao People''s Democratic Republic', 0, 'LA', 'LAO', '');
INSERT INTO `country` VALUES (117, 'Latvia', 0, 'LV', 'LVA', '');
INSERT INTO `country` VALUES (118, 'Lebanon', 0, 'LB', 'LBN', '');
INSERT INTO `country` VALUES (119, 'Lesotho', 0, 'LS', 'LSO', '');
INSERT INTO `country` VALUES (120, 'Liberia', 0, 'LR', 'LBR', '');
INSERT INTO `country` VALUES (121, 'Libyan Arab Jamahiriya', 0, 'LY', 'LBY', '');
INSERT INTO `country` VALUES (122, 'Liechtenstein', 0, 'LI', 'LIE', '');
INSERT INTO `country` VALUES (123, 'Lithuania', 0, 'LT', 'LTU', '');
INSERT INTO `country` VALUES (124, 'Luxembourg', 0, 'LU', 'LUX', '');
INSERT INTO `country` VALUES (125, 'Macau', 0, 'MO', 'MAC', '');
INSERT INTO `country` VALUES (126, 'Macedonia, The Former Yugoslav Republic of', 0, 'MK', 'MKD', '');
INSERT INTO `country` VALUES (127, 'Madagascar', 0, 'MG', 'MDG', '');
INSERT INTO `country` VALUES (128, 'Malawi', 0, 'MW', 'MWI', '');
INSERT INTO `country` VALUES (129, 'Malaysia', 0, 'MY', 'MYS', '');
INSERT INTO `country` VALUES (130, 'Maldives', 0, 'MV', 'MDV', '');
INSERT INTO `country` VALUES (131, 'Mali', 0, 'ML', 'MLI', '');
INSERT INTO `country` VALUES (132, 'Malta', 0, 'MT', 'MLT', '');
INSERT INTO `country` VALUES (133, 'Marshall Islands', 0, 'MH', 'MHL', '');
INSERT INTO `country` VALUES (134, 'Martinique', 0, 'MQ', 'MTQ', '');
INSERT INTO `country` VALUES (135, 'Mauritania', 0, 'MR', 'MRT', '');
INSERT INTO `country` VALUES (136, 'Mauritius', 0, 'MU', 'MUS', '');
INSERT INTO `country` VALUES (137, 'Mayotte', 0, 'YT', 'MYT', '');
INSERT INTO `country` VALUES (138, 'Mexico', 0, 'MX', 'MEX', '');
INSERT INTO `country` VALUES (139, 'Micronesia, Federated States of', 0, 'FM', 'FSM', '');
INSERT INTO `country` VALUES (140, 'Moldova, Republic of', 0, 'MD', 'MDA', '');
INSERT INTO `country` VALUES (141, 'Monaco', 0, 'MC', 'MCO', '');
INSERT INTO `country` VALUES (142, 'Mongolia', 0, 'MN', 'MNG', '');
INSERT INTO `country` VALUES (244, 'Montenegro', 0, 'ME', 'MNE', '');    ### New 2006/09/26
INSERT INTO `country` VALUES (143, 'Montserrat', 0, 'MS', 'MSR', '');
INSERT INTO `country` VALUES (144, 'Morocco', 0, 'MA', 'MAR', '');
INSERT INTO `country` VALUES (145, 'Mozambique', 0, 'MZ', 'MOZ', '');
INSERT INTO `country` VALUES (146, 'Myanmar', 0, 'MM', 'MMR', '');
INSERT INTO `country` VALUES (147, 'Namibia', 0, 'NA', 'NAM', '');
INSERT INTO `country` VALUES (148, 'Nauru', 0, 'NR', 'NRU', '');
INSERT INTO `country` VALUES (149, 'Nepal', 0, 'NP', 'NPL', '');
INSERT INTO `country` VALUES (150, 'Netherlands', 0, 'NL', 'NLD', '');
INSERT INTO `country` VALUES (151, 'Netherlands Antilles', 0, 'AN', 'ANT', '');
INSERT INTO `country` VALUES (152, 'New Caledonia', 0, 'NC', 'NCL', '');
INSERT INTO `country` VALUES (153, 'New Zealand', 0, 'NZ', 'NZL', '');
INSERT INTO `country` VALUES (154, 'Nicaragua', 0, 'NI', 'NIC', '');
INSERT INTO `country` VALUES (155, 'Niger', 0, 'NE', 'NER', '');
INSERT INTO `country` VALUES (156, 'Nigeria', 0, 'NG', 'NGA', '');
INSERT INTO `country` VALUES (157, 'Niue', 0, 'NU', 'NIU', '');
INSERT INTO `country` VALUES (158, 'Norfolk Island', 0, 'NF', 'NFK', '');
INSERT INTO `country` VALUES (159, 'Northern Mariana Islands', 0, 'MP', 'MNP', '');
INSERT INTO `country` VALUES (160, 'Norway', 0, 'NO', 'NOR', '');
INSERT INTO `country` VALUES (161, 'Oman', 0, 'OM', 'OMN', '');
INSERT INTO `country` VALUES (162, 'Pakistan', 0, 'PK', 'PAK', '');
INSERT INTO `country` VALUES (163, 'Palau', 0, 'PW', 'PLW', '');
INSERT INTO `country` VALUES (245, 'Palestinian Territory, occupied', 0, 'PS', 'PSE', '');    ### New 1999/10/01
INSERT INTO `country` VALUES (164, 'Panama', 0, 'PA', 'PAN', '');
INSERT INTO `country` VALUES (165, 'Papua New Guinea', 0, 'PG', 'PNG', '');
INSERT INTO `country` VALUES (166, 'Paraguay', 0, 'PY', 'PRY', '');
INSERT INTO `country` VALUES (167, 'Peru', 0, 'PE', 'PER', '');
INSERT INTO `country` VALUES (168, 'Philippines', 0, 'PH', 'PHL', '');
INSERT INTO `country` VALUES (169, 'Pitcairn', 0, 'PN', 'PCN', '');
INSERT INTO `country` VALUES (170, 'Poland', 0, 'PL', 'POL', '');
INSERT INTO `country` VALUES (171, 'Portugal', 0, 'PT', 'PRT', '');
INSERT INTO `country` VALUES (172, 'Puerto Rico', 0, 'PR', 'PRI', '');
INSERT INTO `country` VALUES (173, 'Qatar', 0, 'QA', 'QAT', '');
INSERT INTO `country` VALUES (174, 'Reunion', 0, 'RE', 'REU', '');
INSERT INTO `country` VALUES (175, 'Romania', 0, 'RO', 'ROU', '');
INSERT INTO `country` VALUES (176, 'Russian Federation', 0, 'RU', 'RUS', '');
INSERT INTO `country` VALUES (177, 'Rwanda', 0, 'RW', 'RWA', '');
INSERT INTO `country` VALUES (178, 'Saint Kitts and Nevis', 0, 'KN', 'KNA', '');
INSERT INTO `country` VALUES (179, 'Saint Lucia', 0, 'LC', 'LCA', '');
INSERT INTO `country` VALUES (180, 'Saint Vincent and The Grenadines', 0, 'VC', 'VCT', '');
INSERT INTO `country` VALUES (181, 'Samoa', 0, 'WS', 'WSM', '');
INSERT INTO `country` VALUES (182, 'San marino', 0, 'SM', 'SMR', '');
INSERT INTO `country` VALUES (183, 'Sao Tome and Principe', 0, 'ST', 'STP', '');
INSERT INTO `country` VALUES (184, 'Saudi Arabia', 0, 'SA', 'SAU', '');
INSERT INTO `country` VALUES (185, 'Senegal', 0, 'SN', 'SEN', '');
INSERT INTO `country` VALUES (246, 'Serbia', 0, 'RS', 'SRB', '');    ### New 2006/09/26
INSERT INTO `country` VALUES (186, 'Seychelles', 0, 'SC', 'SYC', '');
INSERT INTO `country` VALUES (187, 'Sierra Leone', 0, 'SL', 'SLE', '');
INSERT INTO `country` VALUES (188, 'Singapore', 0, 'SG', 'SGP', '');
INSERT INTO `country` VALUES (189, 'Slovakia (Slovak Republic)', 0, 'SK', 'SVK', '');
INSERT INTO `country` VALUES (190, 'Slovenia', 0, 'SI', 'SVN', '');
INSERT INTO `country` VALUES (191, 'Solomon Islands', 0, 'SB', 'SLB', '');
INSERT INTO `country` VALUES (192, 'Somalia', 0, 'SO', 'SOM', '');
INSERT INTO `country` VALUES (193, 'South Africa', 0, 'ZA', 'ZAF', '');
INSERT INTO `country` VALUES (194, 'South Georgia and The South Sandwich Islands', 0, 'GS', 'SGS', '');
INSERT INTO `country` VALUES (195, 'Spain', 0, 'ES', 'ESP', '');
INSERT INTO `country` VALUES (196, 'Sri Lanka', 0, 'LK', 'LKA', '');
INSERT INTO `country` VALUES (247, 'St. Barthelemy', 0, 'BL', 'BLM', '');    ### New 2007/09/21
INSERT INTO `country` VALUES (197, 'St. Helena, Ascension and Tristan da Cunha', 0, 'SH', 'SHN', '');
INSERT INTO `country` VALUES (248, 'St. Martin (french part)', 0, 'MF', 'MAF', '');    ### New 2007/09/21
INSERT INTO `country` VALUES (198, 'St. Pierre and Miquelon', 0, 'PM', 'SPM', '');
INSERT INTO `country` VALUES (199, 'Sudan', 0, 'SD', 'SDN', '');
INSERT INTO `country` VALUES (200, 'Suriname', 0, 'SR', 'SUR', '');
INSERT INTO `country` VALUES (201, 'Svalbard and Jan Mayen Islands', 0, 'SJ', 'SJM', '');
INSERT INTO `country` VALUES (202, 'Swaziland', 0, 'SZ', 'SWZ', '');
INSERT INTO `country` VALUES (203, 'Sweden', 0, 'SE', 'SWE', '');
INSERT INTO `country` VALUES (204, 'Switzerland', 0, 'CH', 'CHE', '');
INSERT INTO `country` VALUES (205, 'Syrian Arab Republic', 0, 'SY', 'SYR', '');
INSERT INTO `country` VALUES (206, 'Taiwan', 0, 'TW', 'TWN', '');
INSERT INTO `country` VALUES (207, 'Tajikistan', 0, 'TJ', 'TJK', '');
INSERT INTO `country` VALUES (208, 'Tanzania, United Republic of', 0, 'TZ', 'TZA', '');
INSERT INTO `country` VALUES (209, 'Thailand', 0, 'TH', 'THA', '');
INSERT INTO `country` VALUES (249, 'Timor-Leste', 0, 'TL', 'TLS', '');    ### New 2002/11/15
INSERT INTO `country` VALUES (210, 'Togo', 0, 'TG', 'TGO', '');
INSERT INTO `country` VALUES (211, 'Tokelau', 0, 'TK', 'TKL', '');
INSERT INTO `country` VALUES (212, 'Tonga', 0, 'TO', 'TON', '');
INSERT INTO `country` VALUES (213, 'Trinidad and Tobago', 0, 'TT', 'TTO', '');
INSERT INTO `country` VALUES (214, 'Tunisia', 0, 'TN', 'TUN', '');
INSERT INTO `country` VALUES (215, 'Turkey', 0, 'TR', 'TUR', '');
INSERT INTO `country` VALUES (216, 'Turkmenistan', 0, 'TM', 'TKM', '');
INSERT INTO `country` VALUES (217, 'Turks and Caicos Islands', 0, 'TC', 'TCA', '');
INSERT INTO `country` VALUES (218, 'Tuvalu', 0, 'TV', 'TUV', '');
INSERT INTO `country` VALUES (219, 'Uganda', 0, 'UG', 'UGA', '');
INSERT INTO `country` VALUES (220, 'Ukraine', 0, 'UA', 'UKR', '');
INSERT INTO `country` VALUES (221, 'United Arab Emirates', 0, 'AE', 'ARE', '');
INSERT INTO `country` VALUES (222, 'United Kingdom', 0, 'GB', 'GBR', '');
INSERT INTO `country` VALUES (223, 'United States', 0, 'US', 'USA', '');
INSERT INTO `country` VALUES (224, 'United States Minor Outlying Islands', 0, 'UM', 'UMI', '');
INSERT INTO `country` VALUES (225, 'Uruguay', 0, 'UY', 'URY', '');
INSERT INTO `country` VALUES (226, 'Uzbekistan', 0, 'UZ', 'UZB', '');
INSERT INTO `country` VALUES (227, 'Vanuatu', 0, 'VU', 'VUT', '');
INSERT INTO `country` VALUES (228, 'Vatican City State (Holy see)', 0, 'VA', 'VAT', '');
INSERT INTO `country` VALUES (229, 'Venezuela', 0, 'VE', 'VEN', '');
INSERT INTO `country` VALUES (230, 'Viet Nam', 0, 'VN', 'VNM', '');
INSERT INTO `country` VALUES (231, 'Virgin Islands (British)', 0, 'VG', 'VGB', '');
INSERT INTO `country` VALUES (232, 'Virgin Islands (U.S.)', 0, 'VI', 'VIR', '');
INSERT INTO `country` VALUES (233, 'Wallis and Futuna Islands', 0, 'WF', 'WLF', '');
INSERT INTO `country` VALUES (234, 'Western Sahara', 0, 'EH', 'ESH', '');
INSERT INTO `country` VALUES (235, 'Yemen', 0, 'YE', 'YEM', '');
INSERT INTO `country` VALUES (238, 'Zambia', 0, 'ZM', 'ZMB', '');
INSERT INTO `country` VALUES (239, 'Zimbabwe', 0, 'ZW', 'ZWE', '');

gob33
 
Posts: 107
Joined: Wed Apr 07, 2010 3:10 pm

Re: v1.2.1 bugs

Postby Brent » Wed Apr 21, 2010 10:29 am

I have not checked, but all references to country and zone should be by country_id and zone_id.
Just check the structure.sql to make sure.
If I 'm right, it will not affect by changing any field values as long as you maintain the same country to to country_id, which you said are the same.
You can do as an update, but requires a lot of coding.
The easiest solution is to drop and create new table with your data.

edited: I just looked and order uses country and zone names.
Let me think on that one.
User avatar
Brent
Site Admin
 
Posts: 4370
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: v1.2.1 bugs

Postby gob33 » Wed Apr 21, 2010 3:22 pm

For countries, have kept the same ID and numbered new IDs (up to bottom) starting from 239+1

Below the correct zones (with iso codes) for France (with NULL IDs, UTF-8 needed):
Code: Select all
# French regions (IDs 1091-1116)
INSERT INTO `zone` VALUES (NULL, 73, 'FR-A', 'Alsace', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-B', 'Aquitaine', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-C', 'Auvergne', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-P', 'Basse-Normandie', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-D', 'Bourgogne', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-E', 'Bretagne', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-F', 'Centre', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-G', 'Champagne-Ardenne', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-H', 'Corse', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-I', 'Franche-Comté', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-Q', 'Haute-Normandie', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-J', 'Île-de-France', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-K', 'Languedoc-Roussillon', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-L', 'Limousin', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-M', 'Lorraine', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-N', 'Midi-Pyrénées', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-O', 'Nord-Pas-de-Calais', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-R', 'Pays de la Loire', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-S', 'Picardie', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-T', 'Poitou-Charentes', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-U', 'Provence-Alpes-Côte d''Azur', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-V', 'Rhône-Alpes', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-GP', 'Guadeloupe', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-GF', 'Guyane', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-MQ', 'Martinique', 1);
INSERT INTO `zone` VALUES (NULL, 73, 'FR-RE', 'Réunion', 1);
# French departments (IDs 1117-1225)
INSERT INTO `zone` VALUES (NULL, 74, 'FR-01', 'Ain', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-02', 'Aisne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-03', 'Allier', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-04', 'Alpes de Haute Provence', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-05', 'Hautes-Alpes', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-06', 'Alpes Maritimes', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-07', 'Ardèche', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-08', 'Ardennes', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-09', 'Ariège', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-10', 'Aube', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-11', 'Aude', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-12', 'Aveyron', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-13', 'Bouches du Rhône', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-14', 'Calvados', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-15', 'Cantal', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-16', 'Charente', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-17', 'Charente Maritime', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-18', 'Cher', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-19', 'Corrèze', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-2A', 'Corse du Sud', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-2B', 'Haute Corse', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-21', 'Côte d''or', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-22', 'Côtes d''Armor', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-23', 'Creuse', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-24', 'Dordogne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-25', 'Doubs', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-26', 'Drôme', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-27', 'Eure', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-28', 'Eure et Loir', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-29', 'Finistère', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-30', 'Gard', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-31', 'Haute Garonne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-32', 'Gers', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-33', 'Gironde', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-34', 'Hérault', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-35', 'Ille et Vilaine', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-36', 'Indre', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-37', 'Indre et Loire', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-38', 'Isère', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-39', 'Jura', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-40', 'Landes', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-41', 'Loir et Cher', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-42', 'Loire', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-43', 'Haute Loire', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-44', 'Loire Atlantique', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-45', 'Loiret', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-46', 'Lot', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-47', 'Lot et Garonne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-48', 'Lozère', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-49', 'Maine et Loire', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-50', 'Manche', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-51', 'Marne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-52', 'Haute Marne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-53', 'Mayenne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-54', 'Meurthe et Moselle', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-55', 'Meuse', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-56', 'Morbihan', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-57', 'Moselle', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-58', 'Nièvre', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-59', 'Nord', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-60', 'Oise', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-61', 'Orne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-62', 'Pas de Calais', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-63', 'Puy de Dôme', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-64', 'Pyrénées Atlantiques', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-65', 'Hautes Pyrénées', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-66', 'Pyrénées Orientales', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-67', 'Bas Rhin', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-68', 'Haut Rhin', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-69', 'Rhône', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-70', 'Haute Saône', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-71', 'Saône et Loire', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-72', 'Sarthe', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-73', 'Savoie', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-74', 'Haute Savoie', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-75', 'Paris', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-76', 'Seine Maritime', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-77', 'Seine et Marne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-78', 'Yvelines', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-79', 'Deux Sèvres', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-80', 'Somme', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-81', 'Tarn', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-82', 'Tarn et Garonne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-83', 'Var', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-84', 'Vaucluse', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-85', 'Vendée', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-86', 'Vienne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-87', 'Haute Vienne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-88', 'Vosges', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-89', 'Yonne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-90', 'Territoire de Belfort', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-91', 'Essonne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-92', 'Hauts de Seine', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-93', 'Seine St-Denis', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-94', 'Val de Marne', 1);
INSERT INTO `zone` VALUES (NULL, 74, 'FR-95', 'Val d''Oise', 1);
INSERT INTO `zone` VALUES (NULL, 87, 'FR-GP', 'Guadeloupe', 1);
INSERT INTO `zone` VALUES (NULL, 134, 'FR-MQ', 'Martinique', 1);
INSERT INTO `zone` VALUES (NULL, 75, 'FR-GF', 'Guyane', 1);
INSERT INTO `zone` VALUES (NULL, 174, 'FR-RE', 'La Réunion', 1);
INSERT INTO `zone` VALUES (NULL, 198, 'FR-PM', 'Saint Pierre et Miquelon', 1);
INSERT INTO `zone` VALUES (NULL, 137, 'FR-YT', 'Mayotte', 1);
INSERT INTO `zone` VALUES (NULL, 247, 'FR-BL', 'Saint Barthélemy', 1);   ### New
INSERT INTO `zone` VALUES (NULL, 248, 'FR-MF', 'Saint Martin', 1);   ### New
INSERT INTO `zone` VALUES (NULL, 233, 'FR-WF', 'Wallis et Futuna', 1);
INSERT INTO `zone` VALUES (NULL, 76, 'FR-PF', 'Polynésie française', 1);
INSERT INTO `zone` VALUES (NULL, 152, 'FR-NC', 'Nouvelle Calédonie', 1);
INSERT INTO `zone` VALUES (NULL, 76, 'FR-CP', 'Clipperton', 1);   ## New
INSERT INTO `zone` VALUES (NULL, 77, 'FR-TF', 'Terres australes et antarctiques', 1);

The pb is it is longer than the list it replaces.
In particular, US zones are shifted like all the others under.
Have this pb in all e-commerce software, as often, zones are out-dated.
gob33
 
Posts: 107
Joined: Wed Apr 07, 2010 3:10 pm

PreviousNext

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron