When dealing with paragraph forms inside a modal I came across an issue where the ajax callbacks for "remove/edit/etc." weren't targeting the new #id that gets created for the form that exists in the modal. I have a patch that will fix this problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottalan’s picture

Title: AJAX targeting wrong id when Paragraph forms used in a modal » AJAX targeting wrong #id when Paragraph forms used in a modal
scottalan’s picture

Here's the patch.

scottalan’s picture

Uploading a patch for 7.x-1.0-beta5. Couldn't get the patch added for 7.x-1.x to apply. There was a function added to this file in 7.x-1.0-beta6 and we are still on -beta5.

scottalan’s picture

Re-rolling the patch for 7.x-1.x-dev. I left a debug statement in it.

scottalan’s picture

Status: Active » Needs review
jeroen.b’s picture

Status: Needs review » Needs work

Thanks for the fix @scottalan. However, it looks like a workaround for the actual issue.
Do you have some easy steps to reproduce?

Could you also possibly provide a test?

recrit’s picture

@scottalan: This sounds like the issue found in #2680101: Paragraphs AJAX buttons do nothing if drupal_html_id() has been called early.. Test the patch in that issue to see if it fixes what you are seeing. It removes the need for any html ids juggling.

jstoller’s picture

Status: Needs work » Closed (outdated)

In an effort to cleanup the Paragraphs issue queue I'm closing this ticket and marking it "outdated." If you find this is still a problem with the latest Paragraphs 7.x-1.x-dev release than feel free to reopen the issue.