I've tested this on a clean site having added a new language, switching both the user language and the site default language, and can't reproduce the issue. This may have been resolved since the issue was posted. If not please let me know.
- Status changed to Active
over 1 year ago 10:44am 17 February 2023 Can you please provide more detail so we can reproduce it? Possibly include screenshots and the webform source YAML if you can. I have done what you have described in the initial issue, with English and French, and it has not had an issue.
- 🇯🇴Jordan Anas_maw
Could you please try it in the Arabic language? which is right to left language.
- 🇭🇺Hungary gabor.szabolcs
Hello,
I have the same issue. I have a multilangual site with a webform. In the base language the webform field works fine, but when I translate the form the webform the element disappears.Steps to reproduce:
- Create an empty Drupal 9
- Install webform_workflows_element and the dependencies
- Enable multilingual and a secound language
- Create a workflow and translate it
- Create a webform with the webform_workflows_element element and link the previously created workflow
- Create a translation for the webform
- Create a submission in each language
After these steps in the original language the init state value will be set in the result page, but the translation stays blank.
- 🇷🇸Serbia botanic_spark
I have took a quick look and it seams that when on another language
$webform->getElementsOriginalDecoded()
will return only translations in the elements array, and the condition for finding workflow_element will never work.Part where elements are gathered:
public function getWorkflowElementsForWebform(WebformInterface $webform): array { $elements = $webform->getElementsOriginalDecoded(); return $this->filterWorkflowElements($elements); }
protected function filterWorkflowElements(array $elements): array { $filtered = []; foreach (Element::children($elements) as $key) { $element = $elements[$key]; if (isset($element['#type']) && $element['#type'] == 'webform_workflows_element') { $filtered[$key] = $element; } $filtered += $this->filterWorkflowElements($element); } return $filtered; }
I am not sure if this has additional implications, but if using
$webform->getElementsDecoded()
instead of$webform->getElementsOriginalDecoded()
I get full element structure, so further conditions are working properly. - Status changed to Needs review
about 1 year ago 11:21am 18 August 2023 - Merge request !173274532: make the solution for showing the workflow for multilanguage site. → (Merged) created by nick.murza
- 🇲🇩Moldova nick.murza Moldova
Hmm, so big diff between 1.0.x and 1.0.0 alpha3, this is why cannot apply the patch.
- Status changed to Fixed
about 2 months ago 7:11pm 24 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.