Skip to content
Snippets Groups Projects

#3359174: Form state errors break nested layout paragraphs dialog

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -373,7 +373,7 @@ abstract class ComponentFormBase extends FormBase implements ComponentFormInterf
* The form element.
*/
public function afterBuild(array $element, FormStateInterface $form_state) {
$parents = array_merge($element['#parents'], [$this->getFormId()]);
$parents = array_merge($element['#parents'], [$this->getFormId(), $element['#paragraph']->bundle()]);
$unprocessed_id = 'edit-' . implode('-', $parents);
$element['#attributes']['data-drupal-selector'] = Html::getId($unprocessed_id);
$element['#dialog_id'] = $unprocessed_id . '-dialog';
Loading