Steps to reproduce:

1. Set up two-language site (en-ru).
2. Create node for EN, translate it to RU, make sure you created menu items for both nodes.
3. Go Administer - site building - menus, find your menu items and set their Language to EN and RU manually.
4. Go to any of your nodes and just save it.
5. Go back to menu item and check it's language.

Expected:
Language isn't changed.

Actual result:
1. Language is set to "All languages" for both menu items.
2. Your menus appeared duplicated at menus (as their language isn't set).

Comments

jose reyero’s picture

Status: Needs review » Needs work

Not sure how this will work when:
- Creating new nodes (you can switch language on node creation).
- You edit a node but don't have permission to edit the menu items.
- You edit a node with a menu item set to another language (for whatever reason).

I think it may make more sense to do some form validate hook which just sets always the menu language to the node language changing $form_values.

Anyway, it is an option too to just forcing all the menu items to have the same language as the node they point to. Just trying to figure out what makes more sense here...

neochief’s picture

Status: Needs work » Needs review
StatusFileSize
new1.5 KB

Hey Hose. I was checking my old issues and found this one. Here's my answers:

> - Creating new nodes
Everything will be working as usual, as we change only editing form.

> - You edit a node but don't have permission to edit the menu items.
Yes, good point, I've set additional check to handle this.

> - You edit a node with a menu item set to another language (for whatever reason).
This doesn't make sense, as for me.

Attached fixed patch. Will commit it after your approve.

Anonymous’s picture

Anonymous’s picture

neochief’s picture

Status: Needs review » Fixed

Committed to 6.x.

Status: Fixed » Closed (fixed)

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