Closed (fixed)
Project:
Translatable menu link uri
Version:
8.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2017 at 09:49 UTC
Updated:
28 Jul 2018 at 19:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jsobiecki commentedOk, thanks for bug report. I'll investigate it and let you know.
Comment #3
thirstysix commentedSecond Level
Comment #4
jsobiecki commented@ThirstySix - thank you for fix proposal. Could you please re-submit it as proper patch please?
In general, I understand approach here, but I think that it can be improved by using recursive approach, instead of making duplicate code in one method.
Comment #5
jsobiecki commentedComment #6
sanci91 commentedI did a bit of refactoring, also integrating the fix in https://www.drupal.org/project/translatable_menu_link_uri/issues/2932662. Surely it could be better, but at least it uses recursion.
Comment #7
jsobiecki commented@sanci - thanks. Could you please post change in form of patch?
Comment #8
fant0m commentedComment #9
fant0m commentedComment #10
fant0m commentedComment #11
fant0m commentedComment #12
rimibhagat commentedI implemented the patch but my site stopped working and I got the following error in the Recent Log Messages
TypeError: Argument 1 passed to Drupal\Core\Entity\EntityRepository::getTranslationFromContext() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /srv/bindings/0e54cc032c4140da8242a55169a483bd/code/modules/translatable_menu_link_uri/translatable_menu_link_uri.module on line 111 in Drupal\Core\Entity\EntityRepository->getTranslationFromContext() (line 82 of /srv/bindings/0e54cc032c4140da8242a55169a483bd/code/core/lib/Drupal/Core/Entity/EntityRepository.php)
Please help I need this to work with the sub menus too
Comment #13
valentine94Comment #14
amanire commentedThe patch in #11 works for me and does not result in any errors in the watchdog log.
Comment #15
fant0m commentedCan't reproduce. Works for me!
Comment #16
piggito commentedLink override wasn't working for sublevel menus on my case too. Then by applying the patch in https://www.drupal.org/project/translatable_menu_link_uri/issues/2925482... it started working without messages on log.
Comment #17
jsobiecki commentedI see that patch doesn't apply, as there were few smaller changes. I'll do a rebase of patch, and introduce few small refactorization fixes (phpcbf).
Comment #19
jsobiecki commentedThank you for all your input, fix proposal and patch provided. As mentioned above, I slightly updated patch (made phpcs / phpmd happy) and commited it.
Comment #20
jsobiecki commentedComment #21
jsobiecki commented