Warning on configuration page.

Warning: Invalid argument supplied for foreach() in Drupal\Core\Render\Element\Checkboxes::valueCallback() (line 100 of core/lib/Drupal/Core/Render/Element/Checkboxes.php).

I got this error on Drupal(8.3.7) with latest nodeownership(8.x-1.0)

Here is steps to reproduce the error:
1. Install the module.
2. Go to it's settings page(admin/config/content/claim).

Comments

soaratul created an issue. See original summary.

soaratul’s picture

StatusFileSize
new909 bytes

Here is patch for it.

soaratul’s picture

Assigned: soaratul » Unassigned
Status: Active » Needs review
vdsh’s picture

Issue tags: -
StatusFileSize
new3.43 KB

Hi @soaratul,

I reviewed your patch, which works - but I think there are some other improvements that could be done to this settings form. I have attached a new patch providing those improvements (using $this->t, loading configuration only once and not the "editable" version as not needed, ...)

vdsh’s picture

StatusFileSize
new3.42 KB

This patch is better

vyasamit2007’s picture

Status: Needs review » Fixed

This is already part of the next release.

Thank you.

vyasamit2007’s picture

Status: Fixed » Closed (fixed)