Contextual filter not working with path alias

Created on 24 May 2025, 6 days ago

Problem/Motivation

I have a views list of names. The listing is filtered by an alphabetical glossary attached to the view. Default language of the site is French but available in both French and English. The view is accessed in the url "/noms". I added an alias through admin/config/search/path so the English page is accessed at "/en/names".

Everything works fine and filtering is executed as expected in both languages if Ajax is disabled.

If Ajax is enabled, only the French (default language) works. The English aliased page is no more filtering. When I pass the mouse over the glossary letters display correctly, for example: "noms/d" and "/en/names/d"

If I manually enter the aliased url with a contextual filter (i.e. /en/names/d), of course it works as this way it doesn't call ajax.

No errors appear in browser's dev console nor in Drupal's dblog report.

Steps to reproduce

Configure site as multilingual with French as default and English as additional language
Create some pages (simple nodes with a title)
Create a Views page listing the titles of the nodes created above. Set a contextual filter to filter by Content:title. Set it's path to '/noms'
Create an attachment listing the titles. Add contextual filter "content: title" and set "When the filter value is NOT available" to "Display a summary" and in "More" set "Glossary mode" and "Character limit" to 1. Finally attach the attachment to the previous page.

Go to "admin/config/search/path" and add alias: English, system path '/noms', url alias '/names'

Visit '/noms' and '/en/names' to verify that everything works. Click on glossary letters and also enter manually some filters, like: '/noms/b' and '/en/noms/b'

In Views page, set Use Ajax to Yes. Visit again the pages in French and English. French pages work as expected. On English pages, manually entering '/en/noms/b' works but clicking on the glossary letters has no effect even if the ajax spinner turns.

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.5

Component

views.module

Created by

🇫🇷France erwangel

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

Comments & Activities

  • Issue created by @erwangel
  • 🇳🇿New Zealand quietone

    If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies . Also mentioned on the version section of the list of issue fields documentation.

  • 🇫🇷France erwangel

    Indeed, I'm using the latest 10 stable version (10.4.7). I changed the version in issue's settings.

  • 🇳🇿New Zealand quietone

    @erwangel, that is not how Drupal core uses the version field. The version where the problem was found should be in the issue summary. And any MR should be against 11.x not 10.4.x, which is in maintenance mode. More people will see this issue if it is on 11.x, so there is greater change it will be worked on. As a release manager it is also one of my tasks to keep issue meta data up to date.

Production build 0.71.5 2024