Steps to replicate
I'm an administrator to the site
I access the create product form eg (http://drupal8.dev/product/add/toys)
I press save
I see "The website encountered an unexpected error. Please try again later."
The product isn't saved.
Commit I'm working off 6ef70e93713544a2b6afd35f4f715bbd186fc4d9
When I go to watchdog I'm seeing the following error.
"Recoverable fatal error: Argument 1 passed to Drupal\Component\Utility\NestedArray::getValue() must be of the type array, null given, called in /var/www/headless/core/lib/Drupal/Core/Field/WidgetBase.php on line 403 and defined in Drupal\Component\Utility\NestedArray::getValue() (line 74 of /var/www/headless/core/lib/Drupal/Component/Utility/NestedArray.php)."
Comments
Comment #2
bojanz commentedThanks for reporting.
Questions:
1) Does it work if you click "save variation" before clicking the main save button?
2) How many stores do you have? If it's only one, does it work if you add another store?
Comment #3
tom m fallon commentedThe save variation button fails to do anything, and I have one store.
I've not really changed anything since yesterday.
But the error message has changed to
"Recoverable fatal error: Argument 1 passed to Drupal\Core\Field\WidgetBase::massageFormValues() must be of the type array, string given, called in /var/www/headless/core/lib/Drupal/Core/Field/WidgetBase.php on line 375 and defined in Drupal\Core\Field\WidgetBase->massageFormValues() (line 512 of /var/www/headless/core/lib/Drupal/Core/Field/WidgetBase.php)."
This same error occurs on both the main save and the "create variation"
Comment #4
bojanz commentedI am assuming you are using a recent Drupal 8 version (RC2/RC3/RC4)?
Are you using the latest -dev of Inline Entity Form? alpha2 probably won't work.
Comment #5
tom m fallon commentedWill check back at this, and use dev release of inline entity form. I'm using latest current Drupal 8 release candidate.
Comment #6
bojanz commentedFinally managed to reproduce this. Seems to only occur on add, but not on edit, which is why the tests don't catch it.
From code I can't explain why it's limited to add.
Anyway, pushed a fix.
Comment #8
tom m fallon commentedHello
Thank you for investigating this. I have applied the fix you provided, and it has worked :D.
This issue can close.