Skip to content

Code Reference Links Require Trailing Slash for Link to not be Broken #1793

Open

Description

Issue Description

There is an inconsistency in URL behavior on the WordPress Developer Docs site where certain links in the Code Reference section require a trailing slash to function correctly. Links without a trailing slash result in a "Page Not Found" error.

URL of the Page with the Issue

Example of an affected link:

Doesn’t work: https://developer.wordpress.org/reference/files/wp-includes/class-wp-user-meta-session-tokens.php
Image

Works correctly: https://developer.wordpress.org/reference/files/wp-includes/class-wp-user-meta-session-tokens.php/
Image

This issue appears to affect multiple links in the Code Reference section of the documentation.

Section of Page with the issue

The problem is present across various links within the Code Reference section of the WordPress Developer Docs. It specifically impacts links that reference .php files, requiring a trailing slash for the correct display of the page.

Why is this a problem?

Users navigating the Developer Docs may encounter errors due to this inconsistency, as the lack of a trailing slash results in broken links. This can be confusing and disrupts the user experience when searching for information in the Code Reference.

Suggested Fix

Adjust the URLs in the Code Reference section to ensure they work correctly without requiring a trailing slash, or ensure consistency across the site by standardizing URL formatting to include the trailing slash for relevant links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions