diff --git a/core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php b/core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php index f92929c336..0e18d4a86e 100644 --- a/core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php +++ b/core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php @@ -46,7 +46,8 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac protected function findDefinitions() { $definitions = parent::findDefinitions(); - // Sort the definitions before they are cached. + // Sort the definitions by their weight while preserving the original order + // for those with matching weights. $weights = array_map(function (SectionStorageDefinition $definition) { return $definition->getWeight(); }, $definitions);