I am working with 'Node form columns 7.x-1.x-dev (2011-Feb-25)' & 'Menu attributes 7.x-1.x-dev (2011-Feb-25)' -- http://drupal.org/project/menu_attributes.

After updating and installing a few modules, there occurs a display of 'Menu item attributes' on 'admin/structure/types/manage/foo-nodetype/form', suddenly from nowhere! From my point of view, this display should not happen.

On top of that, when I try to hide this attribute [for node creation purposes], it still shows up. Related issue here: #1024830: Body field still displays when Hide selected.


the_phi’s picture

... I tried to reproduce this strange occurence with/in a lightweight Drupal7 test site: Everything works fine there. In a second step I added the new modules, one by one: Even then everything worked fine.

How is this possible? I am clueless. Anyone out there with a bright explanation? Thanks.

idflood’s picture

Got the same issue. This appeared on node types where I disabled all "Available menus" in admin/structure/types/manage/foo-nodetype. After enabling at least one menu the 'Menu item attributes' was not shown in 'admin/structure/types/manage/foo-nodetype/form' and everything was working.

This could maybe be handled in menu_attributes with either "nodeformcols_pre_form" or "nodeformcols_post_form" alter hooks. But in fact i don't see why both module should have to care about the other.

edit: thinking about it, menu_attributes should check before altering the form that there is a menu available. This should fix the issue.

idflood’s picture

I created the issue #1128510: Menu attributes displayed even if all menus are disabled for a content type in menu_attributes since the fix may come from there

Dave Reid’s picture

Menu attributes only adds elements inside of $form['menu'] if the $form['menu'] element exists - which it does not when there are no menus available for a content type. So I don't see how there's any problem from the menu_attributes side of the code.

idflood’s picture

I wanted to reproduce again this issue with the latest version of both modules. I first tested on a clean install and the issue is fixed. I then also updated the modules on another website and the issue was also no longer visible. So for me this issue can be closed.

the_phi: can you try to update the modules on the site where you have this issue and confirm it's fixed?

the_phi’s picture

... on this specific site both of the modules were deinstalled weeks ago. Sorry, I don't intend to reinstall them.

idflood’s picture

Status: Active » Closed (cannot reproduce)

ok, so let's close this issue. But feel free to open it again if needed.

Bartezz’s picture

Status: Closed (cannot reproduce) » Active

Possible solution with patch; http://drupal.org/node/1128510