I created a content type, and set a default value. When I created a piece of content of this type, the default value that I set did not show up in the edit form. When I entered a value and saved the piece of content, the original default value was shown instead of the value I entered. I got this error: "Warning: Invalid argument supplied for foreach() in Drupal\Core\Entity\Entity->__construct() (line 72 of core/lib/Drupal/Core/Entity/Entity.php)."
To reproduce:
- Install Drupal 8
- Create content type
- Add a text field
- Set default value for the text field as XYZ and save the field
- Create a piece of content of this type and note that the default value does not appear in the text field
- Enter a value in the field and save the content
- Not that the value for the text field is the same value that you inserted as default value when creating the content type, not the value you entered when creating the specific piece of content
I'd expect the default value to prepopulate the text field when creating a piece of content, and for that value to be overridden if I enter a value and then save it.