Clean URLs do not work

Created on 2 October 2024, 7 months ago

Problem/Motivation

We are running Drupal with clean URLs and aliased paths. For example, we have a node with:

  • ID=2
  • title 'About Us'
  • URL alias /about-us
  • Spanish language translation, the title is 'Sobre Nosotros'
  • URL alias /es/sobre-nosotros

If you are on the English version of the page, the Advanced Language Selector has the spanish URL as /es/about-us - which is invalid. If you are on the Spanish version of the page, the english path is /sobre-nosotros - which is also invalid.

The ALS also struggles with the home page. If you are on the home page (route = ), the ALS has the English URL as /home and the spanish URL as /es/home. Why /home? Because we set our home page to node 14, which has the title 'Home' and the alias /home.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

1.4

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States JasonSafro

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

Comments & Activities

  • Issue created by @JasonSafro
  • ๐Ÿ‡ช๐Ÿ‡ธSpain xurdep Gijรณn

    Working to fix it asap.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain xurdep Gijรณn

    Added suport for clean urls on entities and fixed thsi issue

  • ๐Ÿ‡ช๐Ÿ‡ธSpain xurdep Gijรณn
  • Assigned to xurdep
  • Status changed to Fixed 2 months ago
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine pingwin4eg Zaporizhia ๐Ÿ‡บ๐Ÿ‡ฆ

    The problem still exists in 1.5.0.

    The node doesn't have a translation yet, and the language link leads to /fr/en-path for example, which doesn't exist, so the page shows 404. And on this 404 page the language switcher links are /system/404 and /fr/system/404.

    Please do the same as the default language switcher - instead of /fr/en-path links display /fr/node/NID (where nid is the same for all translations). That page still shows untranslated node with translated interface, but at least it's not 404.

Production build 0.71.5 2024