Skip to content
Snippets Groups Projects
Unverified Commit 798d3ccc authored by Alex Pott's avatar Alex Pott
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

(cherry picked from commit 13cbe411)
parent 2910bb21
Branches
Tags
No related merge requests found
......@@ -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)) {
continue;
}
if (!$field_config->isTranslatable()) {
$non_translatable_bundle_count++;
// The layout field is already configured to be non-translatable so it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment