Steps to produce issue before enabling the module.
1. Install devel module.
2. Translate a node (having entity/term reference field) in few available languages in the site.
- suppose node is 100.
3. Select a taxonomy term ( suppose tid is 1111)
4. Save and publish the node.
5. Do the same for its translations( Select the term, publish and save)
6. Go to pages /[Language-code]/devel/node/100 (Example - /en/devel/node/100)
7. On the devel page expand the accordion reading as VARIABLE
8. Browser search (CTRL+F) the term id 1111.
9. Now go to the term edit page /en/taxonomy/term/17341/edit and click on the delete link to delete it.
10. Repeat step 6 to 8.
11. The term id is still showing up in the variables.
Enable the module Entity Reference Purger , Check the box Remove orphaned entity references under ENTITY REFERENCE PURGER at field configuration page /en/admin/structure/types/manage/[CONTENT-TYPE]/fields/[FIELD_MACHINE_NAME]
- Repeat above steps after enabling the module , configuring field and deleting the term .
Result: The translations are still having the term reference in the database.
Solution:
Apply the patch , clear cache and verify the same with above steps.