Thread: Attribute error

Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    21
    Plugin Contributions
    0

    Default Attribute error

    What does this mean? It come when I try to add an option value to an option name. Basically I'm still a beginner, sorted out one issue now on to this one. I learn quick so thanks to anyone that can help!

    1062 Duplicate entry '1-1' for key 1
    in:
    [insert into zen_products_options_values (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order) values ('1', '1', 'Red', '0')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

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

    Default Re: Attribute error

    It looks like you either manually tried to clean out your database tables or moved databases or otherwise lost the auto increment settings ...

    You could run, AFTER a backup of your database, the file:

    /zc_install/sql/db_rebuild_autoincrement.sql

    This will rebuild the auto increment fields ...
    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!

  3. #3
    Join Date
    Apr 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: Attribute error

    Thanks. I of course wouldn't have thought of that so I'll give it a shot. You're a big help!

  4. #4
    Join Date
    Feb 2005
    Posts
    283
    Plugin Contributions
    0

    Default Re: Attribute error

    Hi I am having the same problem but with amending category titles - I have posted in general questions - so apologies for posting twice but this kind of matches my issue - I have ran the patch as suggested above but I still get the following error when adding or amending a category mete tag title

    1062 Duplicate entry '1-1' for key 1
    in:
    [insert into welshtartans_zmeta_tags_categories_description (metatags_title, metatags_keywords, metatags_description, categories_id, language_id) values ('Welsh Cilt Regalia', '', '', '1', '1')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

  5. #5
    Join Date
    Apr 2006
    Posts
    21
    Plugin Contributions
    0

    Default Re: Attribute error

    So..referring to the advice you gave me on my attribute error thread:

    You could run, AFTER a backup of your database, the file:

    /zc_install/sql/db_rebuild_autoincrement.sql

    This will rebuild the auto increment fields ...

    Can you step me through this very simply. I have made my backup but the idiot question is how do I run
    /zc_install/sql/db_rebuild_autoincrement.sql

    I added it onto my domain but the page won't load.

    any suggestion? Thank you so much.

    Jeff
    Sportsguy

  6. #6
    Join Date
    Feb 2005
    Posts
    283
    Plugin Contributions
    0

    Default Re: Attribute error

    I ran this by opening that file up in notepad and then going to admin and then tools?install sql patches and running it there.

    (back up back up back up!! - my mantra before doing anything :-)

  7. #7
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: Attribute error

    Well, I had been facing the same problem of 1062 Duplicate entry for few days. I struggled a lot finding the fix to this but to my dismay neither could I find the correct fix in this forum nor elsewhere. To all you Zenners who are facing this problem, here's the solution:

    Most of these errors are caused when we accidentally try to delete or update an invalid entry. Or say if there's nothing in the database yet and we are trying to delete something off it, so be careful from next time. An invalidated update and upgrade could be the trouble-maker too!

    You should go to your Zen Database and check for your tables, you can do so either from going to your Database Control Panel (if your current Host supports this) or through phpMyAdmin. You have to check what is causing this error 1062 for example, if you get something like this:
    1062 Duplicate entry '1-1' for key 1
    in:
    [insert into zen_products_options_values (products_options_values_id, language_id,.............
    then you should check zen_products_options_values table and the associated fields. If your Zen Cart is fairly new or is in the production phase then you can check one of these associated fields and truncate its values. Once you are done - this error should be gone.

    In my case, I was just testing a new cart and didn't mind truncating values. PLEASE BACKUP YOUR DATABASE BEFORE YOU DO ANY MODIFICATIONS WITH YOUR TABLES/FIELDS AND ITS VALUES.

    Good Luck!

  8. #8
    Join Date
    Jul 2010
    Posts
    3
    Plugin Contributions
    0

    Default Re: Attribute error

    Well, I had been facing the same problem of 1062 Duplicate entry for few days. I struggled a lot finding the fix to this but to my dismay neither could I find the correct fix in this forum nor elsewhere. To all you Zenners who are facing this problem, here's the solution:

    Most of these errors are caused when we accidentally try to delete or update an invalid entry. Or say if there's nothing in the database yet and we are trying to delete something off it, so be careful from next time. An invalidated update and upgrade could be the trouble-maker too!

    You should go to your Zen Database and check for your tables, you can do so either from going to your Database Control Panel (if your current Host supports this) or through phpMyAdmin. You have to check what is causing this error 1062 for example, if you get something like this:
    1062 Duplicate entry '1-1' for key 1
    in:
    [insert into zen_products_options_values (products_options_values_id, language_id,.............

    then you should check zen_products_options_values table and the associated fields. If your Zen Cart is fairly new or is in the production phase then you can check one of these associated fields and truncate its values. Once you are done - this error should be gone.

    In my case, I was just testing a new cart and didn't mind truncating values. PLEASE BACKUP YOUR DATABASE BEFORE YOU DO ANY MODIFICATIONS WITH YOUR TABLES/FIELDS AND ITS VALUES.

    Good Luck!

 

 

Similar Threads

  1. v155 Attribute controller - error message when adding attribute values
    By rustwood in forum General Questions
    Replies: 8
    Last Post: 11 Jul 2016, 10:26 PM
  2. Attribute error
    By enquirer66 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 14 Apr 2008, 07:31 AM
  3. Attribute Error
    By jakumpe in forum Setting Up Categories, Products, Attributes
    Replies: 16
    Last Post: 26 Nov 2007, 05:46 AM
  4. Attribute error
    By julie.t in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 10 Feb 2007, 05:39 PM
  5. Attribute Error
    By PeteH in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 28 Oct 2006, 05:52 AM

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