Redirects that come to the site end up in 404

Migrated issue

Reported by: fjgarlin

Related to !33 (merged)

Problem/Motivation

URLs where a specific version is present as the last path segment are redirecting to a page that appends (not replaces) `11.x` as the last path segment. Which results in a 404 because there are 2 versions in the path.

For example, this URL:

https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Utility%21Unicode.php/function/Unicode%3A%3Astrlen/8.5.x

Redirects to an 11.x search page, with the following message:

Sorry, api/drupal/core%21lib%21Drupal%21Component%21Utility%21Unicode.php/function/Unicode%3A%3Astrlen/8.5.x/11.x cannot be found.

(Notice the “8.5.x/11.x” at the end of the url in the message.)

Proposed resolution

Figure out the object and look for that in the latest or closest (if possible) version.

Related issue: Issue #3444958

Related issue: Issue #3342815

Edited Feb 19, 2026 by drupalbot
Assignee Loading
Time tracking Loading