This issue is caused by #2415427: Avoid loading FPP from database in fieldable_panels_panes_preprocess_panels_pane()
Here's the PHP notices:
Notice: Trying to get property of non-object in fieldable_panels_panes_preprocess_panels_pane() (line 756 of /var/aegir/prj/fieldable_panels_panes/fieldable_panels_panes.module).
Notice: Trying to get property of non-object in fieldable_panels_panes_preprocess_panels_pane() (line 760 of /var/aegir/prj/fieldable_panels_panes/fieldable_panels_panes.module).
And here's the code in question:
function fieldable_panels_panes_preprocess_panels_pane(&$vars) {
if ($vars['pane']->type == 'fieldable_panels_pane') {
if (!empty($vars['content']['#fieldable_panels_pane'])) {
$entity = $vars['content']['#fieldable_panels_pane'];
if ($entity->link && !empty($vars['title'])) {
$vars['title'] = l($vars['title'], $entity->path);
}
ctools_include('cleanstring');
$vars['classes_array'][] = 'pane-bundle-' . ctools_cleanstring($entity->bundle, array('lower case' => TRUE));
}
}
}
Basically, if the FPP is hidden via visibility rules, then $vars['content']['#fieldable_panels_pane'] won't be an entity object. In my testing it was actually the string "P", which is super wierd and might be a bug from somewhere else?
Anyway, the easiest solution is to just check if it's an object in the if statement. I'll upload a patch that does this in a moment!
Comments
Comment #1
dsnopekPatch is attached! Please let me know what you think.
Comment #2
dsnopekComment #3
monymirzathanks, fixed now.
Comment #4
damienmckennaCommitted. Thanks!
Comment #6
dsnopekThanks! :-)
Comment #8
koykov commentedComment #9
damienmckenna@koykov: Were you uploading another patch for the same problem?