Issue with i18n on 5.7 - Create Menu option does not assign a language to the menu.
Not sure if this is a i18n issue or a Node Hierarchy issue - seems to be the compatibility between them (though I'm not a great programmer, so I'm not sure).
By automatically generating a menu item, its language option is not set to anything. I'm using English and French. Creating a page in English and ticking the "Create Menu" option generates a menu which sits in the English hierarchy without problems. But, because the parent item does not exist in French, the same menu item is automatically dumped into the Navigation menu (because it's at the top of my menu list I guess).
This means that after creating loads of pages in English and then flicking to French, the Navigation menu is full of orphaned menu items. The only way to fix the situation was to manually go though all the menu items in the Admin--Menu page and select the language as English. This made them disappear from the French Navigation menu.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | nodehierarchy_menu_language.patch | 733 bytes | scb |
Comments
Comment #1
ronan commentedHi,
I don't have much experience with i18n. I'll look into this issue as soon as I get a chance.
Thanks
R
Comment #2
ronan commentedI'm afraid I've never used i18n before and I'm struggling to figure out how to set it up to reproduce the issue you're having, if you have some time, could you give me step by step instructions for reproducing the issue?
Thanks for helping out with this.
Comment #3
dagomar commentedRelated issue:
#235394: i18n + node hierarchy: double menu entries
Comment #4
dagomar commentedi would also have this done automatically; i am troubleshooting the problem now. Before i go any further, a note:
creating a menu item using node hierarchy doesnt create the menu items language
>>
creating a menu item using drupal's default menu creation does set the language.
I will investigate how exactly does the default menu creation work, perhaps I'll find out why node hierarchy is not 'calling' i18n
Comment #5
scb commentedSubscribing.
I'll try to take a look at it, too
Comment #6
scb commentedFound a solution:
In nodehierarchy module, inside function _nodehierarchy_create_menu (around line 864),
replace:
menu_edit_item_save($node->menu);with:
I don't know if this is the best solution, but it works.
Comment #7
scb commentedI've made a patch with the changes above.
It's my first one, so tell me if it's not right.
Comment #8
ronan commentedThanks for the patch, I'll try and get it reviewed and committed as soon as my schedule allows.
Ronan
Comment #9
milos1234 commentedHi, is there a solution for this with Drupal 6? im sure the change cant be too different?
Thanks thanks thanks!
Comment #10
markhalliwellThis issue pertains to the 5.x branch which is no longer supported. If this issue cannot be resolved within two weeks, it will be closed.