When I try to edit a container's menu settings (e.g. parent item, weight etc.), the changes do not occur. I need to do it in 'edit the advanced settings' - then it works ok.

CommentFileSizeAuthor
#3 category_menu_weight.patch837 bytesdecafdennis

Comments

canen’s picture

Is there anything happening on this?

Thanks.

decafdennis’s picture

Assigned: Unassigned » decafdennis

My client is bugged by this as well and I'm going to attempt to write a patch.

decafdennis’s picture

Title: Changing a container's menu settings » Changing a node's menu settings in a category
Status: Active » Needs review
StatusFileSize
new837 bytes

I dove into the code and although the behavior is unexpected, this is not a bug.

First of all, if you want to pick a different parent item you should disable the automatic creation of menu items for that container.

Second, if you want to change the weight you should change the weight in the category information field set.

However, it is impossible to change the weight of a menu item for a normal node contained in a category. This is fixed by the attached patch.

Jaza’s picture

Status: Needs review » Needs work

-1 to this patch. As you pointed out, naquah, this is not a bug, this is how category_menu is designed to work. Category_menu overrides the 'menu settings' form elements on a node edit form. I personally am in the habit of removing the menu_form_alter() function from my sites, so that the whole 'menu settings' fieldset doesn't come up at all.

If this patch is to go in, then at the least, an extra checkbox 'override category menu settings' should be added to the 'menu settings' fieldset.

Jaza’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev
Category: bug » feature

As this is a behavioural change, and as I don't consider it to be a bug, this should only be fixed for the Drupal 5 branch and HEAD.

decafdennis’s picture

Assigned: decafdennis » Unassigned

When enabling the automatic creation of menu items for nodes contained in a category, it is impossible to change their weight in any way. Isn't that a bug?

Jaza’s picture

You can change their weight from the 'admin/build/menu' page.

decafdennis’s picture

And when a non-admin user changes the page, the weight is reset to 0.

decafdennis’s picture

(By non-admin user I mean someone who doesn't know he or she is supposed to set the weight everytime.)

fossilfool’s picture

I agree that it's a bug. I changed the menu item to point to a different menu -- "Site Topics", instead of "Navigation". I did this to separate the locked menu items ("my blog" and "my account") from the category structure of the site.

I found that any time I edit the container in any way, it resets the menu to point it to "Navigation". How is that not a bug? It seems like editing a container, you should be able to change one thing (for example, fix a typo in the body field) without changing the menu information also.

decafdennis’s picture

Hmm, the Parent of a menu item getting reset is not a bug, I think. Since the category module automatically determines this from the parent of the container/category/node.

Jaza’s picture

Status: Needs work » Closed (duplicate)

I've had this discussion before in previous threads, and I don't want to keep repeating what I've already said. So I'm marking this issue as a duplicate of http://drupal.org/node/47722 (which I've moved to 5.x-dev). Please continue discussion over there.

There are probably several other older issues that discuss this same topic, but I can't find the rest - if someone else finds them, please link to them at http://drupal.org/node/47722 . Thanks.