Download & Extend

Custom Filter is not applied until the node is edited

Project:Custom filter
Version:6.x-2.0-beta5
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I have email from a mailing list auto-populating a forum. When email comes in, I place an '...eom...' marker at the very end of every email. I've created a custom filter to filter out content from the end of the first reply in an email to the '...eom...' marker -- removing all the content of previous emails from the reply.

When I first view an item in a forum, the custom filter isn't applied -- all of the content from the whole email conversation is visible on each email that is part of the forum thread. However, if I click the edit tab and then save a comment or node, the custom filter gets applied to that comment or node; it filters out all of the conversation from previous emails, as expected; and the result is what I want.

Any idea why this might be happening? Anything I can do to provide additional useful information? Any thoughts for ways I might address the issue?

Thanks

Comments

#1

Title:Custom Filter not applied until I edit the node» Custom Filter is not applied until the node is edited
Status:active» postponed (maintainer needs more info)

From the description given, I would think that the custom filter is set to cache the result; that would explain why saving the content actually applies the filter.

I would need more information, to be able to tell you what is the exact cause, but I think that is the more plausible cause.

#2

Based on your post, I've turned off all caching available on the 'Performance' page, and am seeing the same result.

I'm using Drupal 6.11 with:

Apache 2.2.11
PHP: 5.2.9-2
MySQL: 5.1.33
(WampServer 2.0)

The process I'm using for creating nodes and comments is not standard -- since they're coming in via email. Any Custom Filter dependency there that might be involved?

Also, I have found that this PHP version is a little stricter about some things (not sure exactly what, but, for example, it in other situations, it threw this error:

Cannot use object of type stdClass as array

When other people weren't seeing it. (That's in this unrelated issue: http://drupal.org/node/531690.)

Is there anything I can do to provide you with more information, or anything I can do to assist in troubleshooting?

Thanks

#3

Well, I'm not sure what's going on -- but right now, things seem to be working as expected (just started to about 15 mins ago). Maybe it was a caching issue. I'll monitor for the next couple of days and let you know if things stay good or backslide. Thank you for the prompt response.

#5

Bear in mind that also Custom filter has an option for the cache that you find in the filter edit page (see the attachment).

#6

I had problems in attaching the screenshot. Let us see if it works now.

AttachmentSize
Voila_Capture_32.png 26.46 KB

#7

Thank you. I'm still getting strange results from this workflow, but am not sure which module/code is causing the problems. Right now, what's happening is that even though my default module is set to 'Filtered HTML' (to which I've added some custom filters); the system seems to be applying a default of either 'no filter' (is that even possible), or a filter that I've deleted--I'm not sure which... still looking into it.

#8

Actually -- may I ask, do you know which table in the database associates a node with a specific filter? Knowing that would help troubleshoot this issue I think, and I haven't been able to find the answer...

#9

It should be the table node_revisions, which save it in the field format.

#10

Status:postponed (maintainer needs more info)» active

#11

Status:active» fixed

As I have not gotten any feedback, I am marking this report as fixed because it already had an answer.

#12

For the most part, I'm not seeing the behavior anymore, though I'm not sure what the critical change was. I say 'for the most part' because very occasionally it does seem to happen, or regex expressions I test in one environment (e.g., Regex Coach), don't produce the same results when they're built into filters. This makes me unsure of whether the filter isn't being applied, or I'm not defining it well. It does seem as though dead simple filters sometimes do not get applied. Anyway, if I find anything else useful, I'll add it to this thread, but until then, I think it's reasonable to close the issue. Thank you.

#13

As Regex Coach is thought for Perl regular expressions, I would expect a different result, in some cases.
I reported in the project page a link for the differences between the regular expressions used in PHP, and Perl.

#14

I'll check it, thank you!

#15

Status:fixed» closed (fixed)

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