Not sure if this belongs to panels or not but posting here first. Whenever I initially install my site or flush my caches I get the following error:

Notice: Undefined index: items in panels_flexible_panels() (line 257 of C:\Desktop\Sites\drupal_wet\profiles\wetkit\modules\contrib\panels\plugins\layouts\flexible\flexible.inc).
Warning: Invalid argument supplied for foreach() in panels_flexible_panels() (line 257 of C:\Desktop\Sites\drupal_wet\profiles\wetkit\modules\contrib\panels\plugins\layouts\flexible\flexible.inc).

Tracing the issue to line 384 of ds.registry.inc

if ($layout['name'] != 'flexible') {
  $regions = panels_flexible_panels(array(), array(), $layout);
  $layouts['panels-' . $key] = array(

Which then calls in panels (latest dev) flexible.inc

function panels_flexible_panels($display, $settings, $layout) {
  $items = array();
  panels_flexible_convert_settings($settings, $layout);
  foreach ($settings['items'] as $id => $item) {
    // Remove garbage values.
    if (!isset($item['type'])) {
      unset($items[$id]);
    }
    else if ($item['type'] == 'region') {
      $items[$id] = $item['title'];
    }
  }

  return $items;
}

When I disable DS the error no longer presents itself

Comments

sylus’s picture

Project: Display Suite » Panels
Issue summary: View changes

Mod

sylus’s picture

Issue summary: View changes

Mod

mgifford’s picture

Project: Panels » Display Suite

Does it show up anywhere other than the install?

I saw it too when installing the distro.

swentel’s picture

Issue tags: +RC blocker

tagging

netsensei’s picture

Project: Display Suite » Panels
Version: 7.x-2.0-beta2 » 7.x-3.x-dev

We've been looking at this.

We do a $panel_layouts = panels_get_layouts();, then loop through the results while executing panels_flexible_panels(array(), array(), $layout) without altering the $layout (line363 through 384 in includes/ds.registry.inc)

In panels_flexible_panels(), we pass $settings/code> (by reference) and <code>$layout to panels_flexible_convert_settings($settings, $layout); where the $settings['items'] are set. (flexible.inc)

Unless $layout['layout']->settings is empty, $settings['items'] should always exist.

So this looks more like a Panels problem then a DS problem.

Moving this.

netsensei’s picture

Issue summary: View changes

Mod

drupalok’s picture

same problem here... any solution`?

freality’s picture

I just posted a patch at https://drupal.org/comment/8565917#comment-8565917 with I believe addresses the same issue.