Following error after saving an entity with publish to apple news selected.

TypeError: Argument 1 passed to Drupal\Core\Form\FormState::setError() must be of the type array, null given, called in /app/docroot/modules/contrib/applenews/src/Plugin/Field/FieldWidget/Applenews.php on line 218

Drupal 8.15

Comments

extrem94 created an issue. See original summary.

christian le fournis’s picture

Issue summary: View changes
christian le fournis’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Issue summary: View changes

Wrong import use statement in the AppleNewsTemplateForm.php
Should be:

use Drupal\Core\Entity\EntityTypeManagerInterface;
instead of:
use Drupal\Core\Entity\EntityTypeManager;

oleksandr.s’s picture

StatusFileSize
new627 bytes

Implemented fixes from comment #3.
Please review.

oleksandr.s’s picture

Status: Active » Needs review
kelt88’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +RockSolidCodeSprint

Tested patch locally, error disappeared in my situation. Thanks

m4olivei’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x-1.x! Thanks!

Status: Fixed » Closed (fixed)

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