Hi,

I've encountered a slight issue with the module when a page already has a menu link in a menu that it's not allowed to. Upon loading the form, the #default_value for the parent is set to a value that's not in the #options set by ctm, but the menu link title is still set, so if the user doesn't notice this and saves the node, it gets reparented parented to the top of whatever menu comes first in the list.

I suggest that in these cases the module should allow the existing link to remain, but once they switch the parent to another menu, the disallowed menu is no longer an option.

I've attached a simple patch that allows the menu currently specified in $form['menu']['parent']['#default_value'] to be selected, even if it's not a configured menu. This could possibly be enhanced further to show a message warning them that the node is in a disallowed menu too, but I didn't need that in my case.

Thanks

Comments

aaronbauman’s picture

StatusFileSize
new1.07 KB

+1! This is quite vexing behavior!
However, this patch appears to have been inverted.
Updated patch to apply this fix, rather than remove it.

aaronbauman’s picture

Category: feature » bug

Marking this a bug since it degrades existing behavior.

aaronbauman’s picture

StatusFileSize
new927 bytes

ACK - neither patch from OP nor from #1 applies cleanly.
Let's try this one

vasike’s picture

Status: Needs review » Closed (fixed)
mrfelton’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Why is this marked as fixed?? - it's not in 1.1 or the latest dev code.

mrfelton’s picture

StatusFileSize
new830 bytes

Attached is a version that applies cleanly to 6.x-1.x. Please can we get this committed, things can really get screwed up without it, with pages being reparented to completely the wrong menu.

vasike’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

imclean’s picture

There's a slight change to how this works being discussed in #1088000: Can't deselect all menus.

aaronbauman’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new528 bytes

I was disappointed to see that this is still broken in 2.x

Here's a patch.

vasike’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)