Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Broken entity reference finder

No security coverage Maintenance fixes only 47 sites

This module helps identify broken entity references on your Drupal site. It scans for situations where an entity is referencing another entity that no longer exists, which can cause unexpected errors and prevent pages from loading. The report shows you which entities are pointing to missing content, allowing you to investigate and fix these issues.

Find the existing broken entity references to improve quality.

Ever had a situation where removing entity suddenly prevents unexpected pages to load?

Maybe your site now throws error like this

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getCacheTags() on null in Drupal\views\Plugin\views\query\Sql->getCacheTags() (line 1677 of core/modules/views/src/Plugin/views/query/Sql.php).

Many cases, this is result of some other entity referencing to the entity that just got deleted.

This module offers you quick way to check whether you have such broken references laying around.

Note: This module does not fix those entities, but allows you to research if you are in need of some hook_ENTITY_delete or hook_ENTITY_TYPE_delete implementations (or the existing ones need some more attention). Also note that this module reveals only the broken references that already exists, not the ones that are yet to come.

For each entity type there should be implementation of such hook, which either removes the referencing entity or cleans up the references. Note that even if you are certain that the entity (of some type) never gets deleted, be prepared for that one case where it needs to be.

How to use:

  • Install this module
  • Head to Reports -> Broken entity references (or just admin/config/development/broken_reference)
  • You'll see quick report here already
  • Press the "Build report" to get full listing
  • Tell your employer that each represented line might cause sudden page crash at some point

In the report target entities are the entities that does not appear in the system anymore, source entities are the ones that still has reference to those target entities. If numbers does not match, it means that one source entity is referencing to multiple removed target entities in the same field.

Drupal 8–11

Ask your assistant about Broken entity reference finder

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jun 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.5 Stable 8–11 Apr 8, 2024
1.0.4 Stable 8–11 Mar 18, 2024
1.0.3 Stable 8–10 Aug 23, 2023
1.0.2 Stable 8–10 Jun 14, 2023