1.3.2 to 1.3.5

Locked

Started by robwuk on 9 Sep 2006, 10:51 PM · Views: 4,679

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
9 Sep 2006, 10:51 PM
#1
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

1.3.2 to 1.3.5

Hi there, when i run the zc install to upgrade my database i get the following message just on a white screen

1062 Duplicate entry '0' for key 1
in:
[INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Include Product Listing Sub Categories Image', 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS', 'false', 'Do you want to include the Sub Categories Image on the Product Listing?', '8', '52', 'zen_cfg_select_option(array('true', 'false'), ', now());]

Anyone know whats happening here

Ta

Rob

10 Sep 2006, 12:48 AM
#2
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Just to add to this, out of curiosity imported another persons database that was the same version as mine 1.3.2 and this upgraded no problems

when i put my database back it come up with my previous post, and thats the first time im trying to upgrade it, so i dont know where its getting the duplicate entries, i did search the database and the enty wasnt in there, ive been trying for hours now to resolve it and i cant :(

The version im currently on is 1.3.2 and that was a fullsett install with new database, i remember having to add all the products again, i dont want to have to do that again it it can be helped

Rob

14 Sep 2006, 5:15 PM
#4
mrpsycho98 avatar

mrpsycho98

New Zenner

Join Date:
Sep 2005
Posts:
15
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Cache Fix do not solve this problem...
any other suggestion on how to fix this error??

17 Sep 2006, 3:42 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: 1.3.2 to 1.3.5

RobWUK:

1062 Duplicate entry '0' for key 1
in:
[INSERT INTO **configuration **(configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Include Product Listing Sub Categories Image', 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS', 'false', 'Do you want to include the Sub Categories Image on the Product Listing?', '8', '52', 'zen_cfg_select_option(array('true', 'false'), ', now());]

Anyone know whats happening here
Yes ... like the error says, it's being told to create a duplicate entry, which is not allowed.
That is, it means you already have an entry in your "configuration" table whose "configuration_key" is "PRODUCT_LIST_CATEGORIES_IMAGE_STATUS", and the upgrader is attempting to add one.

This should not normally happen, and the zc_install program normally catches that condition and prevents the error.

So ... how exactly are you performing this upgrade?
Are you using the documented upgrade instructions and using zc_install to bring your database up to date, or are you using some other method?

.
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.

17 Sep 2006, 11:30 AM
#6
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

What i am doing is installing the new version, full installation into a new directory once completed i am linking it to my database and then performing the database upgrade only.

This has always work perfect in the past (ive been using it from before 1.2.7)
i must stress that i dont meen ive been using the same database since then and just performing upgrades, ive set up a few sites.

Now funnily enough the other site i have setup upgrades with no errors and works fine, its just this other site, this being a full fileset installtion 1.3.2 is having problems upgrading.

i had on the database ive been having problems with patched the database to support UK Credit/Debit cards.

Also the error i get saying duplicate entry, i dont see where the duplicate is, as when i browse the database before upgrade this entry is nowhere to be found.

I have tried changing the sql to replace etc bu then it jsut goes onto the next error and so on

Rob

17 Sep 2006, 11:49 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: 1.3.2 to 1.3.5

Well, receiving those messages suggests that the upgrade has already been run on the indicated database.
So, either you're attempting to upgrade your test database which doesn't need upgrading, and not actually upgrading the "intended" database ....
... or, you've already upgraded and perhaps don't need to be doing this step repeatedly.

Again, the upgrader typically catches those kinds of "insert" commands and skips them, so as to not produce the error message you're reporting.

.
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.

18 Sep 2006, 8:33 PM
#8
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Thankyou for your help, im more worried this thread will go dead, ive just inserted database data into a blank database, and searched for the PRODUCT_LIST_CATEGORIES in the database, i search all tables for the exact phrase as its this is the error thats says it already exists

This is the reult from the search
Appologies for the length

Search results for "PRODUCT_LIST_CATEGORIES" (the exact phrase):

*
  0 match(es) inside table address_book
*
  0 match(es) inside table address_format
*
  0 match(es) inside table admin
*
  0 match(es) inside table admin_activity_log
*
  0 match(es) inside table authorizenet
*
  0 match(es) inside table banners
*
  0 match(es) inside table banners_history
*
  0 match(es) inside table categories
*
  0 match(es) inside table categories_description
*
  0 match(es) inside table configuration
*
  0 match(es) inside table configuration_group
*
  0 match(es) inside table counter
*
  0 match(es) inside table counter_history
*
  0 match(es) inside table countries
*
  0 match(es) inside table coupon_email_track
*
  0 match(es) inside table coupon_gv_customer
*
  0 match(es) inside table coupon_gv_queue
*
  0 match(es) inside table coupon_redeem_track
*
  0 match(es) inside table coupon_restrict
*
  0 match(es) inside table coupons
*
  0 match(es) inside table coupons_description
*
  0 match(es) inside table currencies
*
  0 match(es) inside table customers
*
  0 match(es) inside table customers_basket
*
  0 match(es) inside table customers_basket_attributes
*
  0 match(es) inside table customers_info
*
  0 match(es) inside table customers_wishlist
*
  0 match(es) inside table db_cache
*
  0 match(es) inside table email_archive
*
  0 match(es) inside table ezpages
*
  0 match(es) inside table featured
*
  0 match(es) inside table files_uploaded
*
  0 match(es) inside table geo_zones
*
  0 match(es) inside table get_terms_to_filter
*
  0 match(es) inside table group_pricing
*
  0 match(es) inside table languages
*
  0 match(es) inside table layout_boxes
*
  0 match(es) inside table manufacturers
*
  0 match(es) inside table manufacturers_info
*
  0 match(es) inside table media_clips
*
  0 match(es) inside table media_manager
*
  0 match(es) inside table media_to_products
*
  0 match(es) inside table media_types
*
  0 match(es) inside table meta_tags_categories_description
*
  0 match(es) inside table meta_tags_products_description
*
  0 match(es) inside table music_genre
*
  0 match(es) inside table newsletters
*
  0 match(es) inside table orders
*
  0 match(es) inside table orders_products
*
  0 match(es) inside table orders_products_attributes
*
  0 match(es) inside table orders_products_download
*
  0 match(es) inside table orders_status
*
  0 match(es) inside table orders_status_history
*
  0 match(es) inside table orders_total
*
  0 match(es) inside table paypal
*
  0 match(es) inside table paypal_payment_status
*
  0 match(es) inside table paypal_payment_status_history
*
  0 match(es) inside table paypal_session
*
  0 match(es) inside table paypal_testing
*
  0 match(es) inside table product_music_extra
*
  0 match(es) inside table product_type_layout
*
  0 match(es) inside table product_types
*
  0 match(es) inside table product_types_to_category
*
  0 match(es) inside table products
*
  0 match(es) inside table products_attributes
*
  0 match(es) inside table products_attributes_download
*
  0 match(es) inside table products_description
*
  0 match(es) inside table products_discount_quantity
*
  0 match(es) inside table products_notifications
*
  0 match(es) inside table products_options
*
  0 match(es) inside table products_options_types
*
  0 match(es) inside table products_options_values
*
  0 match(es) inside table products_options_values_to_products_options
*
  0 match(es) inside table products_to_categories
*
  0 match(es) inside table project_version
*
  0 match(es) inside table project_version_history
*
  0 match(es) inside table query_builder
*
  0 match(es) inside table record_artists
*
  0 match(es) inside table record_artists_info
*
  0 match(es) inside table record_company
*
  0 match(es) inside table record_company_info
*
  0 match(es) inside table reviews
*
  0 match(es) inside table reviews_description
*
  0 match(es) inside table salemaker_sales
*
  0 match(es) inside table sessions
*
  0 match(es) inside table specials
*
  0 match(es) inside table tax_class
*
  0 match(es) inside table tax_rates
*
  0 match(es) inside table template_select
*
  0 match(es) inside table upgrade_exceptions
*
  0 match(es) inside table whos_online
*
  0 match(es) inside table zones
*
  0 match(es) inside table zones_to_geo_zones

Total: 0 match(es)

I will now perform the database upgrade and report the error in the next post along with what happens to the conguration table at the end

18 Sep 2006, 9:16 PM
#9
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Here is what i did, copy files to server, created a database and installed the zencart to end up with working shop, all installed fine

Then, i logged into to my server, dropped all the tables in the database and imported my backed up database (currently version 1.3.2, as confirmed by the admins server info)

Then proceeded to run zc_install and just perform database upgrade
then i get this error

1062 Duplicate entry '0' for key 1
in:
[INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Include Product Listing Sub Categories Image', 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS', 'false', 'Do you want to include the Sub Categories Image on the Product Listing?', '8', '52', 'zen_cfg_select_option(array('true', 'false'), ', now());]

This might shed some light, if i go into my sql databse and the configuration table, and go to the last entry it seems to want to give it a configuration_id of 0 when the last entry before that is 534

It fills in the data for the id of 0 with the title Include Product Listing Alpha Sorter Dropdown and the relevant data to go with that, so im guessing the error above is when it wants to put the next one in 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS' it could be trying to give it an configuration_id of 1 and that already exists

Rob

18 Sep 2006, 9:57 PM
#10
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Done it, AUTO_INCREMENT was missing on tables where needed, ive narrowed it down to when i export the database, ive been selecting a compatibility mode to MSQL40 and this seems to remove AUTO_INCREMENT from the EXTRA field

Just want to say thanks to all that has offered help

It was starting from 0 on the fields that it wanted to add, and they were already there

Rob

19 Sep 2006, 2:27 AM
#11
drbyte avatar

drbyte

Sensei

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

Re: 1.3.2 to 1.3.5

RobWUK:

Done it, AUTO_INCREMENT was missing on tables where needed, ive narrowed it down to when i export the database, ive been selecting a compatibility mode to MSQL40 and this seems to remove AUTO_INCREMENT from the EXTRA field

Just want to say thanks to all that has offered help

It was starting from 0 on the fields that it wanted to add, and they were already there

Rob
Yes, that can be a problem.

There is an auto-increment rebuilder in the /zc_install/sql folder for cases like this. Just run it via phpMyAdmin (hopefully you don't have table-prefixes and won't have to manually add them before running the SQL statements)

.
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.

21 Sep 2006, 12:31 AM
#12
sprogy avatar

sprogy

New Zenner

Join Date:
Jan 2006
Posts:
37
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

Upgraded and got this:

Zen Cart 1.3.5
Database Patch Level: 1.3.0.2

Any important upgrades on the data base or its contents?
If so what the can I do?

21 Sep 2006, 4:44 PM
#13
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

When i got this, i just upgraded the database through zc_install

Rob

26 Sep 2006, 10:18 PM
#14
smprowse avatar

smprowse

New Zenner

Join Date:
Aug 2006
Posts:
9
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

RobWUK:

Hi there, when i run the zc install to upgrade my database i get the following message just on a white screen

1062 Duplicate entry '0' for key 1
in:
[INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Include Product Listing Sub Categories Image', 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS', 'false', 'Do you want to include the Sub Categories Image on the Product Listing?', '8', '52', 'zen_cfg_select_option(array('true', 'false'), ', now());]

Anyone know whats happening here

Ta

Rob

Hi Rob,

You are missing a closing bracket. I've counted 5 opening brackets "(", and 4 closing ")". I'm guessing the bracket should be inserted after 'PRODUCT_LIST_CATEGORIES_IMAGE_STATUS',

26 Sep 2006, 11:35 PM
#15
robwuk avatar

robwuk

Zen Follower

Join Date:
Aug 2005
Location:
United Kingdom
Posts:
458
Plugin Contributions:
0

Re: 1.3.2 to 1.3.5

thanks for your reply, the problem has been sorted.

That pasting that you counted the brackets was a cut and paste from the page that errored, so i might not have selected it all

the problem was down to a field value AUTO_INCREMENT being missing, it was trying to insert to a record that already existed and creating such error

Once i had i had restored the database with the AUTO_INCREMENT error corrected, the database went smoothly and with no problems

ta for your help though

Rob