I was previously using panels 6.2-x versions and had a few blocks with custom php.

E.g 1 block that listed related terms (even though panels 6.3-x now provides this), another that listed synonyms (also now provided) but most importantly, one that redirects user if taxonomy term being viewed has node of a certain type associated with it - none of my php blocks work and even the simplest of php doesn't seem to work in Panels 6.3-x.
Is this by design?
If so, how can I get this functionality working again?

The main functionality I had was: If no nodes associated with taxonomy, display taxonomy description, else redirect to first node(usually only 1)

$tid = arg(2);
$title = db_result(db_query("SELECT name FROM term_data WHERE tid = %d", $tid));

drupal_set_title($title);
$nid = db_result(db_query("SELECT tn.nid FROM term_node tn inner join node n ON tn.nid = n.nid WHERE tn.tid = %d AND n.type = '%s' LIMIT 0,1", $tid, 'career'));

if($nid) {
  drupal_goto('node/'.$nid);
}
else {
$result = db_result(db_query("SELECT description FROM term_data WHERE tid = %d", $tid));
$output = str_replace('”', '"', $result);
}

print $output;

Comments

BenGman’s picture

Subscribing

agileware’s picture

I am also seeing a problem with the php filter.

When I select the php filter it just parses any html i've entered and does nothing about php tags.

zahor’s picture

So I was mistaken...it wasn't that php wasn't working, it was that the panel wasn't working at all. In 6.2 version, I had a panel specific for one term (and children) along with the default panel for all the rest. The custom php was in the specifc panel, not the default one and this one wasn't working at all.

Why it wasn't working - beats me. Everything seemed to be set correctly, but it didn't. Actually had a problem with a few other panels that were imported. I had to reconstruct them or remove them altogether.

So anyone else who upgraded from 6.2 - 6.3 and has problems, try recreating the panel.

merlinofchaos’s picture

Status: Active » Fixed

There was an old 'custom PHP type' that has been deprecated and removed because it was not really very secure.

The 'custom' content type still supports the PHP filter, and it's been verified that htis is functional. Please note that the PHP filter requires a high level of access, so may not always be available. Plus, it requires a module.

Status: Fixed » Closed (fixed)

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