- Issue created by @tedbow
- πΊπΈUnited States tedbow Ithaca, NY, USA
This is handled now as of π Deleting a content entity should clear its values from the auto-save store Active
Working β¨ Auto-save code components Active I was wondering if should clean up the auto-save entries if the Code Component was deleted, since we test that the HTTP API does support delete in \Drupal\Tests\experience_builder\Functional\XbConfigEntityHttpApiTest::testJavaScriptComponent.
But then I realized \Drupal\experience_builder\Controller\ApiPublishAllController::__invoke
probably doesn't handle the case where the entity that corresponds to an auto-saved entry has been deleted.
$entity = $this->entityTypeManager->getStorage($auto_save['entity_type'])
->load($auto_save['entity_id']);
if ($entity instanceof PageTemplate) {
$entity = $entity->forAutoSaveData($auto_save['data']);
$entity->enforceIsNew(FALSE);
$this->validatePageTemplate($entity);
}
else {
assert($entity instanceof FieldableEntityInterface);
Pretty sure this assert would just fail. Since at least for code components you could probably create 1 and then decide you want to delete it before it is published, then we need to handle this.
I would assume eventually that would the case for Pages too
Active
0.0
Page builder
This is handled now as of π Deleting a content entity should clear its values from the auto-save store Active