Link contains language prefix regardless the configured language detection

Created on 17 September 2024, 4 months ago

Problem/Motivation

We use "content language" method to detect the the language of content. It uses no language prefix in the path of a node. The link created in a paragraph when searching for a node always contains a language prefix at the beginning. All links created with that method don't work on our System. All other detection methods should work.

Steps to reproduce

Use "content language" as content detection method. Add a paragraph block and create a link. Search for existing nodes and use one of the nodes in the dropdown. The created link contains a language prefix.

Proposed resolution

The code in the SearchController contains a todo to use a different way to generate the urls. I think $node->toUrl()->toString() should work for all detection methods. Attached patch should fix it.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024