Editing translations wrong redirect:

This bug can be reproduced on simplytest.me as shown in the attachment. When using Seven this cannot be reproduced so it's not a Drupal Core fault.

Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gge created an issue. See original summary.

markhalliwell’s picture

Status: Active » Closed (duplicate)
Related issues: +#2901106: Multilingual dropbutton links do not contain correct language identifier
sriman’s picture

@markcarver

Even after applying the patch the issue is not resolved.

sriman’s picture

@markcarver

Issue is not resolved even after applying the patch

sriman’s picture

Applied the patch given by markcarver & removed the below if condition in the BootstrapDropdown.php it works like a charm.

if (empty($element['url']->getOption('language'))) {
     $element['url']->setOption('language', $element['language']);
}

to

$element['url']->setOption('language', $element['language']);
gge’s picture

Status: Closed (duplicate) » Active

Unfortunately I have to re-open this. Just checked 8.x-3.x-dev (released on 12 Feb 2018), the bug is still there as @sriman reported and #2901106: Multilingual dropbutton links do not contain correct language identifier didn't solve this issue. @sriman's advice works but doesn't seem to be the right solution as @markcarver commented here.

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

No one has given an explanation as to why unwrapping supposedly "works". If the language option was already set (by a module), the theme shouldn't be overriding it...

gge’s picture

I have no idea why it works.
One more thing just noticed: if that if statement is removed the behavior explained here #2939166: Clicking "edit" dropdown button navigates to incorrect content is also fixed.
Now I don't know what other problems could appear if if (empty($element['url']->getOption('language'))) is removed.

OOOps sorry! Huge mistake! Sorry!

nielsvandermolen’s picture

FileSize
742 bytes

Adding the patch of #5 for Bootstrap 3.9 currently in use in Open Social. I am not sure if this is a core issue but I have verified that the same issue does not happen on Drupal core themes.

MaskOta’s picture

Status: Postponed (maintainer needs more info) » Active

This problem still exists. Maybe the solution is not correct but the issue very much exists.

Setting to active so that the comunity is aware and maybe someone can spot the problem

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

See #7. Postponed issues are not closed issues, they show up in normal (open) issue queue lists.

leisurman’s picture

I am having the same translation wrong url issue. This patch fails to apply using Composer. https://www.drupal.org/project/bootstrap/issues/2901106#comment-12419030. The patch here on this page (#9) applies and works. https://www.drupal.org/project/bootstrap/issues/2868100#comment-12565115

Kingdutch’s picture

Status: Postponed (maintainer needs more info) » Active

I'm unable to figure out where this happens but it does appear that the language for the URL is already set somewhere and does not correspond to the link itself.

I've tested this on SImplytest.me with Bootstrap 3.19 to ensure that it's no other module or theme that's interfering. When I use Bootstrap then when I try to edit the English translation of a node from /node/*/translations while viewing this overview in a non-English language (e.g. Dutch) then I will end up editing the non-english translation. This also works the other way around.

Simply using the Seven theme for this overview does not have this problem. This suggests that this error is introduced elsewhere in Bootstrap (or not fixed in Bootstrap) but I can not find it.

markhalliwell’s picture

Status: Active » Postponed (maintainer needs more info)

Saying "I don't know" doesn't warrant a status change as no new information has been presented on why it was postponed in the first place.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Fixed

I'm going to go ahead and commit the patch from #9. I'd really like to know why this is or isn't working the way it is intended, but I've expanded the @todo to mention this issue so we can revisit this at another time.

Status: Fixed » Closed (fixed)

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