Problem/Motivation

In some projects, clients upload self-contained mini web embeds or flipping books into the Drupal files folder. These bundles contain static assets (HTML, CSS, JavaScript, etc.) that are transparent to Drupal — Drupal has no entity representation of them. The only connection to Drupal is a link, manually inserted into content, pointing to the embedded mini-site.

In these cases, Entity Mesh reports those links as broken internal links. They are internal because they share the same domain as the Drupal site, but there is no file entity associated with the target. As a result, valid links are flagged as broken, which is misleading for editors and erodes trust in the report.

Steps to reproduce

  1. Upload a static mini-site (e.g. an HTML flipbook) into the Drupal files directory, outside of any managed file entity.
  2. Create content with a manual link pointing to that mini-site (same domain as the Drupal site).
  3. Run Entity Mesh link analysis.
  4. Observed: the link is reported as a broken internal link.
  5. Expected: the link is recognized as valid because the target file physically exists.

Proposed resolution

Entity Mesh should detect this scenario and, instead of relying solely on the existence of a file entity, verify that the file the link points to actually exists in the filesystem.

This check must account for the fact that the Drupal files folder may reside in:

  • The local filesystem (same server as Drupal), or
  • An external object storage service such as Amazon S3 (AWS).

The existence check should therefore go through Drupal's stream wrappers / file system abstraction rather than assuming a local path, so it works regardless of where the files are stored.

Remaining tasks

  • Confirm the desired behavior: treat as valid when the file exists, or introduce a distinct status (e.g. "unmanaged file – exists") vs. broken.
  • Define how to resolve a public URL back to a file path across stream wrappers (local and remote/S3).
  • Implement the existence check.
  • Add tests covering local filesystem and remote (S3) storage.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lpeidro created an issue. See original summary.

lpeidro’s picture

Status: Active » Needs review

The implementation is ready to valide to include in the next release.

eduardo morales alberti’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new117.86 KB
new117.16 KB

Review and testes, fixed!
Before:
Before
After check unmanaged:
After unmanaged

eduardo morales alberti’s picture

Solving cspell

eduardo morales alberti’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.