Closed (duplicate)
Project:
Drupal core
Version:
4.7.0-beta5
Component:
menu system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2006 at 12:46 UTC
Updated:
13 Mar 2006 at 00:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
archatas commentedI found that the parent IDs (pid) of the items from the modules are equal to 0 (It makes them menu roots) in the database, whereas they should be equal to 1 (They should be Navigation menu items). As I am not very familiar with menu system and I could not find the probleem in menu.inc, I wrote a patch for the menu.module that fixes unwanted behaviour without fixing parent IDs in the database. This patch could be used for Drupal 4.7.0. And maybe someone will fix the problem in the core for Drupal 4.7.1.
It simply checks the type of the menu item instead of checking the parent id, when deciding what to edit - a menu, or the menu item.
-----
Archatas
http://hyperlocal.org
Comment #2
behindthepage commentedThanks for that, it helped me to understand the problem. I changed the database entries for the pid to the correct ones. Once they are correct there is no problem. So I think the problem occurs when the menu table is first filled.
Database.mysql only populates the menu with one entry for the primary links so the problem is not there. I am going to continue looking at the code to see if I can find where the table is first filled. If anyone can point me in the right direction it would be much appreciated.
Comment #3
behindthepage commentedI have changed this bug to critical as I didn't want it to slip through the cracks.
So far I have tracked the problem down to
which is called from
Here is my diagnosis (from an incomplete understanding):
_menu_build is passing on negative values for mid and pid. The negative value for pid passes through the rest of menu_rebuild and because the column attribute for pid is unsigned it is saved as zero. The negative mid is checked for and corrected.
The code is just a tad complex for me to get a complete understanding of so it needs a coding guru to look at it.
Comment #4
chx commentedIt may or not may be a duplicate of http://drupal.org/node/53350 but I will roll it into that.
Comment #5
chx commentedopsie, bad paste, the issue is http://drupal.org/node/42388
Comment #6
dopry commentedbut its stilla duplicate.
Comment #7
behindthepage commentedThanks I will start following that thread.