fieldable_panels_panes_preprocess_panels_pane() throws notices if it doesn't get an entity for whatever reason.

Patch forthcoming.

Comments

cweagans’s picture

Status: Active » Needs review
StatusFileSize
new659 bytes
webflo’s picture

I have the same problem and use this patch.

dave reid’s picture

Status: Needs review » Needs work

Maybe it would be easier/cleaner to wrap the $entity = fieldable_panels_panes_load_entity($vars['pane']->subtype); itself in an if:

function fieldable_panels_panes_preprocess_panels_pane(&$vars) {
  if ($vars['pane']->type == 'fieldable_panels_pane') {
    if ($entity = fieldable_panels_panes_load_entity($vars['pane']->subtype)) {
      if ($entity->link && !empty($vars['title'])) {
        $vars['title'] = l($vars['title'], $entity->path);
      }
      $vars['classes_array'][] = 'pane-bundle-' . ctools_cleanstring($entity->bundle, array('lower case' => TRUE));
    }
  }
}
dave reid’s picture

Status: Needs work » Fixed

Committed the version in #3 to Git. Thanks everyone! http://drupalcode.org/project/fieldable_panels_panes.git/commit/eb13aae

Status: Fixed » Closed (fixed)

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