Hi

I'd really appreciate it if anyone could help with the following problem (which I think is down to something I've done wrong rather than a problem with the code):

I upgraded a 4.4.2 installation to 4.5RC and then to 4.5. I think I did something wrong in the way I implemented the database update script (perhaps selecting the wrong option as to what point to upgrade from).

The behaviour that I'm getting now is that I can't add new menus or menu items using menu.module.

adding a new menu or menu item

If I try to add a menu item (say 'Test' linking to 'node/1' as an option under 'Navigation') then it says I've created the menu item ok, but it doesn't appear on either the menu itself or on the menu administartion page. The same happens if I try to add a new menu. I don't get any error messages, it just vanishes!

Then if I have the event.module enabled I get this message when creating a new menu (note that this is from creating a MENU not a MENU ITEM as the message text would indicate:

* Created new menu item NewTest.
* Since a menu item calendar already exists for , this new menu item was created as a shortcut to that location.

I've manually checked my menu table against the database.mysql file and then the changes made by each of the functions in the update script and it seems fine.

enabling menu items created by other modules

The problem is also preventing me from enabling menu items made available by other modules.

If I click on 'enable' by a menu items it tells me the item was successfully enabled, but on the list of menu items it still says (disabled) and offers me the button to enable, and the menu option doesn't appear on any menus.

So it appears that any changes to the menu are not being properly stored in the database.

editing the menu item title in the database directly has no effect

As an experiment I've tried changing the title of a menu item directly in the database in the menu table, but that change isn't reflected when I go to the site and log in.

So it seems that my menu isn't being generated from the database at all...or have I misunderstood something?

thanks for any guidance on how I can get my menu.module working to create custom menus and menu items.

PS this issue was originally posted as http://drupal.org/node/12331 but received no replies so i think i must have posted in a quieter part of the forums. I hope its better placed here as I could really do with some guidance, thanks.

Comments

LateNightDesigner’s picture

I am currently having this same problem. It was fine until the last 4.6.6 patch. Then the usefulness of the menu disappeared.

What happened that it doesn't allow new menu items?
//---------------------------------------
Latenightdesigners.com- Giving IMD a Fighting Chance

tjharman’s picture

I'm not the only one seeing this since upgrading to 4.6.6?

It appears that something in 4.6.6 has stopped custom menu's from working properly!

LateNightDesigner’s picture

Supposedly there was a bug and to fix it they broke the menu module...

//---------------------------------------
Latenightdesigners.com- Giving IMD a Fighting Chance

cog.rusty’s picture

Heh, actually the initial post was more than 2 years old, but that doesn't mean that old problems can't transmigrate :)

The best way to have something fixed is to try to reproduce the problem in a clean install with the latest updates and then issue a bug report describing the steps.

Developers may not see a forum post, or they may see it and consider it vague. But if they have a bug report which can be verified in a few minutes, it is different.

There was a bug fix recently about menus with external links, I think.

furmans’s picture

From 4.6.5 to 4.6.6 it looks like includes/menu.inc changed:

< // $Id: menu.inc,v 1.79.2.4 2006/03/13 21:25:10 unconed Exp $
---
> // $Id: menu.inc,v 1.79.2.3 2005-11-28 15:45:19 dries Exp $
806c806
< $_menu['items'][$item->mid] = array('path' => $item->path, 'callback' => '');
---
> $_menu['items'][$item->mid] = array('path' => $item->path, 'access' => TRUE, 'callback' => '');
818c818
< $_menu['items'][$item->mid] = array('path' => $item->path, 'callback' => '');
---
> $_menu['items'][$item->mid] = array('path' => $item->path, 'access' => TRUE, 'callback' => '');

reverting that file back to 4.6.5 seems to have solved the problem for me.

------------------
Aha Cafe -- powered by Drupal
http://www.ahacafe.com
http://www.americaninventorspot.com

tjharman’s picture

The "offical" fix is here. Not sure if that's what your code posted above does or not, hard to tell with the wrapping etc.

furmans’s picture

The official fix works properly on my site. Thanks a bunch. I'll post something other than diffs next time when noting a fix.

------------------
Aha Cafe -- powered by Drupal
http://www.ahacafe.com
http://www.americaninventorspot.com