I edited a category and disabled comments. When saving my changes I see this error:
user warning: Duplicate entry '581' for key 1 query: INSERT INTO category_menu_map (nid, mid) VALUES (581, 1190) in /home/vaware/public_html/includes/database.mysql.inc on line 120.
Comments
Comment #1
jlangdale commentedI get this error constantly as well with latest CVS and the latest release.
Comment #2
venkat-rk commentedUnrelated to category_menu, but I got a similar error message about something to do with category_hierarchy on a new drupal install. Not wanting to take a chance on the production site, I gave up on that install and set up one more.
Comment #3
Jaza commentedI would love to get rid of this bug, but I'm going to need more detailed information. At the moment, I can't reproduce it.
Please provide:
- versions of Drupal core and category module that you're using
- other contributed modules that you're using
- PHP version
- EXACT steps for reproducing the problem
Comment #4
Jaza commentedComment #5
Jaza commentedComment #6
marcoBauli commentedi am experiencing this too.
tryed to go a bit deeper in testing what's wrong with category_menu.
This is the structure i setted up, identical to the one that is carefully explained on the Category module tutorial at
http://category.greenash.net.au/node/99 :
that gives back a primary link menu structure like the following:
NOTE THAT:
- Both 2 Hidden Containers have the same name (node title), to be able to accomplish the scope described in the tutorial above.
- I have setted my "Primary links" as the default menu used by category_menu.
- I have ALL the Category contributed modules turned on plus Activeselect.
- I then have Views, Path, Pathauto, CCK turned on (and many others, these are only the few main ones).
- i am on PHP 4.4.1, Drupal 4.7.2, latest Category.module cvs ver 1.115, category.inc ver 1.54
- The warning i get is always the same, only thing that changes is the entry number '420' that changes accordingly to what container/category i edit. Follows the full warning:
PROBLEMS:
1. Every time i edit 'Category a' or 'Category b' (actually i don't edit nothing, i just hit 'submit' for testing sake!) i get:
- one warning for the Category nid (see above), and a following identical warning for each node tagged under that category.
- a new duplicated menu item for that category shows in secondary links menu.
- a new menu item in navigation menu for EACH node filed under that category in navigation menu (!!)
2. Every time i edit my main 'Container 1':
- I get many warnings (one for each 'Hidden container' and one for Category b)
- My secondary menu items (Category a and Category b) duplicate consequently (Cat a Cat a Cat b Cat b)
3. When i create a new node:
. even if i setted 'menu items for assigned nodes' as DISABLED, i do get a menu item for it in navigation menu!
4. When i edit a Hidden Container:
- ok, no errors thrown here
5. When i edit a node submitted under one of the categories:
- no errors also here
FINAL NOTES:
. it seems that i DO NOT get the warning and the duplicated menu item for the first category menu item listed in the secondary links
. i tested this on two same hierarchies structured in the same way as above, and sometimes menu items really seems to pop-out in a hectic way, sometimes in Navigation, sometimes in Primary links, sometimes in Secondary..
. i even tryed to give DIFFERENT NAMES to my Hidden Containers, setting both
and 'Container 1' as Distant Parent,
but the problem seems to persist.
This is really a serious deal, as also for me Category module is really the fundament of a portal i am trying to build up, and i know other people are relying or trying to rely on this module that has many good qualities.
Maybe is really time to join the forces and collect a bounty to try to fix the bugs?
Comment #7
marcoBauli commentedscratching some more about post above:
About Problem 2: forgot to mention that also undesired menu items for the two children Hidden Containers are generated!
*speaking silently now..*
About Problem 1: seems that setting manually the menu items for 'Category a' and 'Category b' from Drupal default "Menu settings" collapsible menu fixes the thing..
About Problem 3: also here seems that setting as default a custom menu (ex: trashbin menu) in admin/settings/category solves this (no more generation of unwanted menu item for assigned node!), but careful because problem 2 still happens and if you edit Container 1, all it's menu branch is moved in the trashbin menu!
FURTHER NOTES:
. menu items generated loose their original link (they point to homepage).
. also url aliases for taxonomy terms (i have activated the taxonomy wrapper and all other features) are created in the form: nodetitle_0, nodetitle_1,... linking at same taxonomy/term/x
Comment #8
marcoBauli commentednope.
i tryed things above on a hierarchy and it worked, but it didn't on the other.
Quite strange, because the settings of the two are "almost" identical... it just seems that menus are scattered sometimes here sometimes there without a logic. Maybe is just late, but for sure this thing needs serious fixings.
Comment #9
Jaza commentedI'm closing all 'duplicate entry' issues except this one, as it seems to be the one that is closest to getting us a permanent solution.