After I used page manager to create a menu link for a panel, my menu_links table now contains some "zombie" entries created by page manager. I don't know for now is this related or not, but also I can't translate them. None of them.
Below goes a screenshot of a query result with the problematic menu link(s).
IIRC, I got this after these steps:
- I created a panel page with 'competition' menu_router path.
- Then I enabled "Normal menu entry" with title "Конкурс 2013" for the page
- Then I added some children menu items to it
- Then I changed my mind and switched off this feature by setting it to "No menu entry"
- But when I opened
admin/structure/menu/manage/main-menuI saw that the menu link is still there. (Now I feel a sense of deja vu — like I posted about this problem in the issue queue before!) - I clicked "reset" and it suddenly disappeared and all it's children jumped to the root level
- Then I re-created this item by hand — entering "Конкурс 2013" in title and 'competition' in path.
Making a long story shorter, this is what I have in menu_links now:

But in the admin UI I see only 830' link, the other 602 and 604 are not displayed anywhere, but as debugging just discovered — they are selected and processed by _menu_tree_check_access() and menu_link_translate(), these zombie items. As a temporary solution I'm gonna kill them now by hand.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Screenshot from 2013-03-28 18:13:27.png | 28.06 KB | OnkelTem |
| #1 | Screenshot from 2013-03-28 18:13:39.png | 39.98 KB | OnkelTem |
| #1 | Screenshot from 2013-03-28 18:14:32.png | 9.8 KB | OnkelTem |
| #1 | Screenshot from 2013-03-28 18:15:01.png | 61.67 KB | OnkelTem |
| Screenshot from 2013-03-28 16:17:52.png | 127.58 KB | OnkelTem |
Comments
Comment #0.0
OnkelTem commentedUpdated issue summary.
Comment #1
OnkelTem commentedI found the reason why I couldn't translate menu link and this is really cryptic!
[Screenshot-guy Mode On]
See anything? No, it's virgin clean:
Let's click on "Normal menu entry":
See the title is not empty? It equals to: "Конкурс 2013", a value which was entered before, when for example, menu link was created but then — deleted. But anyway, looks pretty innocent, right? No, it's not. It is the title of the corresponding "menu_router" item (see the column to the right):
Now the menu_router item has the title, then menu_links are loaded by Drupal core, and they got $link['title'] from menu_router item title, and my particular link now has both 'link_title' and 'title' equals to the same value:
I'm yet to get around to the actual reason why this makes i18n to stop finding this as a translatable "menu" item string, but for example
_menu_item_localize()makes difference:i.e. when title = link_title, it behaves differently.
[Screenshot-guy Mode Off]
IMHO, the 'hidden' naming of menu_router item by page manager is the bug. Steps to reproduce:
1) Open a panel
2) Enable "Normal menu entry" but don't save the panel!
3) Enter the title
4) Now switch it back to "No menu entry"
5) Save the panel
6) menu_router item is updated and got the title.
Comment #2
OnkelTem commentedWhile this has no relation to CTools, just to finish the story, I found the code responsible for not allowing my link translation. It is from i18n_menu.module:
i.e. if a menu link title matches router title it's not added to the strings of i18n_menu.
Comment #2.0
OnkelTem commentedUpdated issue summary.
Comment #3
sinasalek commentedCheck this out #1897696: Inconsistent check for translatable title in _i18n_menu_link_localizable_properties() and _i18n_menu_link_localize()
Comment #4
japerryDrupal 7 is no longer supported, closing.