UPDATE: The issue is migrated from Entity Translation queue.
For an entity-translated node, we have publication statuses for the entire node ('node.status' db field - "Boolean indicating whether the node is published (visible to non-administrators)"), and for each translation ('entity_translation.status' - "Boolean indicating whether the translation is published (visible to non-administrators)").
While 'node.status' does indeed control node visibility to non-administrators, 'entity_translation.status' does not seem to work (all translations are visible for 'node.status'=1 and invisible for 'node.status'=1, regardless of the 'entity_translation.status' value).
Comment | File | Size | Author |
---|---|---|---|
#6 | et_weight.patch | 921 bytes | OnkelTem |
Comments
Comment #1
plachPlease, confirm this still exists in the latest dev.
Comment #2
GN CreditAttribution: GN commentedTesting with version = "7.x-1.0-beta2+7-dev" of 2012-Dec-20
Yes, this behavior still exists:
visibility for non-administrators is controlled by the node publishing status ('node.status'), and does not depend on the translation publishing status (all translations are visible for 'node.status'=1 and invisible for 'node.status'=0, regardless of their 'entity_translation.status' values).
Comment #3
csedax90 CreditAttribution: csedax90 commentedIt's the same in the latest dev versione... please fix it because is very problematic
Comment #4
plachI just tried a clean installation of D7 + the latest dev. I have a published english node with an unpublished italian translation. The anonymous user can only see the english values both on node/1 and on it/node/1.
To fix this I need a more detailed explation of what the expected behavior is wrt the actual behavior. And most importantly the exact steps to reproduce the issue starting from a clean D7 installation and possibly installing additional modules (specify their versions!).
Comment #5
FiNeX CreditAttribution: FiNeX commented@plach: maybe a dup of #2155529: Enabling Title Broke Entity Translation "This translation is published" feature ?
Comment #6
OnkelTem CreditAttribution: OnkelTem commentedI found the reason why this may happen and it seems to be reproducible. Moving the issue to Title queue.
Prerequisites:
* Install Entity Translation module. Enable translation for a node type.
* Install Title module and enable title replacement for that node type.
* Create a node of that type, add a translation and make it unpublished.
What happens:
Unpublished translation is displayed when visiting node page on language different then original.
Correct behavior:
Original version should be displayed.
And this is what happens:
1. Title module changes implementations order and places itself to the top of implementations list in
title_module_implements_alter()
.2. Now when an entity is loaded and
entity_load
hook is triggered, title module takes the lead BEFORE entity_translation loads translations to the entity3. Title module calls
title_field_sync_get()
which callsfield_language()
:For comfortable viewing use this gist instead.
4. Now when the node is viewed and
field_langauge()
is called again (fromfield_attach_prepare_view()
), it returns wrong language data.I'm not sure about the proper fix, but I think that Title module's entity_load hook should be triggered AFTER Entity Translation's hook.
Possible patch is provided.
Comment #7
OnkelTem CreditAttribution: OnkelTem commentedComment #8
alcroito CreditAttribution: alcroito commentedThis might be a duplicate of #2085457: Wrong cache is initialized in field_language() ? That patch clears the field_language cache that is populated by the title field, so then it should show the correct language data?
Comment #9
pifagorComment #10
pifagorComment #12
pifagor