Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Meta Tag 1062 Duplicate Entry Error

    Quote Originally Posted by DrByte
    How many languages are installed on your site?
    I tried it on a clean 1.3.5 install including demo data and using the default English language files only.

    But it also happened on a 1.3.0.2 store with 2 lanuages (modified, but thmo no modifications which could couse this problem).

    I wil try to describe exactly how it happens later (if still needed then).

  2. #12
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Meta Tag 1062 Duplicate Entry Error

    When I select a category and edit the meta tags, and fill in the meta tag tiltle but leave the keywords and description fields empty and press save. Then click edit again and save unchanged

    1062 Duplicate entry '34-1' for key 1
    in:
    [insert into meta_tags_categories_description (metatags_title, metatags_keywords, metatags_description, categories_id, language_id) values ('gfdgfd', '', '', '34', '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.
    There may be other ways to make it happen. The error seems less persistent now though (so I suppose I did something different the other day)

  3. #13
    Join Date
    Feb 2005
    Posts
    283
    Plugin Contributions
    0

    Default Re: Meta Tag 1062 Duplicate Entry Error

    HI Dr Byte

    I simply installed 1.35 - in english then add a new category - edit the meta tag title and save - edit it again and this time when I save I get the message above.

    I have had the same thing happen on a 1.35 with image handler insatlled and a fresh install - if need be I can give you access to my test site (I have since installed the sefu on the site but this was after)

    Cheers

  4. #14
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Meta Tag 1062 Duplicate Entry Error

    nuts ... *every* time I read those posts/descriptions, I read "product" metatags, not "category" ...

    This will be fun ...
    .

    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.

  5. #15
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Meta Tag 1062 Duplicate Entry Error

    /admin/categories.php
    starting on line 240:
    Code:
          // bof: categories meta tags
          case 'update_category_meta_tags':
          // add or update meta tags
          //die('I SEE ' . $action . ' - ' . $_POST['categories_id']);
          $categories_id = $_POST['categories_id'];
          if (zen_get_category_metatags_keywords($categories_id, (int)$_SESSION['languages_id']) or zen_get_category_metatags_description($categories_id, (int)$_SESSION['languages_id'])) {
            $action = 'update_category_meta_tags';
          } else {
            $action = 'insert_categories_meta_tags';
          }
    
          $languages = zen_get_languages();
          for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
            $language_id = $languages[$i]['id'];
    
            $sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
                                    'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
                                    'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
    
            if ($action == 'insert_categories_meta_tags') {
              $insert_sql_data = array('categories_id' => $categories_id,
                                       'language_id' => $language_id);
    
              $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
    
              zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array);
            } elseif ($action == 'update_category_meta_tags') {
              zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
            }
          }
    
          zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
          break;
          // eof: categories meta tags


    change to:
    Code:
          // bof: categories meta tags
          case 'update_category_meta_tags':
          // add or update meta tags
          //die('I SEE ' . $action . ' - ' . $_POST['categories_id']);
          $categories_id = $_POST['categories_id'];
          $languages = zen_get_languages();
          for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
            $language_id = $languages[$i]['id'];
            $check = $db->Execute("select *
                                   from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . "
                                   where categories_id = '" . (int)$categories_id . "'
                                   and language_id = '" . (int)$language_id . "'");
            if ($check->RecordCount() > 0) {
              $action = 'update_category_meta_tags';
            } else {
              $action = 'insert_categories_meta_tags';
            }
    
            $sql_data_array = array('metatags_title' => zen_db_prepare_input($_POST['metatags_title'][$language_id]),
                                    'metatags_keywords' => zen_db_prepare_input($_POST['metatags_keywords'][$language_id]),
                                    'metatags_description' => zen_db_prepare_input($_POST['metatags_description'][$language_id]));
    
            if ($action == 'insert_categories_meta_tags') {
              $insert_sql_data = array('categories_id' => $categories_id,
                                       'language_id' => $language_id);
              $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
    
              zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array);
            } elseif ($action == 'update_category_meta_tags') {
              zen_db_perform(TABLE_METATAGS_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$language_id . "'");
            }
          }
    
          zen_redirect(zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id));
          break;
          // eof: categories meta tags
    .

    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.

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

    Default Re: Meta Tag 1062 Duplicate Entry Error - Category Metatags

    Totally sorted!! thank you very much.

  7. #17
    Join Date
    Sep 2005
    Posts
    912
    Plugin Contributions
    1

    Default Re: [done] Meta Tag 1062 Duplicate Entry Error - Category Metatags

    yes thank you

  8. #18
    Join Date
    Oct 2006
    Posts
    32
    Plugin Contributions
    0

    Default Re: [done 1.3.6] Meta Tag 1062 Duplicate Entry Error - Category Metatags

    i had same problem, but when i modified the php file and uploaded, when i go into catagories in admin, the page shows ALL admin options in a text based layout, i have to scroll all the way down to bottom to modify, any ideas?

  9. #19
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: [done 1.3.6] Meta Tag 1062 Duplicate Entry Error - Category Metatags

    My first guess is that something was not modified correctly -- a typo, a paste-error, an FTP problem, a line-ending issue, extra files edited, etc.

    The most efficient way to get around the problem would be to use v1.3.6 directly...
    .

    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.

  10. #20

    Default Re: [done 1.3.6] Meta Tag 1062 Duplicate Entry Error - Category Metatags

    I am hitting this. I have upgraded and am on 1.3.5. Here is my exact error:

    1062 Duplicate entry '73-1' for key 1
    in:
    [insert into meta_tags_categories_description (metatags_title, metatags_keywords, metatags_description, categories_id, language_id) values ('', '', '', '73', '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.

    What I did to get here was I added some Categories and only put in the Title in the Categories Meta Tags Definitions, no keywords or descriptions. I can't clear out the fields, it always wants to do the INSERT. LMK if you need more info.

    I am probably gonna go do the actual SQL in my database with UPDATE statements instead of INSERT to see if I can move forward. (Caveat: I would NOT recommend that you muck about with your db if you don't have a DBA background - nowadays I may play a mild-mannered work-at-home-mom- ha ha, but I used to play a Force To Be Reckoned With and can recall a thing or two, computers have not changed that much in 7 years so raspberries on those of you who pre-judge moms! )

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 21 Jan 2016, 10:35 PM
  2. v151 [Done v1.6.0] 1062:Duplicate entry for key 1 in db_cache
    By rayw1679 in forum General Questions
    Replies: 68
    Last Post: 16 Feb 2015, 05:32 PM
  3. Replies: 33
    Last Post: 29 Dec 2014, 07:34 PM
  4. 1062 Duplicate entry '3-1' for key 1 PROBLEM with meta tags
    By paulFromWales in forum General Questions
    Replies: 2
    Last Post: 4 Oct 2006, 04:15 PM
  5. Meta-tags Input Error 1062 Duplicate entry '66-1' for key 1
    By Camarilladee in forum General Questions
    Replies: 4
    Last Post: 1 Jun 2006, 10:39 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