Closed (won't fix)
Project:
Internationalization
Version:
7.x-1.4
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2011 at 15:08 UTC
Updated:
8 Mar 2012 at 07:32 UTC
Jump to comment: Most recent file
Comments
Comment #1
jose reyero commentedThe fact that it is the core module that produces a notice first makes it looks like it is a Drupal core issue.
i18n_menu mimics the logic in core menu module so we should first fix this in core, then we'll update i18n code.
Btw, what do you mean 'don't link it directly to the menu'?
And does this happen when you disable i18n_menu module?
Comment #2
modulist commentedI'm seeing the same error without i18n installed. Could it have anything to do with nice_menus and its local submenus?
Comment #3
puregin commentedI'm seeing the same error. I created a basic page (node/1) and set it to be the home page for the site. Under Structure/Menu/Settings, I set the main links to be the Navigation menu. All of the selected items are display (as tabs in Bartik) but the first tab is blank, and links to "node/%25". I'm guessing there is some kind of translation that is happening to the "home" page title?
Comment #4
jose reyero commentedSo not i18n (#2), please find the right module
Comment #5
bartl commentedBullshit.
The problem also occurs in other places in the Drupal code, such as includes/menu.inc, and can be fixed in the exact same way because the code in i18n_menu.module is the same code as in menu.inc.
That patch did take the long road to solve the problem, if you just suppress the PHP notices on this one line, with "@", it'll be gone too.
So here is a patch that solved the problem in 18n_menu.module. (patch with -p1)
Comment #6
mgiffordGotta note here that @chx's patch in #1018614: Inaccessible menu items in navigation links cause "Notice: Undefined index: localized_options" hasn't gotten into core yet and so it hasn't been fixed in core yet.
I haven't looked into if this is a i18n or core issue.
@bartl - I don't think suppressing notices using http://php.net/manual/en/language.operators.errorcontrol.php - is generally a good idea.
Comment #7
jaime@gingerrobot.com commentedHi!
I also am seeing this same error with 7.x-1.4 I'm sure there's some deeper problem here that is causing this error. I went back in the git repository and found the error came up at the follow commit:
commit 48d157f376d3bcc0e8d0bcb912bb75ba1457050d
Author: Florian Weber
Date: Fri Feb 3 21:26:05 2012 +0100
Issue #1351678 by caktux, oriol_e9g, webflo: Follow menu_link_get_preferred() active trail handling for custom menus.
The change that made the error occur was removing the break 2;
I added the break 2; back into the function and I no longer see the error. here is my patch:
Updated to note this did not fix it after all. I think we will need to follow up with menu.inc, it's about the translate function.
Comment #8
jaime@gingerrobot.com commentedComment #9
jaime@gingerrobot.com commentedSo if anyone does find this the two dodgy fixes I came up with for the error messages
1. do the solution from http://drupal.org/node/1018614 to both this menu file and the file in includes.
2. Add a return to the init function in i18n so it doesn't keep looping through menu items that don't have translations.