Views pages have empty path prefix added for default language

Created on 31 January 2024, 10 months ago
Updated 1 March 2024, 9 months ago

Problem/Motivation

When testing πŸ› Do not process _quant403 and _quant404 if they don't exist Fixed , I found that you get routes like:

 [notice] [route_item] /articles
 [notice] [route_item] //articles
 [notice] [route_item] /es/articles
 [notice] [route_item] //node
 [notice] [route_item] /es/node
 [notice] [route_item] /recipes
 [notice] [route_item] //recipes
 [notice] [route_item] /es/recipes

when there the English path prefix is set to empty.

Steps to reproduce

  • Install/configure Drupal 9 or 10 with Umami profile
  • Install/configure quant_api module
  • Remove the path prefix at: /admin/config/regional/language/detection/url
  • Seed views pages
  • Results: logs will show routes with //
  • Expected results: no routes in logs with //

Proposed resolution

Check the prefix before using it.

Remaining tasks

  • Update code
  • Review and test
  • Commit :)

User interface changes

Logs won't show incorrect routes.

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

Production build 0.71.5 2024