- Issue created by @florianmuellerch
I'm facing the same problem. Since we are using the content moderation workflow, I need to activate the
Hide non translatable fields
option. Any ideas on how we can solve this issue?- π¨πSwitzerland florianmuellerch Aarau, Switzerland
@InaW I didn't find a solution to this particular problem yet. Instead I decided that editors on our platform actually probably want asynchronous translations, that's why I enabled translation on the paragraphs field instead, despite being unsupported. However in your particular case, there's no solution for that and I think there should be.
- Merge request !145#3397222 signal to content_translation that this field should be treated as multilingual β (Open) created by InaW
- last update
about 1 year ago 55 pass - Status changed to Needs review
about 1 year ago 3:40pm 20 November 2023 I had a look at the paragraphs widget implementation and they solved this issue like this:
public function form(FieldItemListInterface $items, array &$form, FormStateInterface $form_state, $get_delta = NULL) { $elements = parent::form($items, $form, $form_state, $get_delta); // Signal to content_translation that this field should be treated as // multilingual and not be hidden, see // \Drupal\content_translation\ContentTranslationHandler::entityFormSharedElements(). $elements['#multilingual'] = TRUE; return $elements; }
I have adopted the solution to Layout Paragraphs and created a Merge Request MR!145.
This solves the problem for me and the widget is now displayed in the Translation when I have "Hide non translatable fields on translation forms" enabled.- π¨πSwitzerland florianmuellerch Aarau, Switzerland
@InaW sounds promising!
When I tried something similar, I ran into issues when I saved the node - Drupal threw an error that "untranslatable fields cannot be changed and must be changed on the original language" or something similar... Did you test that solution? Works fine? @florianmuellerCH yes I did some testing, and the Patch works well for me so far. I can update the content of the paragraphs in the translated node and save them afterward without any issues.
I'm using for testing Layout Paragraphs 2.0.3 with Paragraphs 1.16.0 and Drupal Core 10.1.6
- last update
about 1 year ago 55 pass - πΊπΈUnited States patpluspun
The snippet in #5 worked for me. I'm attaching it as a patch for the convenience of others that may need it until the MR can get merged. Thanks @InaW
- First commit to issue fork.
- Merge request !161#3397222 Make field multilingual and update builder.js for tests. β (Merged) created by sethhill
- last update
9 months ago 55 pass - πΊπΈUnited States sethhill
@justin2pin This looked good, although I discovered that FunctionalJavascript tests were failing with the latest 2.0.x code.
- Status changed to Fixed
9 months ago 9:25pm 21 April 2024 -
justin2pin β
committed 9fb45378 on 2.0.x authored by
sethhill β
#3397222 Make field multilingual and update builder.js for tests.
-
justin2pin β
committed 9fb45378 on 2.0.x authored by
sethhill β
Automatically closed - issue fixed for 2 weeks with no activity.