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.

Comments

perelesnyk created an issue. See original summary.

perelesnyk’s picture

stborchert’s picture

Status: Active » Needs work

I'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?

  • 5c1f1d8 committed on 8.x-1.x
    Issue #3162380 by perelesnyk: Off-canvas modal dialog empty for nested...
stborchert’s picture

Status: Needs work » Fixed

Thanks for your initial work. I've fixed this unintentionally by working on #3180225: Modal dialog is shown repeatedly on close with nested paragraphs :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.