I was following the steps to set up the REST server:

  1. Enabled rest module.
  2. Added rest.settings.yml at sites/default/files/config_somehash/staging/rest.settings.yml as per the above guide.
  3. Open admin/config/development/sync and hit Sync all.

The following error raises:

Fatal error: Call to a member function delete() on a non-object in /home/juampy/projects/drupal8/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php on line 530

The entity that is not found and which causes the error has $name as entity.display.custom_block.basic.default con and $id as custom_block.basic.default


juampynr’s picture

So the config file entity.display.custom_block.basic.default is not saved as at the active storage during Drupal installation. However, it is saved at config_snapshot table:

mysql> select * from config_snapshot where name = 'entity.display.custom_block.basic.default'\G
*************************** 1. row ***************************
name: entity.display.custom_block.basic.default
data: a:6:{s:2:"id";s:26:"custom_block.basic.default";s:4:"uuid";s:36:"18c9c5bd-2fcc-4971-b400-f939e3e394d1";s:16:"targetEntityType";s:12:"custom_block";s:6:"bundle";s:5:"basic";s:4:"mode";s:7:"default";s:7:"content";a:1:{s:10:"block_body";a:4:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:6:"weight";s:1:"0";s:8:"settings";a:0:{}}}}
1 row in set (0.00 sec)

This provokes that if you hit Sync all, all entries in this table are re-imported from the active storage, including entity.display.custom_block.basic.default.yml, which causes the reported error.

Will keep digging.

benjy’s picture

Status: Active » Closed (cannot reproduce)

I just tested this and everything seems to be fine. I'll close but please re-open if you feel the issue still exists.

benjy’s picture

Issue summary: View changes

Clarified description.