Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Status: Active » Needs review
xjm’s picture

Status: Needs review » Needs work

This will need to be updated to use the constant MENU_LINK_PREFERRED.

caktux’s picture

oriol_e9g’s picture

Only file rename for testbot.

Edit: Ops! I have not see that we are in the Internationalization project.

webflo’s picture

Triggering testbot.

Status: Needs review » Needs work

The last submitted patch, i18n-menu-active-trail-custom-menus-1351678.patch, failed testing.

webflo’s picture

Status: Needs work » Needs review
FileSize
2.64 KB

Rerolled against current HEAD.

webflo’s picture

Triggering testbot.

batigol’s picture

http://drupal.org/node/1414920 - I did have some time tonight but cause of http://drupal.org/node/1410004 I couldn't even install latest version of i18n.

batigol’s picture

With Drupal 7.4 (update.php, clear cache).

  • Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' in i18n_menu_init() (line 783 of C:\xampp\htdocs\drupal\sites\all\modules\i18n\i18n_menu\i18n_menu.module).
  • Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' in i18n_menu_init() (line 821 of C:\xampp\htdocs\drupal\sites\all\modules\i18n\i18n_menu\i18n_menu.module).
  • Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' in i18n_menu_init() (line 823 of C:\xampp\htdocs\drupal\sites\all\modules\i18n\i18n_menu\i18n_menu.module).

Drupal 7.12

Everything is FINE! Menu IS WORKING like it always should :P

@webflo Just test Drupal 7.12 with i18n module without this patch. Maybe it's not needed anymore...

"Drupal 7.12, 2012-02-01
----------------------
- Fixed bug preventing custom menus from receiving an active trail."

Patch is needed to display menu subitems properly.

LOL I have discovered that <del> dosen't work when there is " inside </del> :)

HnLn’s picture

this patch solved a problem with menu_block for me (http://drupal.org/node/1425342)

sense-design’s picture

Confirming #11

Patch menu_block: http://drupal.org/node/1425342#comment-5549484
Patch i18n: http://drupal.org/node/1351678#comment-5498090

Apply these 2 patches and menu_block and i18n work well with 7.12

mostou’s picture

Confirming #11 as well.

webflo’s picture

Status: Needs review » Fixed
Issue tags: +Needs tests

Commit 48d157f on 7.x-1.x
Thanks!

RichardB-dupe2’s picture

Status: Fixed » Needs review
Issue tags: -Needs tests

Status: Needs review » Needs work
Issue tags: +Needs tests

The last submitted patch, i18n-menu-active-trail-custom-menus-1351678-7.patch, failed testing.

xjm’s picture

Status: Needs work » Fixed

The patch has already been committed. Therefore, there is no need to re-test it. Trying to test it will in fact fail--it can't be applied because it is already there.

Eric_A’s picture

Erhm,

I just heard this leads to fatal errors when upgrading i18n, when Drupal < 7.12 builds a breadcrumb. Perhaps declaring a dependency can help prevent this upgrade?

hatuhay’s picture

Version: 7.x-1.x-dev » 7.x-1.4

Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' en i18n_menu_init() (línea 786 de /sites/all/modules/i18n/i18n_menu/i18n_menu.module).
Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' en i18n_menu_init() (línea 786 de /sites/all/modules/i18n/i18n_menu/i18n_menu.module).
Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' en i18n_menu_init() (línea 786 de /sites/all/modules/i18n/i18n_menu/i18n_menu.module).

Drupal 7.10, i18n 7x-1.4
Upgrade to Drupal 7.12 solves the problem

batigol’s picture

@hatuhay #10 same in drupal 7.4

Drupal 7.12 like you have said solves the problem.

spynode’s picture

With Drupal 7.12 and i18n module 7.x-1.4 active menu trails in custom menus still won't work. After turning off Menu Translation module, active menu trails work as they should. Am I the only one experiencing this?

f4o’s picture

I upgraded Drupal from 7.10 -> 7.12 and error

Notice: Use of undefined constant MENU_PREFERRED_LINK - assumed 'MENU_PREFERRED_LINK' u i18n_menu_init() (line 786 from /home/retrumho/public_html/sites/all/modules/contrib/i18n/i18n_menu/i18n_menu.module).

was solved!

batigol’s picture

@spynode, are you using some additional menu modules (like http://drupal.org/project/menu_block)?

spynode’s picture

#23 Yes, I use Taxonomy Menu + DHTML Menu. After page reload menu always is closed. Problem doesn't occur without Translate Menu module enabled.

batigol’s picture

@spynode, I have no idea.

Drupal 7.12 + i18n 7.x-1.4 + update.php + clear cache should fix problem with menus. Try to disable additional menu modules (or upgrade them).

spynode’s picture

@batigol Tried to regenerate taxonomy menu, and cleared cache. Update script showed that no updates where available. After loading a certain page menu still is closed and no active trail is added to it. After disabling Menu Translate module, active trail is added and menu is open all the way to the particular link of the page.

batigol’s picture

Maybe you did use some patch from http://drupal.org/node/942782 and need to take them back before upgrade to 7.12 ?

colan’s picture

fretje’s picture

I can confirm what @spynode said in #26. I have the same problem.

Drupal 7.12 with i18n 1.4

When I enable the "Menu Translation" module, the submenu's are gone.
When I disable it, they're back again.
No other menu-related modules are enabled.

bvanmeurs’s picture

Only good solution is a query alter hook there.. Code duplication gives these kind of problems! Have you issued a feature request and lobbied for this with the core menu module maintainers?

vegardjo’s picture

Experiencing the same as spynode in #26 and fretje in #29. Drupal 7.12, Menu Block and Menu Translation enabled, all up to date.

The menu block with sub-menu items appears fine for my Main menu, but equal block does *not* appear for a custom menu I have built. If I disable Menu Translation the menu block appears again.

colan’s picture

vegardjo’s picture

Thanks colan, but are you sure? That was the issue that sent me to this one: "Turn off Menu translation submodule to check if its i18n fault". (comment #9 and #10 there).

Menu Block works as it should until I turn Menu Translation on, then it fails on custom menus.

BTW: this is a site buildt fresh on Drupal 7.12, Internationalization 1.4 and Menu Block 2.3, no upgrades involved.

colan’s picture

I'm not sure, but I'm not using Menu Block, and I don't have any of these problems. I noticed other folks were though.

mgifford’s picture

I'm having trouble with Menu block & 7.12, but just installed it and haven't verified that this is the issue.

vegardjo’s picture

@colan and all, my problem was actually the fact that this site was built from scratch on 7.12, and a necessary db update from 7.11 isn't executed then, see #1447466: Active menu trail breaks (menu_update_7003 creates inconsistencies). - so the problem is actually in core, not i18n or Menu Block!

mgifford’s picture

I ran that manually and id didn't seem to fix it. This is for a Drupal 7.10 upgrade without Menu Block. I added Menu Block after 7.12 had been installed. I can get primary menus to work fine, but not the secondary menus.

rypit’s picture

Confirming that #25 seems to solve the problem with Menu Block. Running as desired with the following:

  • Drupal 7.12
  • Multilingual - Internationalization (i18n) 7.x-1.4
  • Menu Block (menu_block) 7.x-2.3

Status: Fixed » Closed (fixed)

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

mgifford’s picture

Status: Closed (fixed) » Active

Well.. Pretty sure it's not fixed. Bad bot!

klonos’s picture

This was set to "fixed" back in #17. The bot simply did its job and closed the issue after 2 weeks as it's supposed to. Good bot ;)

mgifford’s picture

Status: Active » Fixed

Ok, sorry.

klonos’s picture

Status: Fixed » Closed (fixed)

Back in #40 you say that you're pretty sure the issue is not fixed. What made you say that?

mgifford’s picture

I was scanning through my list of issues and usually when the bot marks an issue closed(fixed) it's within the first few after the post. I guess I just didn't go all the way up to 17. That and being tired.. Been working too much this month.

tangent’s picture

Issue tags: +Needs backport to D6

I believe this issue also exists in i18nmenu 6.x-1.10 because I'm seeing identical misbehavior. Is there any chance this fix can be backported?

svdhout’s picture

For me this problem still occurs when using a custom menu as menu_main_links_source.

A custom menu doesn't get returned by menu_get_active_menu_names(). Thus the menu candidate is set to the main-menu.

The issue can be solved by adding the menu_main_links_source to menu_default_active_menus.

  $menus = array_keys(menu_list_system_menus());
  $main_menu = variable_get('menu_main_links_source');
  array_unshift($menus, $main_menu);
  $conf['menu_default_active_menus'] = $menus;