Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6680 closed defect (bug) (invalid)

Full post RSS feeds can not break at the <!--more--> point

Reported by: hexley Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: RSS summary full text
Focuses: Cc:


I have my settings to:
For each article in a feed, show : Full text

Every post I have uses <!--more--> as you can see http://osxhelp.com/
All posts on the main page are truncated where I have specified them to be.

Any RSS feed, whether atom, rss, or rss 2, do not truncate where they should.
The code:

<description><?php the_content_rss('', 0, '', get_option('rss_excerpt_length')) ?></description>

This is rather mysterious to me, it calls the_content_rss(), which really does not do very much, at least, I do not see anywhere in that function that looks for the pattern <!--more-->

However, the function does nest another call to get_the_content(), which I can not seem to mentally parse out what is it up to. I see the match:

if ( preg_match('/<!--more(.*?)?-->/', $content, $matches) ) {

and in that it stuffs an array of $matches, which has the <!--more--> as item 0 and nothing as item 1 in the array. I see no way at all that this can properly work. I do not know the code well enough to confirm this is a bug.

Change History (13)

#1 @DD32
13 years ago

Its a change in 2.5

If you have it set to "Full Text" for the Feeds, then the feeds are just that, Full text, Ie. it ignores the <!--more--> tag alltogether.

See: (In [6763]) Show full content, including content after the more tag, for feeds. fixes #2582

I'm going to hold off marking this as invalid, Even though you can sit on the fence with it, Some people like that behaviour, Some people dont.

#2 @hexley
13 years ago

Can you please elaborate. From what I gather, setting it to full text gives my just that, ignoring the <!--more--> point. Setting it to summary will use the hard coded max rss length value.

How do I get back the old behavior? Does this mean going through all posts and setting a summary value, meaning I have to copy and paste from hundreds of posts to get the old behavior back?

Is this noted somewhere so people would know to take this into consideration before upgrading?

  • I have an email address set, in trac, and did not get a notification that this issue was replied to, what do I need to do to get email notifications?

#3 @dtc
13 years ago

I would also like to have the old behaviour back - there is a point having the <!--more--> tag cut the content of the RSS feed.

#4 @Viper007Bond
13 years ago

Would be very easy to accomplish with a plugin and my personal view is that this is plugin territory.

#5 @hexley
13 years ago

Fine, PI is ok with me. What is wrong, IMHO, is that a change was made, to behavior some people come to rely on, and that was not made clear in upgrade notes or as far as I can tell, in any documentation at all.

I spent 3 hours or so in the code, trying to trace these nested functions here and there, to suspect it was a bug, but it turns out to be an intentional change.

#6 @Viper007Bond
13 years ago

It was briefly mentioned in the development blog:


#7 @hexley
13 years ago

Well, I do not see it in there, searching for --more-- or RSS. Not that I do not believe you :-)
I just did an update to MySql, they made clear, in the download, in a read me, that if you update from version 4.x to 5.x, the way timestamp works has fully changed. I needed to make code changes to deal with it.

I decided to hold off on that update.

I updated to WP 2.5, and no longer had summary feeds, and no longer could inject paid for ads into them, as functionality changed. There absolutely needs to be a read me in the download, warning people about expected behavior changing.

I do not care that this feature changed, fine, I can always work around it. People need to know ahead of time.

#8 @dtc
13 years ago

Just a heads-up : the plugin Ozh' Better Feed by OZH reenable the functionality of <!--more--> in feeds. I'm using it and it's just like good ole times :)

#9 @ryan
13 years ago

This is part of a long debate that has gone back and forth for years. The new behavior is the result of interminable discussions and flame wars and will be the way going forward.

#10 follow-up: @ryan
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#11 @Nazgul
13 years ago

  • Milestone 2.5.1 deleted

#12 in reply to: ↑ 10 @gnot
13 years ago

Replying to ryan:

The new behaviour should be the result of what people actually need, but anyway...

#13 @strider72
13 years ago

I know Matt abhors additional options, but this seems like an obvious one to me. That is:

For each article in a feed, show

( ) Full text
( ) Full text, stopping at <!--more-->
( ) Summary

Whatever the discussion was, I completely agree that WordPress should really be more careful about changing established behavior without allowing people to decide.

If you're _fixing_ something, that's great, but this was nothing more than some people preferring A over B. If it's really as much of a debate as Ryan suggests, then it should be an option so each side can just do what they want.

I'll be checking out Ozh's plugin, I guess, but it would have been awfully nice to know about this change this morning. Tooo late now.... :\

Note: See TracTickets for help on using tickets.