When I want to display block with style of "System block" inside panels, I get an PHP notice:

Notice: Undefined property: stdClass::$subject in function include() (line 47 in file .../modules/block/block.tpl.php).

Comments

Letharion’s picture

Category: bug » support
Status: Active » Closed (cannot reproduce)

Sorry, I can't reproduce this. Can you provide more detailed steps to reproducing the problem?

calefilm’s picture

I have this problem now. My error reads:

Notice: Undefined property: stdClass::$subject in include() (line 4 of /Users/cale/Sites/acquia-drupal/sites/all/themes/corporateclean/block.tpl.php).

I have a simple view that i've attached into my panel page. I select pane style to "System Block". Click Save. Go to my page and see the error. Does the same for every panel I have. Can't set the system block style.

line 4 in block.tpl.php: <?php if ($block->subject): ?>

calefilm’s picture

issue:

http://drupal.org/node/1480984#comment-5732094

"Looks like the comments system is filtering out the none tag (< none >, without spaces)... If you use that within a Views block, then that will appear as text (in the title). For Views blocks you actually want to not enter anything for the title - that will make it empty/remove it. It sounds like something funky is going on with your titles, and again, I can't figure out exactly what without seeing it first hand. Another suggestion (if an empty title in Views doesn't work) is to enter some text for the title to get the block working, and then hide the title via CSS."

calefilm’s picture

I had to enter a title in my block settings. I had checked the box and left the override title field in my block settings empty. By entering a title i was able to use the system block style.

merlinofchaos’s picture

Category: support » bug
Status: Closed (cannot reproduce) » Active

Ahh, that indicates the system block style is failing to ensure $block->subject is there and blank if it does not exist. That's a good thing to fix.

codewatson’s picture

I can confirm I get the exact same thing with custom content panes, if i leave the title blank for a custom pane and set it to the system block style, i get that notice. This is with panels 7.x-3.2/ctools 7.x-1.0

codewatson’s picture

Version: 7.x-3.0-alpha3 » 7.x-3.2

Happens in 7.x-3.2, forgot to update the version

sonicthoughts’s picture

Same issue on 7.x-3.2 - when in place editing is enabled.

codewatson’s picture

Where about would i look to try and figure out how to fix this? (ctools/panels have lots of files!)

segovia94’s picture

I receive the same error when these three things are used in conjunction.

  1. In Place Editor
  2. System Block style selected
  3. No content is currently in the block

For example. I have a basic "block" view with a title called "upcoming events". If there happens to not be any upcoming events then this error is thrown.

merlinofchaos’s picture

Status: Active » Closed (duplicate)

There's a patch posted for this here: http://drupal.org/node/1912174