The function entity_translation_i18n_menu_form_menu_edit_item_validate checks if the path of the new item being created is not already in the database.
But this validation prevents to add more than 1 link with path equals to (option given by Special menu items module)

#8 entity_translation-fix-i18n-menu-item-validate-1989084-8.patch913 bytesjsacksick
PASSED: [[SimpleTest]]: [MySQL] 721 pass(es).
[ View ]


bforchhammer’s picture

Status:Active» Postponed (maintainer needs more info)

I don't understand your problem... That function should only prevent multiple menu links to the same node, i.e. it shouldn't affect menu links with the path set to <nolink> or <separator> at all. And either way, you should still be able add additional items via the menu configuration area.

Can you elaborate on what's not working as expected, and what the expected behavior is? Also, it would be helpful to have steps to reproduce the error on a clean install (with dev-versions).

candelas’s picture

Issue summary:View changes


I am having the same problem. With you can make menu items that has not link and you do it writing in the Path field <nolink>. With your validation function, you are only able to have one, since when you try to create the second, you get this error

There are already one or more items with a language assigned for the given path. Remove them or assign a language to this item too.

The solution it would be that when you check, if it is <nolink> or <separator> they are not considered as duplicate. @heyyo did you find a solution? Thanks

candelas’s picture

Version:7.x-1.0-beta2» 7.x-1.x-dev
candelas’s picture

I have make this change in the function and everything works ok. If you want and say it is ok, I can make a patch. Thanks for your module
in line 200
  if ($item['language'] == LANGUAGE_NONE){
  if ($item['language'] == LANGUAGE_NONE && $form_state['values']['link_path'] !="<nolink>" && $form_state['values']['link_path'] !="<separator>"){

Topplestack’s picture


Can you create a patch? I'm having the same issue. Also, what file are you patching? It's not clear in your comment.

We are experiencing the same thing. I believe that there has been possibly a core update that has caused this. We are not able to create any more menu items in any of our menus and cannot edit any of the existing items without receiving this error. Whatever it was that allowed this to work before, is not working now.

candelas’s picture

@Topplestack, sorry but at the moment for 2 weeks or more I am overload. Also, the people in the module didn't say if they think it is a right solution...

my-family’s picture

I experienced the same issue with the menu_firstchild ( module which adds the value.

jsacksick’s picture

Status:Postponed (maintainer needs more info)» Needs review
new913 bytes
PASSED: [[SimpleTest]]: [MySQL] 721 pass(es).
[ View ]

I also stumbled upon this issue, I created menu items with a path set to <nolink> thanks to the special_menu_items module. The validation will fail if you try to create more than one item with the same path with a language set to neutral.
The attached patch adds a condition and checks if the link_path doesn't start by <, it should cover most of the usecases.

plach’s picture

Status:Needs review» Reviewed & tested by the community

Looks good to me, thanks.

plach’s picture

Status:Reviewed & tested by the community» Fixed

Committed and pushed, thanks.

  • jsacksick authored 706faba on 7.x-1.x
    Issue #1989084 by jsacksick, candelas: <nolink> and validation

Status:Fixed» Closed (fixed)

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