hi there,

Recoverable fatal error: Argument 2 passed to _menu_attributes_form_alter() must be an array, null given, called in /sites/all/modules/menu_attributes/menu_attributes.module on line 167 and defined in _menu_attributes_form_alter() (Zeile 180 von /sites/all/modules/menu_attributes/menu_attributes.module).

reproduce error:
enable the menu integration of ET while having menu attributes enabled.

try to add a translation to an existing node results in error



ps.: though I personally would see this as a major / critical error I do understand that menu attributes isn't used that much.

#8 menu_attributes-entity_translation_issue-7676205-8.patch649 bytespakmanlh
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


bforchhammer’s picture

Project: Entity Translation » Menu attributes
Component: Menu integration » Code
Status: Active » Postponed (maintainer needs more info)

Sorry, but I can't reproduce the error. Downloaded the module (dev version), enabled it and I was able to add new and edit existing translations/nodes without getting any errors.

Also, from the error message it sounds like it could easily be fixed in the menu_attributes module by adding some additional validation before calling _menu_attributes_form_alter()... therefore moving to the Menu Attributes issue queue.

orbistertius’s picture

I had the same error in version 1.0-rc2. I had no time to find out what had happened (I am using menu_blocks, nice_menus and views_menu perhaps this is not a real menu_attributes problem).
I changed line 143 (first line in menu_attributes_form_node_form_alter) to:

if (isset($form['menu']['link']) && !empty($form['#node']->menu)) {

Hope this helps.

marktheshark’s picture

Issue summary: View changes

Encountered the same error today.

Unable to edit a particular page because of this...

Used the fix in #2.

marktheshark’s picture

Status: Postponed (maintainer needs more info) » Active
harshil.maradiya’s picture

Status: Active » Closed (won't fix)
mordonez’s picture

Same problem here with Entity translation (entity) + Entity Translation Menu (entity) + Menu translation (i18n) + menu attributes.

mordonez’s picture

Status: Closed (won't fix) » Active
pakmanlh’s picture

Status: Active » Needs review
649 bytes
PASSED: [[SimpleTest]]: [MySQL] 108 pass(es). View

Here I attached a patch with the solution on the #2 comment, thank you a lot!

Status: Needs review » Needs work

The last submitted patch, 8: menu_attributes-entity_translation_issue-7676205-8.patch, failed testing.

pakmanlh’s picture

Version: 7.x-1.x-dev » 7.x-1.0-rc2
Status: Needs work » Needs review

Sorry, the version was wrong, that's the 7.x-1.0-rc2

pakmanlh’s picture

joelpittet’s picture

Status: Needs review » Closed (duplicate)

This is fixed in dev, please use dev version. Changes will likely make it into rc3.

bendev’s picture

#8 works as expected

ressa’s picture

I just got this error as well, and updating to dev version solved it. Perhaps it's time to upgrade dev version to rc-3?

joelpittet’s picture

Released rc-3 today, cheers.

ressa’s picture

Awesome, thanks!