In entity_translation_get_handler() there's a static cache on entity ID. When both the 'current' node and a specific revision are loaded in the same request, it treats them the same. Patch just keys by vid as well.

Comments

catch’s picture

Status: Active » Needs review
catch’s picture

StatusFileSize
new1.64 KB

This time with the patch.

plach’s picture

This totally makes sense, however it will probably conflict with #1865244: Allow multiple translation handlers on the same form, which I am planning to commit soon. Would you mind to wait for that one and then reroll?

plach’s picture

plach’s picture

ping?

plach’s picture

Status: Needs review » Fixed

OK, I've been using #4 for a while and didn't notice any issue with it.

Committed and pushed.

Feel free to reopen if it does not fixes the originally reported issue.

catch’s picture

Sorry I didn't get back on this. Patch looks fine but I switched project a bit so haven't actually tested it... If I get an opportunity to I will though.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit b8ecf0c on 7.x-1.x, revisions authored by catch, committed by plach:
    Issue #2065221 by catch, plach: Fixed Static cache for handlers should...

  • Commit b8ecf0c on 7.x-1.x, revisions, workbench authored by catch, committed by plach:
    Issue #2065221 by catch, plach: Fixed Static cache for handlers should...
colan’s picture

stefanos.petrakis’s picture

Hi @colan, there is an update and some thoughts here #2557429-24: Make workbench_moderation_node_edit_page_override() work with Entity Translation, would be cool if you have any feedback to share.