Remove functionality not working when paragraphs field set to unlimited
Steps to produce
1. Install paragraphs registration module: https://www.drupal.org/project/paragraphs
2. Install multiple registration module
3. Create paragraph type and add field into registration form
4. Set unlimited items in field
5. Go to registration form and in paragraph field try to add one more item
6. Then Remove button not working.

Any idea will appreciate.
bug

Comments

keshav.k created an issue. See original summary.

keshavv’s picture

Issue summary: View changes
ysamoylenko’s picture

Issue tags: +epam-contrib-2018
ysamoylenko’s picture

Status: Active » Needs work
ysamoylenko’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB

I've created the patch for this issue. Please review it.

sosevich.v’s picture

Comment #5ysamoylenko - Pls, refactor your code so that it has no nested 'if' and 'else' statements inside 'if (!empty($field_roles) && max($field_roles) !== 0)'

ysamoylenko’s picture

Thank you for reviewing.

I've updated the patch. Please review it again.

sosevich.v’s picture

I've just checked - works for me. Thanks for prettifying the code.

maks.khotynetskyi’s picture

Status: Needs review » Reviewed & tested by the community

The patch has been tested. Works fine! Thanks!

ysamoylenko’s picture

Thank you for reviewing. The patch will be committed as soon.

  • ysamoylenko committed c604274 on 8.x-2.x
    Issue #3012221 by ysamoylenko, keshav.k, sosevich.v, Maksym_Khotynetskyi...
ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

The patch was committed.

Status: Fixed » Closed (fixed)

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

plousia’s picture

Not sure if this is the place to put this or if I should open another issue, but I'm having the same problem, with both 8.x-2.87 and 8.x-2.x-dev versions. Except, I also can't add a new item. Neither adding a new paragraph item nor removing the existing one works. The Ajax spinner just spins for a second or two and stops.

plousia’s picture

For anyone else having the same issue, disabling the Profile module seemed to fix the problem, oddly enough. I saw this issue and thought it could be related. Obviously that won't work for you if you need Profile, but this could be helpful to someone.