Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2010
    Location
    San Antonio, Texas
    Posts
    4
    Plugin Contributions
    0

    Default [Fixed v1.5.1] Fatal error: 1062:Duplicate entry '1-1' for key 1 adding option values

    New install of v1.50 with new database. Can not enter any option values after creating option name in admin. Just started this install but this is not my first ZC website. Get "WARNING: An Error occurred, please refresh the page and try again." on top left of a white screen.

    Log error: [22-Feb-2012 00:44:54] PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 :: insert into products_options_values
    (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order)
    values ('1',
    '1',
    'Test Option Value',
    '10') in /xxxx/xxxx/webxxx/xxxx/www.xxxx.com/public_html/includes/classes/db/mysql/query_factory.php on line 101

    Running catalog in ssl mode as well as admin. (Rapidssl 256bit)
    Only ad-on is CK_Edit
    Already: Reset ALL Products Master Categories ID
    : Optimize Database
    : Update All Products' Attribute Sort Orders

    Any help would be appreciated

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    If you have not added any Option Values yet, you can rebuild the table products_options_values with:
    Code:
    TRUNCATE TABLE products_options_values;
    INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Aug 2010
    Location
    San Antonio, Texas
    Posts
    4
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Thank you very much! Works perfectly! I did not have any option values in the database. Never got past the error. Your patch did the trick!

    I owe you one!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Thanks for the update that this fixed the issue for you ...
    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: v1.5.5]
    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!

  5. #5
    Join Date
    Jan 2009
    Posts
    57
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Quote Originally Posted by Ajeh View Post
    Thanks for the update that this fixed the issue for you ...
    I had exactly the same problem with a new build 1.5, run the SQL query and fixed it for me too!

    Thank you

  6. #6
    Join Date
    Oct 2010
    Posts
    26
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Quote Originally Posted by Ajeh View Post
    If you have not added any Option Values yet, you can rebuild the table products_options_values with:
    Code:
    TRUNCATE TABLE products_options_values;
    INSERT INTO products_options_values (products_options_values_id, language_id, products_options_values_name) VALUES (0, 1, 'TEXT');

    I am having this same issue, but I have added options values, can I erase all the option values and use this? If so where does it go? Thank

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Are you trying to delete all Option Names and Option Values or just Option Values associated with the Option Names?
    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: v1.5.5]
    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!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes

    Fixes to accommodate this scenario are included in v1.5.1
    .

    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.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 21 Jan 2016, 10:35 PM
  2. v151 PHP Fatal error 1062: Duplicate entry '2147483647' for key 1
    By NoobGal in forum General Questions
    Replies: 5
    Last Post: 20 Jan 2013, 05:36 PM
  3. v151 PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'
    By Dopefish in forum General Questions
    Replies: 14
    Last Post: 19 Oct 2012, 02:58 AM
  4. Replies: 4
    Last Post: 16 Jul 2012, 10:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR