I selected a 1 column layout on a node display, pressed save, and got

Fatal error: Call to undefined method Drupal\Core\Layout\LayoutDefault::buildConfigurationForm() in /mnt/c/Users/Jonathan/Documents/Drupal/wsl/ahs/web/modules/contrib/ds/includes/field_ui.inc on line 775

The old layout_plugin has a buildConfigurationForm method on LayoutDefault but layout_discovery doesn't.

The calling code is

$layout_plugin = \Drupal::service('plugin.manager.core.layout')->createInstance($layout['layout'], $layout['settings'] ?: []);
   $layout_configuration_form = $layout_plugin->buildConfigurationForm([], $form_state);

in which the variable $layout is
Array ( [*deriver] => [*label] => One column [*description] => [*category] => Columns: 1 [*template] => layout--onecol [*templatePath] => core/modules/layout_discovery/layouts/onecol [*theme_hook] => layout__onecol [*path] => core/modules/layout_discovery/layouts/onecol [*library] => layout_discovery/onecol [*icon] => [*regions] => Array ( [content] => Array ( [label] => Content ) ) [*default_region] => content [*additional] => Array ( ) [*id] => layout_onecol [*class] => Drupal\Core\Layout\LayoutDefault [*provider] => layout_discovery [*config_dependencies] => Array ( [module] => Array ( [0] => layout_discovery ) ) [layout] => layout_onecol [disable_css] => [entity_classes] => all_classes [settings] => Array ( [classes] => Array ( ) [wrappers] => Array ( [content] => div ) [outer_wrapper] => div [attributes] => [link_attribute] => [link_custom] => ) [regions] => Array ( [content] => Array ( [0] => body ) ) [fields] => [region_names] => Array ( [content] => Array ( [label] => Content ) ) [layout_options] => Array ( [Columns: 1] => Array ( [layout_onecol] => One column ) [Columns: 2] => Array ( [layout_twocol] => Two column [layout_twocol_bricks] => Two column bricks ) [Columns: 3] => Array ( [layout_threecol_25_50_25] => Three column 25/50/25 [layout_threecol_33_34_33] => Three column 33/34/33 ) [Display Suite] => Array ( [ds_1col] => One column layout [ds_1col_wrapper] => One column layout + wrapper [ds_2col] => Two column layout [ds_2col_fluid] => Fluid two column layout [ds_2col_stacked] => Two column stacked layout [ds_2col_stacked_fluid] => Fluid two column stacked layout [ds_3col] => Three column - 25/50/25 [ds_3col_equal_width] => Three column - equal width [ds_3col_stacked] => Three column stacked - 25/50/25 [ds_3col_stacked_fluid] => Fluid three column stacked - 25/50/25 [ds_3col_stacked_equal_width] => Three column stacked - equal width [ds_4col] => Four column - equal width [ds_reset] => Reset layout ) ) )

The config of the display is now:

array (
  'uuid' => '031a30df-c231-4ade-ab00-ea89efe25bbf',
  'langcode' => 'en',
  'status' => true,
  'dependencies' => 
  array (
    'config' => 
    array (
      0 => 'field.field.node.page.body',
      1 => 'node.type.page',
    ),
    'module' => 
    array (
      0 => 'ds',
      1 => 'text',
      2 => 'user',
    ),
  ),
  'third_party_settings' => 
  array (
    'ds' => 
    array (
      'layout' => 
      array (
        'id' => 'layout_onecol',
        'path' => 'core/modules/layout_discovery/layouts/onecol',
        'library' => 'layout_discovery/onecol',
        'disable_css' => false,
        'entity_classes' => 'all_classes',
        'settings' => 
        array (
          'classes' => 
          array (
          ),
          'wrappers' => 
          array (
            'content' => 'div',
          ),
          'outer_wrapper' => 'div',
          'attributes' => '',
          'link_attribute' => '',
          'link_custom' => '',
        ),
      ),
      'regions' => 
      array (
        'content' => 
        array (
          0 => 'body',
        ),
      ),
    ),
  ),
  '_core' => 
  array (
    'default_config_hash' => 'oZ-7vpIJxjxL2up9B5KrJGD0lazQ9aN0P-fIPo6OrSU',
  ),
  'id' => 'node.page.default',
  'targetEntityType' => 'node',
  'bundle' => 'page',
  'mode' => 'default',
  'content' => 
  array (
    'body' => 
    array (
      'label' => 'hidden',
      'type' => 'text_default',
      'weight' => 100,
      'settings' => 
      array (
      ),
      'third_party_settings' => 
      array (
      ),
      'region' => 'content',
    ),
    'links' => 
    array (
      'weight' => 101,
      'region' => 'content',
      'settings' => 
      array (
      ),
      'third_party_settings' => 
      array (
      ),
    ),
  ),
  'hidden' => 
  array (
  ),
)

Priority critical because it triggers via the UI a broken state that cannot be recovered from the UI?

Comments

jonathanshaw created an issue. See original summary.

swentel’s picture