Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since Drupal 7.33 there is a preferred_menu_links tag added to the database query that is used by menu_link_get_preferred() to find the preferred menu link for a given path.
This allows us to remove all the code in that is currently in i18n_menu_init and replace it with one line of code in hook_query_preferred_menu_links_alter().
Patch attached removes the hook_init and replaces it with a hook_query_preferred_menu_links_alter.
Comment | File | Size | Author |
---|---|---|---|
i18n_menu_replace_hook_init_with_hook_query_preferred_menu_links_alter.patch | 4.27 KB | JeroenT |
Comments
Comment #2
joseph.olstadi18n_menu_init was removed
if this doesn't fix the issue above, please let me know either way.
The issue where i18n_menu_info was removed is described below:
#881322: Multilevel menu fails to create active menu trail with same link_path in different languages
it was replaced with:
i18n_menu_query_preferred_menu_links_alter
by @stefan.r
Thanks.
Comment #3
JeroenTComment #4
joseph.olstad@JeroenT , thanks for the followup.
We should probably release 7.x-1.15 soon.