Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Since Paragraphs 8.x-1.12 the popup to add a new paragraph is shown twice.
Used versions:
- paragraphs_ee: 8.x-1.6
- paragraphs_features: 8.x-1.9
- paragraphs: 8.x-1.12
Problem is occurring since #3109571: Hide "Add above" when switching to the behavior tab was committed to paragraphs. Downgrading paragraphs to 8.x-1.11 makes the popup close normally.
Comment | File | Size | Author |
---|---|---|---|
#5 | 3153820-5.patch | 701 bytes | JeroenT |
#4 | 3153820-4.patch | 3.98 KB | JeroenT |
popup_shown_twice.gif | 535.75 KB | JeroenT |
Comments
Comment #2
stBorchertNothing but problems :) ... I try to look into this today.
Thanks for the gif!
Comment #3
stBorchertSeems like a larger problem ... the dialog changes by Paragraphs EE are applied to the add-wrapper and a sub-element so there are two dialog definitions now :/
Comment #4
JeroenTThe "paragraphs-add-dialog" class was added multiple times since the add_more element was converted to a container. It was added to the add_more element and the template "paragraphs_add_dialog__categorized". Patch attached removes the attributes element from the template so the class is only added once and the popup will again work as expected.
Comment #5
JeroenTA smaller change that also fixes the problem.
Comment #6
stBorchertgoogle: "how to give 100 issue credits in one commit?" 😉
I'm on vacation right now, but I will test this on monday. If this really works you are my hero. I've looked at the code for several hours and couldnt find a solution.
Comment #7
rgpublicI'd give PHP_INT_MAX credits. Hahaha. #5 is nothing but *genius*. A single line. I can't believe it. I also tried to solve this and got lost down a rabbit hole. Thumbs up - works for me!
Comment #8
stBorchertJeroen, if we ever meet in person please remind me of this and I'll buy you a drink. Or two ... :)
Comment #11
rgpublicUnfortunately, despite the genius fix by JeroenT, sth. still doesn't seem quite right with the closing of the modal popup when using nested paragraphs. Whenever I have nested paragraphs and I click on "Add Paragraph" on the outer-most paragraph and close that dialog, I get consecutively the modal dialogs of all the sub paragraphs - one by one. Anyone else seeing that problem?