Sometimes I got a warning
Warning: Undefined array key "original_deltas" in Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::duplicateSubmit() (line 2172 of /var/www/drupal/web/modules/contrib/paragraphs/src/Plugin/Field/FieldWidget/ParagraphsWidget.php)
this small patch fixes this warning

Issue fork paragraphs-3493700

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lazzyvn created an issue. See original summary.

qusai taha’s picture

StatusFileSize
new745 bytes

Fix the duplicate paragraph issue, which isn't working and causing an error.

qusai taha’s picture

StatusFileSize
new745 bytes

Patch to fox the issue on 8.x.1.17

qusai taha’s picture

Status: Active » Needs review
tondeuse’s picture

Thank you for this, qusai taha, a tiny tiny intervention that fixed paragraph duplication in a Paragraph (stable) widget case in a nested node inside an Inline Entity form. I have been wrestling with this issue forever without being able to pinpoint the exact cause and was skeptical trying your patch.

Magic!

  • I am using Inline entity form in modal.
  • The paragraphs with duplication issues are in a Level 2 node type, nested inside the Level 1 node form.
  • I am using the Paragraphe (stable) widget with Paragraphs editor enhancement.
  • The visible symptom was an ajax error in the parent form, nothing was logged in the watchdog, except right after a cache flush.
lazzyvn’s picture

please add credit to us

carolpettirossi’s picture

Status: Needs review » Reviewed & tested by the community

Patch provided by qusai taha on #4 has solved the issue for me. I wasn't able to use Duplicate and after applying the patch the Duplicate worked well.