Allow disabling internal domain detection

Created on 30 July 2025, 4 days ago

Problem/Motivation

The entity_mesh module currently assumes that all URLs on the same domain are internal.
However, in some cases where Drupal is hosted in a subfolder (e.g., https://www.example.com/subfolder),
the module incorrectly treats valid internal routes as broken links because it doesn't account for the subfolder.

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

Introduce a configuration setting that allows site administrators to disable same-domain internal link detection.
When disabled, all URLs will be treated as external unless explicitly marked otherwise.

Remaining tasks

  • Add a config setting to toggle internal domain detection.
  • Update link detection logic to respect the setting.
  • Write tests to verify this behavior.

User interface changes

A checkbox in the entity_mesh settings form to enable/disable internal domain detection.

API changes

None.

Data model changes

None.

Feature request
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

Merge Requests

Comments & Activities

Production build 0.71.5 2024