- 🇬🇧United Kingdom danharper
I'm looking for this, if somebody can guide what the approach would be I can write a patch.
- 🇭🇺Hungary pasqualle 🇭🇺 Budapest
It should NOT be at module install, and it should only be done for enabled fields (by entity_reference_purger).
1. check the field table for missing references
2. tell entity_reference_purger that those references are deleted
3. show how many items were removed and/or how many added to a queueexample:
1. Query like this needs to be done using field and database api (for all enabled fields)" SELECT DISTINCT(field_my_media_items_target_id) FROM `node__field_my_media_items` WHERE field_my_media_items_target_id not in (select mid from media);"
2. call function
entity_reference_purger_purge_by_entity_properties('media', $entity_id)
where entity_id is a missing media id
see 📌 refactor entity_reference_purger_entity_delete() for readability Needs review - 🇬🇧United Kingdom scott_euser
Updated issue summary to reflect non-install route.
Suggesting there as well that the user selects which fields to run bulk action on.
Note that ✨ Ability to enable entity reference purger settings to every reference field that exists Active has a way to select all fields.