- Issue created by @oknate
- πΊπΈUnited States oknate Greater New York City Area
I have added a PR to expose the published field. Please review.
- π¬π§United Kingdom scott_euser
scott_euser β changed the visibility of the branch 3512340-translations-are-unpublished to hidden.
- π¬π§United Kingdom scott_euser
scott_euser β changed the visibility of the branch 2.0.x to hidden.
- π¬π§United Kingdom scott_euser
Thanks for the contribution! The most common use case (I believe) is global settings for things that appear on all pages, so having published checkbox everywhere isn't ideal as it complicates the user interface when it normally does not matter (but of course that default for translation is unpublished is proper bug).
So we have a precedent for optionally showing/hiding things in the UI like this:
So I think on top of your current MR we should ideally:
- Maintain the status quo of published being hidden - ie, update hook setting hide_published true
- Let people opt-in to managing published status - ie, new hide_published in SiteSettingsConfigForm
- Default to published for new translations if managing published status is disabled - I believe in SiteSettingEntity field status can be with ->setDefaultValue(TRUE)
Thank you!
- First commit to issue fork.
- π§πͺBelgium dieterholvoet Brussels
I don't think it's necessary to add a custom setting to control the visibility of the status field. That's what the form display UI is for. I'll change it so the field is hidden by default and can be displayed by moving it in the form display. I also changed the default value of the publishing status to TRUE.
- π§πͺBelgium dieterholvoet Brussels
I also added a custom translation handler to actually make publishing of translations work. The code is mostly based on
Drupal\node\NodeTranslationHandler
andDrupal\eck\EckTranslationHandler
. - π¬π§United Kingdom scott_euser
The reason the behaviour exists for controlling/overriding it centrally is that sites can have many many site setting types, using manage form display for each one is time consuming via the UI (yes I realise you could bulk do via config/sync/ but I think its fair to say the average site builder won't know how to do that)