Make WordPress Core

Opened 17 years ago

Closed 16 years ago

Last modified 12 years ago

#6847 closed defect (bug) (duplicate)

'the_content_rss' hook not working

Reported by: scribu's profile scribu Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: General Keywords:
Focuses: Cc:

Description

'the_content_rss' filter does not trigger the callback function. Here is an example:

<?php
/*
Plugin Name: TestRSS
Plugin URI:
Description: Test plugin
Version: 0.1
Date: Mar 31th, 2008
Author: Antonio Perez
Author URI:
*/

function test_rss($text)
{

$text = "Hello world";
return $text;

}

add_filter('the_content_rss', 'test_rss');
?>

This error has also been present in version 2.5

Attachments (1)

the_content_rss_filter_when_feed.patch (671 bytes) - added by mystyman 17 years ago.

Download all attachments as: .zip

Change History (17)

#1 @scribu
17 years ago

  • Owner changed from anonymous to guillep2k, ionfish

#2 @scribu
17 years ago

  • Owner changed from guillep2k, ionfish to guillep2k

#3 follow-up: @mystyman
17 years ago

  • Keywords has_patch needs_testing added

It appears that rss2 and atom are run through the_content not the_content_rss. Here is a little patch that should run it through the correct filter hook anyway. needs testing though.

#4 in reply to: ↑ 3 @skarcha
17 years ago

Replying to mystyman:

It appears that rss2 and atom are run through the_content not the_content_rss. Here is a little patch that should run it through the correct filter hook anyway. needs testing though.

Tested and works for me now. Thanks.

#5 @fuggi
17 years ago

Related to this ticket called "the_content_rss() is used incorrectly in non RSS feed": http://trac.wordpress.org/ticket/3884

#6 @ryan
17 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

#7 @scribu
17 years ago

  • Milestone changed from 2.9 to 2.6.1

#8 @scribu
17 years ago

  • Owner guillep2k deleted

#9 @scribu
17 years ago

  • Owner set to anonymous

#10 @westi
17 years ago

  • Keywords has_patch needs_testing the_content_rss filter feed removed
  • Milestone changed from 2.6.1 to 2.9

Moving back to 2.9

#11 @scribu
17 years ago

  • Milestone changed from 2.9 to 2.6.2

#12 @westi
17 years ago

  • Milestone 2.6.2 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Closing as invalid.

the_content_rss hook is called by the_content_rss function.

It sbhould not be called by the_content function that should as it does not call the_content hook.

#13 @tadhg
16 years ago

westi: You're right about how it should work, but the problem is that apparently the_content_rss hook doesn't always get called--i.e. with Atom or RSS2 feeds. It looks to me like mystyman's patch addresses the problem that's caused by
http://core.trac.wordpress.org/ticket/8706

I think this bug should be a duplicate of 8706 at this point.

#14 @lloydbudd
16 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#15 @lloydbudd
16 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

#16 @gaveideer
12 years ago

Nothing.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.