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

Tom M Fallon created an issue. See original summary.

bojanz’s picture

Thanks 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?

tom m fallon’s picture

The 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"

bojanz’s picture

I 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.

tom m fallon’s picture

Will check back at this, and use dev release of inline entity form. I'm using latest current Drupal 8 release candidate.

bojanz’s picture

Status: Active » Fixed

Finally 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.

  • bojanz committed a4ea28c on 8.x-2.x
    Issue #2615544 by Tom M Fallon, bojanz: Unable to create new products
    
tom m fallon’s picture

Hello

Thank you for investigating this. I have applied the fix you provided, and it has worked :D.

This issue can close.

Status: Fixed » Closed (fixed)

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