I'm getting the following message whenever I add a link to the shortcut bar using the various methods. The shortcut seems to work fine. One thing to note is I'm running an updated site from D6 to D7. Not sure if that is an issue, also I don't have a menu specifically called Main Menu. I've selected Primary Links as my Main Menu. Not sure if that info is of any value.

Notice: Undefined index: module in menu_firstchild_menu_link_alter() (line 35 of /Users/xxx/Sites/drupal/sites/all/modules/menu_firstchild/menu_firstchild.module).

CommentFileSizeAuthor
#6 menu.zip19.33 KBjon betts

Comments

anrikun’s picture

This should not happen as in menu.inc, module index is set before drupal_alter is called :-(
Could you please try to clear your menu cache and see if notice goes away?

jon betts’s picture

Issue is still occurring after going to Performance and clicking on the Clear All Caches button.

anrikun’s picture

Try to disable Menu Firstchild then create a link.
Does the notice show up?

jon betts’s picture

Disabled Menu Firstchild, cleared caches and then created a link and did not receive the message.

anrikun’s picture

Could you please post or send me a dump of your tables:
menu_custom
menu_links

jon betts’s picture

StatusFileSize
new19.33 KB

Sure. I've attached a zip of a sql dump of both.

anrikun’s picture

Sorry, but I have just realized something:
Your issue is about Menu Firstchild used with the Shortcut module, right?
So that it is fully clear for me, list each step to reproduce the issue.
Also tell me what Core modules you have enabled and what your theme is.

jon betts’s picture

Sure. I'm just testing out D7 to see if I may be able to use it for upcoming projects so at this point I'm just using the defaults, Bartik/Seven as my themes.

To reproduce, just go to any admin page where you can add a link to the shortcuts bar and click on the plus button that appears to the right of the title. The same thing happens in the Edit Shortcuts screen. As far as I know, these are the only ways to add shortcuts through the interface. e.g. admin/modules, add modules to shortcuts.

I went through and deactivated (but did not uninstall) all contrib modules and have the following core modules active:

Block
Contextual links
Dashboard
Database logging
Field
Field SQL storage
Field UI
Filter
Help
List
Locale
Menu
Node
Number
Options
Overlay
Path
Profile
Search
Shortcut
System
Taxonomy
Text
Toolbar
Update manager
User

Hope this helps!

anrikun’s picture

Status: Active » Needs review

All right, I was able to reproduce the bug and I have fixed it.
Can you get the last menu_firstchild.module from CVS and review it?

anrikun’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0
jon betts’s picture

Unfortunately I haven't had any luck getting CVS set up on my Mac. I've got CVS set up but haven't found clear (for me) instructions on how to set up specifically for Drupal. I think there is a way to make a patch though on Drupal.org, I'll look into it.

jon betts’s picture

Status: Needs review » Reviewed & tested by the community

I took a look at the changes that were made in CVS and they were easy enough for me to make so I did. I tested it out with the stripped down installation above and then I re-enabled a few dozen modules and the message has gone away. Thanks!!

anrikun’s picture

Status: Reviewed & tested by the community » Fixed

Great!
Thanks a lot for reporting this bug and helping me to find it.
Let's mark this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ludo.r’s picture

Status: Closed (fixed) » Active

This issue is still there using version 7.x-1.0

I have this error message when adding a shortcut.

I cleared the cache.
I activated Shortcuts module after Menu firstchild, could this be the problem?

anrikun’s picture

Version: 7.x-1.1 » 7.x-1.0
Status: Closed (fixed) » Active

This has been fixed in dev, not in 7.x-1.0 so you need to get it from GIT.
Or wait a little,
I will do a new release.

anrikun’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Active » Closed (fixed)
ludo.r’s picture

Version: 7.x-1.0 » 7.x-1.1
Status: Active » Closed (fixed)

Oh!
Thanks for this new release! :-)

ludo.r’s picture

Drupal isn't able to find the new version :

No available releases found

It seems several modules have the same problem. I just ran a cron before checking available updates.

anrikun’s picture

Maybe it takes some time before it get listed.
Grab it from http://drupal.org/node/1335246 directly.