Problem/Motivation

There's no code in the module related to language. I'm fairly certain that this means that, especially when using the queue, it might or might not grab the expected language version of the entity. If it grabs the wrong version there will be data loss.

Steps to reproduce

Proposed resolution

Include the language in the queue record. Load that language.

Remaining tasks

Comments

dalin created an issue. See original summary.

rajiv.singh’s picture

StatusFileSize
new2.59 KB

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.

rajiv.singh’s picture

StatusFileSize
new2.59 KB
rajiv.singh’s picture

StatusFileSize
new2.59 KB

Bug fixes in previous patch

rajiv.singh’s picture

StatusFileSize
new2.56 KB

Code cleaned up of previous patch

balagan’s picture

Status: Active » Needs review