Hi

First out let me say that I'm pretty sure this is a human problem rather than a code problem, so I'd appreciate it if someone could give me a steer on what I've done wrong and how to put it right...Thanks!

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.

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.

Thankyou for any help, have a good weekend!

Steve

PS, while I'm writing I'd just like to say thankyou and send my congratulations to everyone who's worked on drupal and the modules to get it to this stage - its amazing, and I'm sure there are many people like me who really appreciate your impresssive work. I've given the project a plug in my new book which is out in the UK on the 15th Nov. That's about as much help as I can be to the project until I learn a bit more about php!

Comments

steveparks’s picture

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.

Does anyone have any ideas on what I might have done to cause this please?

Thanks
Steve

===
Steve Parks
Convivio - a digital services agency

http://weareconvivio.com

steveparks’s picture

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.

Steve

===
Steve Parks
Convivio - a digital services agency

http://weareconvivio.com

media girl’s picture

My menu module was working properly. And then rather suddenly I found I was unable to edit many of my menu items. I've tried disabling other modules, enabling and disabling clean urls, and other things that probably have nothing to do with this.

I've reset the menus to default, but I'm still unable to work with them. Some specifics:

edit "my account" leads to a screen with the title only, no other form windows.

disable "my account" leads to a screen saying it was deleted, but it's still there.

I did two things immediately prior to this. One is I had made an additional menu called "help" that had items for faqs, etc. However, when the block did not display as I had expected, I went to edit it and had problems with accessing that menu administration. This is when I first tried "reset menus" to start over, and ran into the revising problems. (Further resets did not improve this apparent glitch.)

The other thing I had done is disable a few modules from displaying on the admin page. I have no idea if this might be helpful, but I thought I'd mention it.

I've found ways to work around the menu problems, and live with the clinkers, but I hope something can be figured out for this. Thanks!
--
mediagirl.org

jsloan’s picture

During another 4.4.2 upgrade to 4.5.0 I came upon this problem again... this time there was too much content to cut-n-paste so I dug deeper. What I found is this: I used the 4.4.x menu.module from the contibuted modules and I should have disabled the menu module and droped the tables named menu, menu_hierarchy, menu_item before applying the update.

DROP TABLE menu;
DROP TABLE menu_hierarchy;
DROP TABLE menu_item;

If you have already applied the update (and you do not have a backup) then try disabling the menu module, drop the three tables then create the new menu table:

CREATE TABLE menu (
  mid int(10) unsigned NOT NULL default '0',
  pid int(10) unsigned NOT NULL default '0',
  path varchar(255) NOT NULL default '',
  title varchar(255) NOT NULL default '',
  description varchar(255) NOT NULL default '',
  weight tinyint(4) NOT NULL default '0',
  type int(2) unsigned NOT NULL default '0',
  PRIMARY KEY  (mid)
) TYPE=MyISAM;

The previous menus do not updrade - so be sure to take notes on what menus were created, you will have to create them again.

steveparks’s picture

Any help or advice with the problem above would be very much appreciated.

Thanks
Steve

===
Steve Parks
Convivio - a digital services agency

http://weareconvivio.com

tulula’s picture

I've been having this as an ongoing problem - see posts:
node/14140
node/13731
node/13715

This reflects the trouble that steveparks is experiencing... just wondering if you're still having this issue and if not, please let me know what you did to fix the trouble.

Lisa

steveparks’s picture

Hi Lisa

i fixed the problem - but only by doing a complete installation from the beginning and then just restoring content and essential tables from the backups.

sorry i don't have a neater, more impressively coded answer!!!

steve

===
Steve Parks
Convivio - a digital services agency

http://weareconvivio.com

Capnj’s picture

Go to Administer|Blocks and you'll find your custom menus. Enable and position as you do with any other blocks. This is not intuitive ... well maybe a little because I finally looked there ... but seems misplaced. I would prefer that being accomplished on the Menu page.

anj’s picture

Hi folks,

I've been hitting these problems with the menu system too. I've hacked about and bit and found that there are (at least!) two problems. The

Since a menu item calendar already exists for , this new menu item ...

part is down to a bug in the event module, where the line in event_menu that reads

    $items[] = array('event/'.event_format_date(time(), 'custom', 'Y/m/d'), 'title' => t('calendar'),

should actually say

    $items[] = array('path' => 'event/'.event_format_date(time(), 'custom', 'Y/m/d'), 'title' => t('calendar'),

which is all very well but doesn't actually fix things - the menus still do not get updated when you submit changes. This appears to be some weird caching-type problem that I don't understand, but I found a workaround. If you hit a configuration page (e.g. go to /admin/settings and hit "Save configuration") after modifying the menus, the cache gets emptied and the menus get updated. Absolutely filthy, but it seems to work.

Well, that took far too long to work out. I'm off before my head asplode.

jsloan’s picture

I came upon the same two problems last week while upgrading a site from 4.2 and I posted a patch for event.module here but I was not able to solve the original problem and had to do a clean install and lots of cut-n-paste.

veridicus’s picture

I'm creating a new module which adds menu items, admin tabs, and pages. After making a change sometimes the only way for it to work is to clear the cache. Otherwise the change won't appear until the cache item related to it expires. So try "delete from cache;" in your database. It can't hurt, even if it's production, but it will slow down the first reads to every page.

This may explain why someone else got it working by doing a completely fresh install.
---
Don't use Microsoft software

anj’s picture

I haven't found the bug report, but I just compared my site against a clean install of the latest 4.5.1 tarball and the problem has clearly been fixed recently. It turns out a complete re-install is not necessary - all you have to do is update modules/menu.module to the latest 4_5 version - that has undergone a one-line change that fixes the problem.

Oh, and Happy New Year! It's already 2005 down here in NZ.

T'Stoat.

tatonca’s picture

I have a brand new install of 4.5.2 and the problems defined by other users are happening to my. Among them:

- creating and adding a 'add image' button under 'my image gallery' works only for admin user, eben thought the 'image' item under create content works for all users with appropriate privelege

- reenabling 'image' menu after it being disabled made it disappear entirely

- trying to add a link to members called 'add buddy' worked until a reset and now the same link created in the same way results in two 'members' menu items appearing in the menu configuration screen, both of which are disabled

I have tried to drop the tables afte disabling menus, however this did not fix functionality or custom menu items that used to work but now do not

any guidance on these issues would be appreciated

Gunny-1’s picture

I have a 4.5 install. Updated menu to cvs version 1.26. I can add a menu (for eg: weblog) though it appears in the list, i can't edit or delete it. When i was about to add menu item, i couldnt see weblog on the parent category. Its weird yeah.

I have to reset the menu to remove weblogs. Anyway custom menus could not be added as desired

tatonca’s picture

I have documented my problems and refered to the problems of others in an issue found here

http://drupal.org/node/16879

If you find your way here and are still having problems, please add a comment to the issue referenced above - at present someone has closed this issue and is suggesting the problem is in the image and buddy modules...

Gunny-1’s picture

Well i downloaded and used the 4.5.1 version (as stated by one of the user ) menu.module and it works well.