Unverified Commit 13cbe411 authored by alexpott's avatar alexpott
Browse files

Issue #3046007 by Sam152, alexpott, amateescu, tim.plunkett: In some...

Issue #3046007 by Sam152, alexpott, amateescu, tim.plunkett: In some circumstances the override field is not cleared from the field map when a bundle is deleted, resulting in a fatal error in layout_builder_post_update_make_layout_untranslatable
parent 09fb5ce7
......@@ -201,7 +201,12 @@ function layout_builder_post_update_make_layout_untranslatable() {
if (isset($field_infos[OverridesSectionStorage::FIELD_NAME]['bundles'])) {
$non_translatable_bundle_count = 0;
foreach ($field_infos[OverridesSectionStorage::FIELD_NAME]['bundles'] as $bundle) {
$field_config = FieldConfig::loadByName($entity_type_id, $bundle, OverridesSectionStorage::FIELD_NAME);
// The field map can contain stale information. If the field does not
// exist, ignore it. The field map will be rebuilt when the cache is
// cleared at the end of the update process.
if (!$field_config = FieldConfig::loadByName($entity_type_id, $bundle, OverridesSectionStorage::FIELD_NAME)) {
if (!$field_config->isTranslatable()) {
// The layout field is already configured to be non-translatable so it
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment