Problem/Motivation
After latest updates, the off-canvas dialog turns empty for all nested paragraphs
Steps to reproduce
Create a content type with a paragraph field. Add a paragraph that has a paragraph field with 3+ paragraphs added. Enable off-canvas modal dialog. When trying to enter content you will see that the nested paragraph will show an empty off-canvas dialog after clicking '...' button.
Proposed resolution
This is a problem of both JS and PHP code. In JS, the source dialog is being incorrectly determined since the markup, namely the data-drupal-selector now has a more extended form for nested paragraphs. In PHP, the request endpoint now includes incorrect entity type, bundle and form mode, so the AJAX request returns empty markup for the dialog.
I am attaching a proposed patch in the next comment.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | paragraphs_ee-off-canvas-nested-empty-dialog-fix-3162380-2-8.x.patch | 3.4 KB | perelesnyk |
Comments
Comment #2
perelesnyk commentedHere's the patch
Comment #3
stborchertI've tested the patch using the latest development version and the off-canvas dialog is still empty in nested paragraphs. Could you please have another look at the problem?
Comment #5
stborchertThanks for your initial work. I've fixed this unintentionally by working on #3180225: Modal dialog is shown repeatedly on close with nested paragraphs :)