Block visibility group does not handle well multilingual site paths

Created on 10 September 2018, over 6 years ago
Updated 27 February 2023, almost 2 years ago

Problem/Motivation

Hi, I have a set of blocks which should be displayed on a node page in two different languages,

I have set the path conditions on two paths : /node-path-fr and /node-path-en.

Those two paths can be accessed at those paths: /fr/node-path-fr and /en/node-path-en.

The problem is: it looks like the block visibility group tries to display its blocks if I load /node-path-fr and /node-path-en without the language prefix, resulting in some blocks to be displayed or triggering ResourceNotFoundException :

Symfony\Component\Routing\Exception\ResourceNotFoundException: No routes found for "/node-path-en". in Drupal\Core\Routing\Router->matchRequest() (line 125 of core/lib/Drupal/Core/Routing/Router.php).

Additionally:
- The block visibility group works fine if the language prefix is present in the URL.
- The block visibility group does not work correctly if I add the language prefix directly in the path condition: there is no block displayed at all.

I could have used the /node/[id] form, but on the web site I am currently working on, this is not possible due to id mismatch for the same content (same uuid) between my environments.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France dakwamine

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024