After update to Drupal 10.4+ Module not recognizing '%' wildcard and produces incorrect URL

Created on 20 February 2025, 6 months ago

Problem/Motivation

After upgrading to Drupal 10.4+ view mode page patterns are not recognizing the '%' wildcard win the pattern

  • URL for view mode page pattern replaces '%' with '%25' instead of the correct content type

Tried both '%' and '/%' as the wildcard both create unwanted results, the first causes the '%' to become '%25' the second causes incorrect strings and duplicate parameters to be added to the url string resulting in page not found issues

Steps to reproduce, update core from 10.3+ to 10.4+ , anywhere view_mode pattern is being used with a wildcard in place link is now broken and showing a '%25' in place of where the wildcard should be dynamically replaced.

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jbowm2

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

Comments & Activities

  • Issue created by @jbowm2
  • πŸ‡ΊπŸ‡ΈUnited States jbowm2

    Created patch to fix this issue: the '%' wild card was looking for '/%' which was causing the issue with the incorrect URL being produced.

    changed '/%' to '%' in the code has fixed the issue.

  • πŸ‡§πŸ‡ͺBelgium stijnd Belgium

    Confirming, patch fixed the issue.

  • πŸ‡¦πŸ‡ΊAustralia nigelcunningham Geelong

    I was getting this issue when I failed to add '/' to the start of the URL. If I add the '/' and then clear caches (must be a cache tag issue there somewhere too), the menu links are correct. The cache tag issue could potentially be in my code - I'm using the menu token module too (my own update for D11).

Production build 0.71.5 2024