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

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

    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
    Feb 2008
    Posts
    37
    Plugin Contributions
    0

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

    Just had similar issue and the patch worked for me also - THANKS!

 

 

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. Replies: 2
    Last Post: 11 Dec 2012, 03:58 AM
  4. 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
  5. Replies: 7
    Last Post: 19 Sep 2012, 03:43 AM

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