Hello,
After updating my drupal core to the last version, I encount a problem on saving contents using gutenberg with media field mapped.
Problem/Motivation
With a media field mapped to the gutenberg editor like this :
["drupalmedia/drupal-media-entity", {"mappingFields": [{"field": "field_front_image", "property": "target_id", "attribute": "mediaEntityIds"}]}],
When I try to save the content, it generate an error that say "the field xyz is required". I tried to remove the existing picture and reselect it without success. I tried with a new content and same problem. Like if the editor doesn't detect that the field is already filled.
If I set the field as not required, all is ok, I can save the content, and the media (picture) is displayed correctly on the final content.
When editing the block in gutenberg, the "field mapping" information say to me : The block attribute mediaEntityIds is mapped to the field_front_image[target_id] field.
Steps to reproduce
I don't know if it's possible to reproduce it.
Is anyone encounting the same problem ? It seems the field mapping syntax is correct, refering at
https://www.drupal.org/docs/8/modules/gutenberg/field-mapping →
Thanks in advance for any suggestion.