- π§πͺBelgium flyke
I just updated everything in a project (core to 9.5.11 and modules to latest stable release), ran all updates (drush updb) with success and without notices, and I now see this at admin/reports/status.
My project is in Dutch but its the same error as in the issue summary.Niet overeenkomende entiteit en/of velddefinities De volgende wijzigingen werden gevonden in het entiteitstype en de velddefinities. Content Het veld node.layout_builder__layout moet bijgewerkt worden.
So, as was mentioned in this issue, I edited my content types that have layoutbuilder, go to Manage fields and look at the layoutbuilder field.
It is locked, so I cannot edit and save the field via the Operations column.
So I click in the column Field type on 'layout section' for the layoutbuilder field.
But when I click save, I get the notice:
The SQL storage cannot change the schema for an existing field (layout_builder__layout in node entity) with data..
So I can not (re) save to fix this error. I also have installed the devel_entity_updates module so I can use
drush entup
But that also results in the same:In SqlContentEntityStorageSchema.php line 1756: The SQL storage cannot change the schema for an existing field (layout_builder__layout in node entity) with data.
Maybe somewhere some update hook did have a problem somewhere but I cannot see or find it. Not sure on how to fix this issue at the moment.
- π§πͺBelgium flyke
In order to get more info, I edited web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php and changed line 1755 to:
if ($this->hasColumnChanges($storage_definition, $original)) { dpm($original); dpm($storage_definition); throw new FieldStorageDefinitionUpdateForbiddenException('The SQL storage cannot change the schema for an existing field (' . $storage_definition->getName() . ' in ' . $storage_definition->getTargetEntityTypeId() . ' entity) with data.'); }
So I can at least see the difference between the original and the new definition.
I now know that the cause is something somewhere is trying to add propertyDefinitions to the storage definition that weren't there before. - π§πͺBelgium flyke
I was able to get more precise info on what on earth is changed in node.layout_builder__layout by editing the hasColumnChanges function inside core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php line 2487 to:
if ($definition_spec != $stored_spec) { dpm($definition_spec); dpm($stored_spec); return TRUE; }
That shows me that the blob size was changed somewhere. Either from 'normal' to 'big' or from 'big' to 'normal'. Still doing some digging and trying to understand the cause, the source and maybe find a solution.
I searched my database for 'layout_builder__layout' and found the 'node__layout_builder__layout' table.
Inside that, there is a layout_builder__layout_section field of type 'longblob' that I suspect is very related.
The search goes on. - π§πͺBelgium flyke
I had the same error in my status report on a project I just upgraded to Drupal 10.2. (Might have been there before the update, but only checked the status messages after the update to Drupal 10).
Adding patch from #3030154 in my composer.json (and then performing drush updb) made the error go away.
"patches": { "drupal/core": { ... "#3030154": "https://www.drupal.org/files/issues/2023-04-06/3030154-62_0.patch" },