When I enable display suite (within a clean sparks distribution), I get the following error:

Notice: Undefined index: items in panels_flexible_panels() (line 257 of ../profiles/spark/modules/contrib/panels/plugins/layouts/flexible/flexible.inc).
Warning: Invalid argument supplied for foreach() in panels_flexible_panels() (line 257 of ../profiles/spark/modules/contrib/panels/plugins/layouts/flexible/flexible.inc).

I am not sure where to place this issue but disabling Layout does remove the warnings.

might this relate in some way to the (solved) panels problem described in this issue?:
http://drupal.org/node/1106302

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

autopoietic’s picture

Further testing:

  1. Installed blank d7
  2. installed panels - working fine
  3. installed ds (+ui) - working fine
  4. installed layout - error (as issue summary)
Gábor Hojtsy’s picture

This sounds strange, because we don't use the flexible layout plugin from panels.

hexabinaer’s picture

Thanks for this hint, I've been searching for hours now.

Tested this way (using simplytest.me - great helper!)

1. installed spark + display suite
2. logfile: looks fine
3. enabled display suite
4. logile: 4 notices, 4 warnings

Notice: Undefined index: items in panels_flexible_panels() (line 257 of /home/seb915089fa41c33/www/profiles/spark/modules/contrib/panels/plugins/layouts/flexible/flexible.inc).
Warning: Invalid argument supplied for foreach() in panels_flexible_panels() (line 257 of /home/seb915089fa41c33/www/profiles/spark/modules/contrib/panels/plugins/layouts/flexible/flexible.inc).

Maybe this issue should rather be placed in spark's issue queue?

breeze_man’s picture

Apply the two patches to make layout module compatible with display suite.
layout-1.0-compatibility_with_display_suite.patch is for layout module, ds-2.6-support_responsive_panels_of_layout.patch is for ds module.

AlfTheCat’s picture

Thank you, patches of #4 fixed the errors for me.

greenSkin’s picture

Status: Active » Needs work
FileSize
2.15 KB

Here's an updated patch for Display Suite against version 2.10.

This patch also reorders the $content array so regions render in the proper order. Previously, if a region's key matched the field name (e.g., "body" field), it's content would not necessarily render in the proper order within the responsive layout. I'm not sure this is the best place or best way of doing this, but it works.

What are the best steps to get both of these patches absorbed into their respective modules? I would presume an issue should be opened under Display Suite with it's patch.

Manuel P.V.’s picture

Hi! Thanks for the patchs! but don't work in my installation. Also the errors are a little different:

Notice: Undefined index: regions in layout_responsive_panels() (line 147 of /sites/all/modules/layout/plugins/layouts/responsive.inc).

Warning: Invalid argument supplied for foreach() in layout_responsive_panels() (line 147 of /sites/all/modules/layout/plugins/layouts/responsive.inc).

The errors refer to this code snippet:

/**
 * Return the actual list of regions for this responsive panel.
 */
function layout_responsive_panels($display, $settings, $layout) {
  $items = array();
  layout_responsive_merge_default_settings($settings, $layout);

  // Resolve machine names to names for visual presentation in panels.
  $default_regions = layout_region_load_all();
  $region_names = array();
  foreach ($settings['regions'] as $name => $overrides) {
    $region_names[$name] = $default_regions[$name]->admin_title;
  }

  return $region_names;
}

Suggestions?

piusmnwilson’s picture

I uninstalled my layouts module and the problem vanished....Well am a bit new to drupal, been doing simple edits for the company i work for but recently i decided to start working on my own web projects thus as of now i am working with the Andromeda them....any further help would come highly appreciated...thanks

dedicated_hobby_coder’s picture

Have a look here, solved my issues
https://www.drupal.org/node/1106302#comment-11229873