Strange, we have this working well on some sites, however .. On our current install i'm trying to remove all menus from a content type

I've ticked off all the menus for my content type, i save the settings, then re-edit the content type and the primary links is ticked on again.

CommentFileSizeAuthor
#8 ctm_deselect_all-1088000-8.patch787 bytesimclean

Comments

vasike’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)
hixster’s picture

What additional info do you require?

vasike’s picture

1. please try the dev version. maybe it's already solved.
2. what modules do you have installed?

vasike’s picture

Version: 6.x-1.0 » 6.x-2.x-dev
Status: Postponed (maintainer needs more info) » Needs review

moved to the new branch

hixster’s picture

I haven't experienced this issue again on my other sites so maybe close this for now. I'll reopen another ticket if it happens again.

vasike’s picture

Status: Needs review » Fixed

ok. thank you

imclean’s picture

Status: Fixed » Active

I'm seeing a similar problem when creating new content. It can be attributed to the following piece of code:

      if (!empty($form['menu']['parent']['#default_value'])) {
        // Add the existing menu to the list, even if it's not an option
        list($cur_menu) = explode(':', $form['menu']['parent']['#default_value']);
        if (!in_array($cur_menu, $menu_settings)) {
          $menu_settings[$cur_menu] = $cur_menu;
        }
      }

Presumably $form['menu']['parent']['#default_value'] contains the value set at admin/build/menu/settings. The default menu must be set to a value so a menu will always appear.

No menu is selected to display for the content type, but "Primary Links" is shown when editing and creating new content.

See #864582: Allow existing menu entry for a page to remain

imclean’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new787 bytes

This patch fixes for me.

markwittens’s picture

I can confirm the patch in #8 works for me too.

vasike’s picture

patch commited http://drupalcode.org/project/ctm.git/commit/1142245
thanks. hope it works

imclean’s picture

Should do. As the other issue mentions, link_title is what the feature/fix is concerned with so it's probably best to check that directly. Also, the menu's #default_value isn't necessarily the item's menu.

vasike’s picture

is this solved after the commit?

imclean’s picture

Works for me.

- When no menu is selected for the content type, the node create screen doesn't show the menu settings.
- When editing a node, the current menu settings are retained regardless of whether the menu is allowed or not.

s.daniel’s picture

Does not work for me. (using dev version of nov 5th). The default menu set at /admin/build/menu/settings still shows up.
cleared the cache & re-saved every setting. Logged in as uid 3.

edit: After downgrading to 1.1. and reloading the old database the problem remains. Also after uninstalling and reinstalling + resetting the config.

renenee’s picture

Subscribing. I'm on the latest dev branch from 11/5. I have a content type with all menus disabled, yet they are all still available. I have also disabled Menu Admin per Menu in case of a conflict.

I am still receiving all options in the Menu Settings for this content type.

Also, I have tested making one menu available, and all menu options are available in the Menu Settings for this content type.

imclean’s picture

#14 and #15, make sure you delete the old module before installing the latest dev.

Do you still see unchecked menus when creating new content or editing existing content? When editing content, you'll need to clear the "Menu link title" field, save the content, then click edit again to see the changes.

If none of the above solve it for you, could you check on a fresh install of Drupal.

s.daniel’s picture

Thank you for your response!
I found my mistake and it works now, both with new nodes and existing ones using the latest dev.

The problem was that I had one version of ctm in the sites/all/modules and another one in the sites/default/modules folder. Probably because a drush command didn't work the way I was expecting it to. Result was that when I uninstalled and reinstalled the module the old version of the module was still used.

renenee’s picture

I tried #16 and no luck. I suppose I'll try a new install of Drupal.

imclean’s picture

Also make sure you're not logged in as user #1. Apparently this works differently to the previous version.

renenee’s picture

Well, there you go. Thanks, imclean. #19 worked.

vasike’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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