If you try to create content without configuring the module (which may happen in local environments), you will see the following warning after clicking Save:

Warning: array_filter() expects parameter 1 to be array, string given in Drupal\applenews\Plugin\Field\FieldWidget\Applenews->massageFormValues() (line 300 of modules/contrib/applenews/src/Plugin/Field/FieldWidget/Applenews.php).

Comments

juampynr created an issue. See original summary.

juampynr’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new20.83 KB
new1.46 KB

Here is a patch that fixes the issue. Instead of showing an incomplete Apple news form, it shows the following message:

By not rendering the Apple news form, the warning is gone.

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

+1

  • vijaycs85 committed c43ccbb on 8.x-1.x authored by juampynr
    Issue #3016492 by juampynr: Fix warning when there are no configured...
vijaycs85’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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