- Issue created by @tedbow
Researching π [PP-1] Return validation errors from LayoutController::post and ::patch Active I wanted to see if you could save an invalid date range value into auto-save. I thought maybe we would actually want to allow saving invalid field values in auto-save so that you could still save work-in-progress. this might be important because you might have updated many fields after you set an invalid date range(or another field) and you won't want that to stop the auto-save
I choose the date range field because I know how to easily set an invalid field value, set the end before the start
I was able to do the auto-save but I was also able to save node with the invalid date range.
I am not sure if there is problem just with date ranges or any field that we can get an invalid value past the client validation.
In \Drupal\experience_builder\ClientDataToEntityConverter::convert()
we do call $entity->validate()
and we do this regardless of the value of $validate
. so in theory that should throw an error if ClientDataToEntityConverter::convert()
is called from \Drupal\experience_builder\Controller\expected_auto_saves
which happens on "Publish all" or \Drupal\experience_builder\Controller\ApiLayoutController::buildPreviewRenderable()
which happens when we are auto-saving.
Determine if this is problem unique to date range fields or any invalid field value
fix
Active
0.0
Page builder