Skip to content
Snippets Groups Projects
user avatar
Project-Update-bot authored
78ac7e08
History
user avatar 78ac7e08

CONTENTS OF THIS FILE

  • Introduction
  • Requirements
  • Installation
  • Configuration
  • Maintainers

INTRODUCTION

Entity Reference Purger removes orphaned (dangling) entity references when an entity is deleted.

REQUIREMENTS

This module requires no modules outside of Drupal core.

INSTALLATION

CONFIGURATION

For config fields (fields added via Manage fields UI):

  • Go to an entity reference field settings, for example: '/admin/structure/types/manage/article/fields/node.article.field_tags' and check the 'Remove orphaned entity references' checkbox.
  • If you have a lot of dangling references you might want to also enable the 'Use queue' option for performance reasons.

For base fields:

  • Add the following code to your base field definition:
->setSetting('entity_reference_purger', [
  'remove_orphaned' => TRUE,
  'use_queue' => FALSE,
]);

MAINTAINERS

Current maintainers:

This project has been sponsored by: