Whenever I try to create a new static block from the backend, I always get the notice
"Could not save block, sorry something went wrong".
Checking logs I found this exception of the violation of an integrity constraint
> main.CRITICAL: Exception message: SQLSTATE: Integrity > constraint violation: 1452 Cannot add or update a child row: a foreign > key constraint fails (`my_db`.`cms_block_store`, CONSTRAINT > `CMS_BLOCK_STORE_BLOCK_ID_CMS_BLOCK_BLOCK_ID` FOREIGN KEY (`block_id`) > REFERENCES `cms_block_live` (`block_id`) ON DELETE CASCADE), query > was: INSERT INTO `cms_block_store` (`block_id`,`store_id`) VALUES (?, > ?)
I've tried to delete orphans without a
block_id in both tables, but it seems a strange behaviour.
In another Magento version I have installed, the table
cms_block_live is not present, there's only the table
cms_block, which is present also in this version, which is 2.1.10. Should
cms_block_live be present?
I found there is a similar Magento bug in this verison, that has been fixed in 2.2 and 2.3 versions, but before upgrading, I would like to know if there is anybody else experiencing this issue.