Commit 2f97357a authored by Michael Lander's avatar Michael Lander
Browse files

Issue #3307625 by michaellander: Invalid delta error when trying to add new section

parent 39096fd4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -37,7 +37,14 @@ class FormAlter {
      return;
    }

    // Try to get section from storage, if section doesn't exist, we can exit.
    try {
      $section = $sectionStorage->getSection($delta);
    }
    catch (\Exception $ignored) {
      return;
    }

    $configuration = $section->getThirdPartySetting('layout_builder_limit', 'limit', LayoutBuilderLimit::DEFAULT_CONFIGURATION);
    // Set current values from form.
    $values = $form_state->getValues();