Support subfolder-based installations for internal route detection

Created on 30 July 2025, 4 days ago

Problem/Motivation

The entity_mesh module fails to correctly detect internal routes in Drupal installations
that are hosted in subfolders. As a result, valid routes (e.g., /article accessed via
https://localhost/subfolder/article) are marked as broken.

Steps to reproduce

  1. Install Drupal in a subfolder (e.g., /subfolder).
  2. Enable entity_mesh.
  3. Add a valid internal route, such as https://localhost/subfolder/home on a content.
  4. Access to the entity mesh report /admin/reports/entity-mesh/table.
  5. Observe that it is incorrectly flagged as a broken link.

Proposed resolution

Enhance the internal route detection logic to account for Drupal installations in subfolders.
This should parse the base_path() of the site and prepend it to internal paths before comparison.

Remaining tasks

  • Detect the subfolder base path using Drupal's request context or settings.
  • Normalize internal paths before validating them.
  • Add functional and kernel tests to cover subfolder installations.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇪🇸Spain eduardo morales alberti Spain, 🇪🇺

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

Comments & Activities

Production build 0.71.5 2024