Filter bypassed in panel pages?

jcisio - November 7, 2009 - 16:08
Project:Panels
Version:6.x-3.2
Component:Panel pages
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello,

I'd like to be confirmed that hook_filter is not called in panel pages. For example, I create a new panel page at article/%node to replace the default node/%node. When I view node/ID the filters apply to all text, but it is not the case for article/ID.

Regards.

#1

merlinofchaos - November 7, 2009 - 18:17
Status:active» won't fix

It depends on the content you put into the panel.

hook_filter isn't called for all text on a node. A filter format is applied to the body text, and possibly other fields depending upon their settings.

Since your base assumption is wrong, I can't really tell you any more without some specifics. Please see the issue submission guidelines for some details and suggestions.

#2

jcisio - November 8, 2009 - 09:49
Status:won't fix» active

In fact I meant filters are not applied on the body text. Below is what I do:

- Create a new story content ID
- Install the wordfilter module http://drupal.org/project/wordfilter (which uses hook_nodeapi to censor node title, hook_filter to censor body text)
- Test and verify that this filter is applied on node/ID, on both title and body text.
- Create new panel pages on article/%node
- On this panel page, I click "Add content" -> "Node" -> "Node body", then Update, save. OK.
- When I go to article/ID, the title is filtered, but the body text is not.
- When I go to node/ID, the title is filtered, and the body text is.

#3

merlinofchaos - November 9, 2009 - 22:34

In the code, the pane is created thusly:

<?php
  $block
->content = check_markup($node->body, $node->format, FALSE);
?>

In the Node: Body content, it *is* run through the filters for the specified format on the node; check_markup() is the proper way to filter the content. I don't see anything special in the word filter module that might cause this not to work, either. It's not obvious to me what might be going on here.

 
 

Drupal is a registered trademark of Dries Buytaert.