Problem/Motivation

Currently exists an compatibility issue related with the Translatable Menu Link Uri module, if is active doesn't works properly with TB Megamenu, This is caused by the natural behavior of this module that use the link field provided by Drupal.

So we need a new behavior in case that you are using Translatable Menu Link Uri module to allow set the url using the overrided field.

Steps to reproduce

1. Install TB Megamenu and place the TB Megamenu navigation block.
2. Install translatable_menu_link_uri module following the author instructions.
3. Go to your menu and translate some link setting some Override links.
4. Go to your website and select the language that you previously setting your Overrided link.
5. Check that this links maintain the original url, not overrided url.

Proposed resolution

Before setting final url of menu item check if this module is active and the link has an Override.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • 3254556- Comparecompare

Comments

jdmoreno created an issue. See original summary.

jdmoreno’s picture

jdmoreno’s picture

jdmoreno’s picture

inversed’s picture

This was super helpful! I modified the patch to work without a dependency on the menu items extra module as well as set the language selection to use the content.

This is working for me on 8.x-1.7.

Jaspreet-Kaur’s picture

Reviewed ! patch #5 worked for me. Thanks

meder’s picture

I've encountered the same problem with version 3.0.0-alpha2 in Drupal 10.2.2.
Since I'm not really into building modules or patches, I'd highly appreciate it if someone could provide a patch for the latest version (2 and 3) of tb_megamenu.

Thanks!

brownelltyler’s picture

Version: 8.x-1.6 » 3.0.0-alpha2
StatusFileSize
new1.7 KB

This version of the patch is working well for me on version 3.0.0-alpha2 in Drupal 10.2.4.

themodularlab made their first commit to this issue’s fork.

  • d26d50de committed on 3254556
    Issue #3254556 by brownelltyler, themodularlab: Compatibility with...
themodularlab’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed the 3.x patch. Merging it now. I'll look to get the 1 and 2.x versions update soon, but continue to rely on the patches for those in the meantime.

  • themodularlab committed 53b8e6bc on 3.x
    Issue #3254556 by brownelltyler, themodularlab: Compatibility with...
    

  • themodularlab committed 53b8e6bc on bugfix/TBMM-3366359
    Issue #3254556 by brownelltyler, themodularlab: Compatibility with...
    
amer cloudy’s picture

StatusFileSize
new489 bytes

please don't use it :)

yvalentin’s picture

Hi there,

I encountered another issue with this one, while using translated links to custom paths generated by a custom module.
The concerned paths looks like: /l/parameter

When I translate the links through translatable_menu_link_uri interface, tb_megamenu render them wrongly when viewed in the translated language.

Example:
Let say my website home URL is https://www.example.com, and my default language is english.
I have this link: /l/settings, that is translated to /l/parametres in french.
On front-office in the default language, the link renders correctly: https://www.example.com/l/settings
But when viewing the french version of the site, the link renders this way: internal:/l/parametres

It seems to be linked of the way the URL is generated. The translatable_menu_link_uri module use the getUrl() method while tb_megamenu use getValue()['uri'], and that is where it fails.

liam morland’s picture

Version: 3.0.0-alpha2 » 3.x-dev
Status: Reviewed & tested by the community » Fixed

This issue appears to have been fixed in #12. @yvalentin if you are still having a problem, I suggest you open a child issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rbrownell’s picture

Assigned: jdmoreno » Unassigned

Status: Fixed » Closed (fixed)

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