Hi,

We're trying to implement a megamenu feature on a client site using the menu_views module. As we create a node, we're able to pick a view and a display, but when we go to save it, we're consistently getting a form error:

The menu item type for this node is a view. A view name is required before this node can be saved.

I haven't had time to look into the issue in too much depth, but I'm noticing that by the time the $item is returned by _menu_views_get_item() (menu_views.admin.inc:555), the view name and other menu_view data from the form are gone. The $form_state['values'] are setting things properly, but somewhere they're getting stripped. I noticed within the _menu_views_get_item function, the system checks for _menu_views_option_tree (menu_views.module:257), and I believe because there is 'options' data in the menu link, it's passing true. At that point, the form_state values are lost from the $values variable and ultimately don't end up being set in the $item data. This scenario seems to happen both when creating new nodes and when updating existing nodes.

What's the purpose of _menu_views_option_tree and why, if it passes true, does it set the data differently? I'm struggling to figure out a scenario where that would be desired, but due to the complex nature of menu form handling, I'm probably overlooking something.

Thanks!

Comments

markhalliwell’s picture

Status: Active » Fixed

Fixed in commit: f910b90.

Status: Fixed » Closed (fixed)

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

jmev’s picture

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

I just downloaded this and am getting the same error. Bummed, as I thought this was my solution for creating a mega-menu out of a simple nice-menu.

markhalliwell’s picture

Try the dev version, it's been fixed.

I'll try to release a new version later next week.

markhalliwell’s picture

Status: Active » Closed (fixed)