Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Keep referenced entities

Security covered Under active development 7 sites

This module prevents entities from being deleted if they are referenced by other entities. It allows you to specify which entity types and bundles should be protected, ensuring that critical entities are not accidentally removed.

Provides protecting some entities from deletion if they are used in other entities.

For example, I have entity Student which has reference to entity School.
I can delete Student because School will be School without this Student.
But If I'll delete School, Student cannot be Student.

So, the School should be protected. And this module allows doing this.

Features:

  • Protect entity from manual deletion
  • Protect entity from programatic deletion
  • Choosing types and bundles of entities which should be protected from deletion

TODO:

  • Add an option "Protect all"
  • Support handling of references through views
  • Add hook to implement custom reaction of deletion of entities programmatically
  • Add custom theme function for information about referenced entities on "confirm deletion" form



Ask your assistant about Keep referenced entities

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
2
Tracked since
Apr 2026
Latest release
5 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core PHP Release date
2.1.0-alpha1 Pre-release 10–11 Apr 13, 2026
2.1.x-dev Dev 10–11 Apr 13, 2026