Set my paragraph to use the Select2 formatter and it had some JS errors. Resolved it by checking for the value's existence before attempting to use it. I don't know if this is the best approach, but it resolved the error for me and the Select2 widget works again. Patch below.

Comments

PaulDinelle created an issue. See original summary.

PaulDinelle’s picture

First patch to resolve the error.

deaom’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new2.08 KB
new1.56 KB

I also came across this issue, which is breaking the widget display. Tested the patch and the issue is gone.
Before
The errors in the console and the display is back to normal.
After

dercheffe’s picture

Title: Edit form widget breaks on Paragraphs » Edit form widget breaks after update to Version 1.5
Version: 8.x-1.x-dev » 8.x-1.5
Priority: Normal » Major

I can confirm same error on node edit forms after update to select2 version 1.5 even not using paragraphs. The error occurs on a normal node edit form.

The good news are that the provided patch applied to version 1.5 fixing the error also. Thank you for patching :)

IMO this is a major issue because it's breaking the module and makes it (nearly) useless. Please make a new release.

arnaldop’s picture

This patch (#3) works for me!
Thanks!

gbirch’s picture

Works for me too.

chr.fritsch’s picture

Opened a PR and added a test for that https://github.com/thunder/select2/pull/78

chr.fritsch’s picture

  • chr.fritsch authored cc4aeb9 on 8.x-1.x
    Issue #3096293 by PaulDinelle, DeaOm: Edit form widget breaks after...
chr.fritsch’s picture

Status: Reviewed & tested by the community » Fixed

All the tests were green. PR merged. Thank you everyone

Status: Fixed » Closed (fixed)

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