This seems like the perfect module for me, but I'm getting the following error when I select an option like "User from context" when trying to add tokens to my menu links.

Undefined index: menu_token_data in menu_token_form_menu_edit_item_alter() (line 410 of {site}/menu_token.module).

I tried changing weights but I really don't know what module is conflicting, I even made menu token at a weight of -1 and it still didn't work.

Comments

willieseabrook’s picture

I receive the same error

ecarter’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-beta5

I'm running 7.x-1.0-beta5 and found I was having this same error. This error usually appears when the variable is not properly set. In this case $options['menu_token_data'].

1. Not an ideal solution, but you can suppress the message by modifying the file menu_token.module on line 379:

Old:
379 if ($append = $handler->form_options($options['menu_token_data'][$type]['options'])) {

New:
379 if (isset($options['menu_token_data']) && $append = $handler->form_options($options['menu_token_data'][$type]['options'])) {

2. Suppress notice warnings

You can also modify the error reporting in your php.ini file so you can just hide notices like this: error_reporting = E_ALL & ~E_NOTICE

See:
http://stackoverflow.com/questions/4261133/php-notice-undefined-variable-and-notice-undefined-index

develcuy’s picture

Issue summary: View changes
Status: Active » Closed (outdated)