I got the below error in red box when I just created my subtheme from the STARTERKIT by following the instructions:

Following layouts have a "content" region key which is invalid: panels-zen_two_sidebars, panels-zen_one_sidebar_second, panels-zen_two_sidebars_first, panels-zen_two_sidebars_second, panels-zen_one_sidebar_first.

The problem occurs in both Zen 7.x-3.x-dev and 7.x-5.x-dev. I do not have any panel or panel page defined.

The CTools and Panels I use were: 7.x-1.0-rc1+116-dev and 7.x-3.0+2-dev, respectively (the latest dev versions).

When I try to delete the directory "layouts" in the Zen parent directory, the error was gone.

CommentFileSizeAuthor
#9 regions-to-panels-1437696.patch3.08 KBghazlewood

Comments

metakel’s picture

Also, if I select the parent "Zen" theme at Drupal's "Appearance", the error does not appear; only have this error if I choose the subtheme.

metakel’s picture

I have just tried the below and it makes the error goes away:

According to the Panels' document at http://drupal.org/node/495654 , point 4: about editing the *.inc files inside the "layouts" directory, there should be a "panels" array:

in the panels array we will define the regions in which content can be placed once our layout is finished, just add a new item for each area, we will end up with this:

'panels' => array(
	'top' => t('Top'),
	'left' => t('Left side'),
	'right' => t('Right side')
),

However in the "layouts" directory that come with the Zen theme, the wording "panels" was coded "regions" in the *.inc files. For example, in the zen/layouts/zen_one_sidebar_first/zen_one_sidebar_first.inc :

<?php
// Plugin definition
$plugin = array(
  'title'       => t('One sidebar before content'),
  'icon'        => 'zen-one-sidebar-first.png',
  'category'    => t('Columns: 2'),
  'theme'       => 'zen_one_sidebar_first',
  'css'         => 'zen-one-sidebar-first.css',
  'admin theme' => 'zen_one_sidebar_first_admin',
  'admin css'   => 'zen-one-sidebar-first-admin.css',
  'regions'     => array(
    'content'       => t('Content'),
    'sidebar_first' => t('Sidebar'),
  ),
);

If I change the five directories inside "layouts" from "regions" to "panels", the error disappears.

I do not know whether this is a correct way to deal with the problem. I do not know whether the "regions" is coded intentionally too.

johnalbin’s picture

Status: Active » Needs work

I suspect this was an API change from the D6 version of Panels.

I'd love a patch file.

metakel’s picture

Component: PHP code » layout.css

I've just found that this problem only occurred on my old installation. That is, I added the Zen core and sub-theme to an existing site, the above mentioned error message was shown on the front page every time it loads, and also when I "drush cc all". The only way to get rid of it is to change "regions" to "panels" inside the "layouts" directory as I said above at #2.

However, if I use the same CTools, Panels, Zen core theme and sub-theme on a brand new Drupal installation, the problem did not appear.

I suspected that there are some settings which caused the problem. But since I did not defined any Panels yet, I do not know how to fix it.

metakel’s picture

Version: 7.x-3.x-dev » 7.x-5.x-dev
Component: layout.css » PHP/JS code
metakel’s picture

If I disable the Panels module, the error message is gone. And after the Panels module is enabled again, the error message comes back.

bigsyke’s picture

I have the same error

cyberlex404’s picture

+ 1
I have the same error!!!

ghazlewood’s picture

Status: Needs work » Needs review
StatusFileSize
new3.08 KB

Seems like a really simple fix, and it works for me, so here's a super quick patch as requested. Seems too easy?!

aaronbauman’s picture

patch #9 worked for me

johnalbin’s picture

Title: "Following layouts have a "content" region key which is invalid:" » CTools API change causes warning: Following layouts have a "content" region key which is invalid
Status: Needs review » Fixed

Thanks for the patch, George! http://drupal.org/node/88566/committers

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drupalmonkey’s picture

This error is actually caused by this: http://drupal.org/node/1382132

And from the patch on that page, it looks like it is still looking for the "regions" key:
http://drupal.org/files/1382132-1.patch

I tried changing the "regions" key to "panels" in my zen subtheme layouts folder, and all the content on the site disappeared, and the $content variable the .tpl files receive is empty.