If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading from 1.2 to 1.3.x / 1062 Duplicate entry '30' for key 1 in [INSERT INTO zen_configuration_group VALUES (3

1062 Duplicate entry '30' for key 1 in [INSERT INTO zen_configuration_group VALUES (3

Locked

Started by tj1 on 26 Jun 2006, 4:17 AM · Views: 3,088

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
26 Jun 2006, 4:17 AM
#1
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #1 by tj1

Hi, I'm trying to upgrade a ZC store from version 1.2.6 to the lastest 1.3.0.2.

I got the following message when trying to upgrade the database:
1062 Duplicate entry '30' for key 1
in:
[INSERT INTO zen_configuration_group VALUES (30, 'EZ-Pages Settings', 'EZ-Pages Settings', 30, '1');]

Did everything go OK? Or do I need to do something else?

OK...I just checked the catalog folder and I get this message:
1054 Unknown column 'startdate' in 'field list'
in:
[select startdate, counter, session_counter from zen_counter_history where startdate='20060626']

26 Jun 2006, 5:18 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

Sounds like you have an add-on that is using 30

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

26 Jun 2006, 5:42 AM
#3
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #3 by tj1

Please excuse my ignorance. I did have EasyPopulate on my previous installation. Do you think that's what's causing that? Should I uninstall it first?

Thanks.

26 Jun 2006, 6:02 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #4 by drbyte

tj1:

from version 1.2.6 to the lastest 1.3.0.2.

I got the following message when trying to upgrade the database:
1062 Duplicate entry '30' for key 1
in:
[INSERT INTO zen_configuration_group VALUES (30, 'EZ-Pages Settings', 'EZ-Pages Settings', 30, '1');]

Did everything go OK? Or do I need to do something else?
No, everything did not go okay.

Use your text editor to edit your /zc_install/mysql_upgrade_zencart_130_to_1301.sql
around line 15 you'll see this:```
INSERT INTO configuration_group VALUES ('30', 'EZ-Pages Settings', 'EZ-Pages Settings', 30, '1');

Put a # in front of it, like this:```
#INSERT INTO configuration_group VALUES ('30', 'EZ-Pages Settings', 'EZ-Pages Settings', 30, '1');

Save the file and upload back to your server.
Then rerun zc_install/index.php and select Database Upgrade. Be sure to run the step for v1.3.0-to-1.3.0.1, as well as the 1301-to-1302

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Jun 2006, 6:11 AM
#5
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #5 by tj1

Thank you for that suggestion DrByte, just wanted to mention that it appears to have updated from 1.2.6 to 1.2.7, but it's from 1.2.7 to 1.3 that I seem to be having this problem.

So do I edit mysql_upgrade_zencart_127_to_130.sql instead?

26 Jun 2006, 6:21 AM
#6
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #6 by tj1

I went ahead and did just that. it seems to have upgraded just fine to 1.3.0 now, got the following statements, but I'm guessing that's OK:

SKIPPED: Cannot insert configuration_key "DEFINE_BREADCRUMB_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "ACCOUNT_FAX_NUMBER" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CUSTOMER_GREETING" because it already exists
SKIPPED: Cannot insert configuration_key "SKIP_SINGLE_PRODUCT_CATEGORIES" because it already exists
SKIPPED: Cannot insert configuration_key "DOWNLOAD_IN_CHUNKS" because it already exists
SKIPPED: Cannot insert configuration_key "IMAGE_USE_CSS_BUTTONS" because it already exists
SKIPPED: Cannot insert configuration_key "LANGUAGE_DEFAULT_SELECTOR" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_ACCOUNT_LINKS_ON_SITE_MAP" because it already exists
SKIPPED: Cannot insert configuration_key "EMAIL_SEND_MUST_BE_STORE" because it already exists
SKIPPED: Cannot insert configuration_key "DEFINE_DISCOUNT_COUPON_STATUS" because it already exists

...now on to try 1.3.0.1 and 1.3.0.2, fingers crossed. :)

26 Jun 2006, 6:34 AM
#7
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #7 by tj1

...well, it seems to have upgraded to 1.3.0.2 now. Although i did get this message on the last upgrade from 1.3.0.1 to 1.3.0.2:


1062 Duplicate entry 'Administrator' for key 2
in:
[INSERT INTO zen_query_builder ( query_category , query_name , query_description , query_string ) VALUES ('email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id');]


Is this something to be worried about or am I now finished with the upgrade as far as upgrading the database is concerned?

26 Jun 2006, 6:39 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #8 by drbyte

You should get around that one by commenting it out as well:
in the 1301-to-1302.sql file, line 21:INSERT INTO query_builder ( query_category , query_name , query_description , query_string ) VALUES ('email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select \'ADMIN\' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id'); becomes ```
#INSERT INTO query_builder ( query_category , query_name , query_description , query_string ) VALUES ('email,newsletters', 'Administrator', 'Just the email account of the current administrator', 'select 'ADMIN' as customers_firstname, admin_name as customers_lastname, admin_email as customers_email_address from TABLE_ADMIN where admin_id = $SESSION:admin_id');

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Jun 2006, 3:38 AM
#9
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Location:
California
Posts:
628
Plugin Contributions:
0

Post #9 by tj1

Thank you very much DrByte.
Just one final question, will my shop be limited in some way by commenting out those two lines? I guess probably not since 'duplicate' is mentioned, but I'd like to hear from someone who knows.

27 Jun 2006, 4:52 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #10 by drbyte

In THIS case, there should be no problem, because the upgrade had already inserted those statements before failing on other ones. All should be fine... in THIS case ... can't speak for others who would follow along and read this thread thinking this might apply to them equally ..... reader beware.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.