I'm using entity translation with the option "Hide shared elements on translation forms" active for a content type.

If I create a node and schedule a publish date, the publishing date get lost after translating the node.

How to reproduce:
1. Create a node type with entity translation and scheduler activated.
2. Use the date only setting and date popup.
3. Under /admin/config/regional/entity_translation activate "Hide shared elements on translation forms" option for the new content type.
4. Add a node and schedule a publishing date.
5. Translate the node via entity translation.
Now the publishing date is gone.

Edit: Updated reproduction steps.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

J-Lee created an issue. See original summary.

jonathan1055’s picture

Hi J-Lee,

I've just downloaded the latest dev of Entity Translation and on the settings page I do not see anything about hidden fields (see attached screenshot). What else is needed to show this option?

Scheduler implements hook_i18n_sync_options() and hook_field_attach_prepare_translation_alter() - do you know if this is where the entity translation information is triggered from?

J-Lee’s picture

Issue summary: View changes
FileSize
61.25 KB
25.68 KB

Hi jonathan,

following a screenshot from the ET settings page.
Only local images are allowed.

You can choose "Content" and your content type at the bottom of the page and enable the option.
et

Entity translation use a #language key for field translations. I think this key is used to hide or display fields

I forgot to mentioned, that I'm using the date only format and the date popup. (Summary updated)

I'm tried to debug the issue and found, that the source language has the right date format (Y-m-d), but the translation uses the Y-m-d H:i:s format. This returns false for _scheduler_strtotime at scheduler.module, because the check at line 298 failed.

I think, this happened because the translated content did not load the date popup.

jonathan1055’s picture

The options I get are slightly different from yours. I have an extra option 'Show fallback statuses on overview page' [edit: I have realised this is hidden when 'enable fallback' is unchecked, so that explains that]. In my list ofentity types I have 'comment' and 'node' which you do not have, but you have 'content', 'field collection' and 'file' which I do not have. If I choose 'node' I do not get anything at the bottom of the page, like your second image. But if I pick 'taxonomy term' or 'user' I do get those fields, in vertical tabs.

I am using the latest dev release 7.x-1.0-beta4+10-dev from 16th Aug 2015. What version are you using?

Jonathan ET settings

J-Lee’s picture

Status: Active » Closed (outdated)

Sorry for my late reply.
I have updated all modules (and core) to the latest stable releases and it looks like, that it is working.

I'll closing it as outdated.

jonathan1055’s picture

OK no problem. Good to hear it is working for you.
Thank you for closing and helping to keep our issue list tidy.
Jonathan