Needs review
Project:
Internationalization
Version:
7.x-1.x-dev
Component:
Menus
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 May 2012 at 15:47 UTC
Updated:
14 Feb 2019 at 09:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gabrielu commentedSee attachement.
Comment #3
gabrielu commentedReattaching
Comment #4
jose reyero commentedMaybe the actual bug is 'why the menu item doesn't get the node language?', not fixing it later.
Comment #5
gabrielu commentedShould the menu item get language from the node? What happens when you change language of a node, should you go to the menu_item and update the language?
I'm not sure I understand how it works at the moment, since the menus are shown correctly on the site, but not in the admin.
Comment #6
a6hiji7 commentedI was having the same problem and it was driving me nuts for sometime. Then I noticed that if I change the content language to "Language neutral", then save and then edit and change to the correct language and save again, the menu language gets fixed. Good that I don't have to apply a patch!
Comment #7
jide commentedIn fact, this issue is caused by a misconfiguration of the menu settings in a content type.
If you manually added a menu link pointing to a node in a menu that is not enabled for this content type, then it will fail to get the menu item language.
To fix it, just edit the content type and add the menu in the available menus. Then if you save content again, menu item language will be correct.
Comment #8
jose reyero commentedI think the reason is well explained by @jide in #7
About the patch, it won't work for new menu items created. This should be done when creating/updating new menu items, not in the form.
Comment #9
gabrielu commentedNormally the patch should be display only, nothing related to functionality.
But if #7 is correct, the we shouldn't need the patch, rather than think of a way the menu module would take language even if it's not configured in the conten-type.
Gabriel
Comment #10
Fidelix commentedNo. In my case, the menu is enabled for the correct content types, and when I change something, export the feature and revert it on another site, all the links lose language information, and become "Undefined". Just like that.
Not even with the patch in #3 this is working for me.
Edit: Please, ignore. It appears this problem is with the Features module:
http://drupal.org/project/issues/features?text=menu+language
Comment #11
mvcnote: see also #1642344: i18n_menu 6.x -> 7.x upgrade path
Comment #12
hermes_costell commented+1
I had all items for both languages (English and Italian) showing at the same time. For others encountering this, here is what worked for me:
Comment #13
zvs commented3: 1594804-menu_node_language.patch queued for re-testing.
Comment #14
jose reyero commentedFor all I've read, it seems this was caused by some misconfiguration.
Also the patch just fixes how it is displayed on the form, which may confuse more than help (you are seeing different values from what it's stored in the database).
Feel free to add this to the module's handbook, but we don't really need this patch.
Comment #15
fer051 commentedotra opción cuando se edita un link del menu es: momentáneamente copiar la ruta del nodo y cambiar la ruta del path por o guardarlo, al volver a editar el Link, si permitirá seleccionar el idioma que queremos para el nodo, restaurar la ruta de nuestro nodo en el path, guardar, y luego traducir....
===================================================================
(translate with google)temporarily copy the path node and change the path by or < nolink > save it, to re-edit the link, if you to select the language, you want for the node, restore the path of our node, save , and then translate ....
Comment #16
miroslavbanov commentedThis is a real, reproducible issue:
When creating a menu link from admin/structure/menu/manage/{menu}/add :
I can forget to set language, or set incorrect language. After that I see the message "This menu item belongs to a node, so it will have the same language as the node and cannot be localized." - which is misleading as it may not have the same language as the node, and I can't fix it.
If we are disallowing setting of language, there must be something that automatically sets correct language.
Comment #17
miroslavbanov commentedTrying to fix it by setting language on menu link save.
Comment #18
ckngRerolled #17 for dev. Tested working.
Comment #19
joseph.olstadadding some tests for php 5.4 , 5.5, and php 7
Comment #20
joseph.olstadSo no reported regressions from patch #18 ?
is it possible for someone to write a simpletest for this?
Comment #21
q11q11 commentedRerolled #18 aganist 7.x-1.26, just couple offsets.