I have created an image field and set it to Remote Stream Wrapper under Form Display. Allowed numbers of values is set to unlimited but doesn't matter if set to 1. This field is not a required field. When this field is left empty while editing or adding content, I get the error message "The website encountered an unexpected error. Please try again later."

Also, editing nodes with multi-values become impossible as an empty item is added to the end of the list automatically.

Comments

reference created an issue. See original summary.

sergiu stici’s picture

StatusFileSize
new1.31 KB

I corrected the error, here is the patch.

sergiu stici’s picture

Status: Active » Needs review
legolasbo’s picture

StatusFileSize
new673 bytes

I've made the patch a bit more readable. Can you verify that it still solves your issue?

legolasbo’s picture

Issue tags: -field, -empty, -crash
StatusFileSize
new1.23 KB

This patch demonstrates the issue in the form of a failing test.

legolasbo’s picture

StatusFileSize
new1.89 KB

And this adds the fix from #4.

The last submitted patch, 5: 3043148-5-test-only.patch, failed testing. View results

Edwin Knol’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed, Looks good to me.
You could at the empty field to the test to make it more clear what your testing.

  • legolasbo committed 8defbcd on 8.x-1.x
    Issue #3043148 by legolasbo, Sergiu Stici, Edwin Knol: Site crashes when...
legolasbo’s picture

Status: Reviewed & tested by the community » Fixed

Empty field added and committed and pushed to 8.x-1.x. Thanks for reporting this and reviewing the patch!

Status: Fixed » Closed (fixed)

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