Opened 4 years ago

Last modified 4 years ago

#9510 new enhancement

Multiple feed fixes and enhancements

Reported by: peaceablewhale Owned by:
Priority: high Milestone: Future Release
Component: Feeds Version: 2.7.1
Severity: major Keywords: has-patch needs-testing
Cc: beau@…

Description

Currently, the feed always returns the same subtitle, self link, alternate link and replies link no matter what the page type is. I think they should be different for each page type.

Attachments (7)

feed-atom.php (3.7 KB) - added by peaceablewhale 4 years ago.
Initial attempt to add those features to feed-atom.php
link-template.php (52.2 KB) - added by peaceablewhale 4 years ago.
Initial attempt to add new functions to link-template.php
php.files.to.patch (6.7 KB) - added by simek 4 years ago.
Changes into attached PHP files in one patch file - diff preview
feed-atom.php.patch (4.3 KB) - added by peaceablewhale 4 years ago.
atom:id should be changed as well. This patch replaces the feed-atom.php part of the previous patch.
9510-v2.patch (20.2 KB) - added by peaceablewhale 4 years ago.
New patch, replaces all old patches.
9510-v3.patch (17.4 KB) - added by peaceablewhale 4 years ago.
Version 3 of the patch, changes from #9515 adopted, with minor corrections
9510-v4.patch (48.6 KB) - added by peaceablewhale 4 years ago.

Download all attachments as: .zip

Change History (35)

Initial attempt to add those features to feed-atom.php

Initial attempt to add new functions to link-template.php

get_day_feed_link and get_day_comments_feed_link functions are to be added...

simek4 years ago

Changes into attached PHP files in one patch file - diff preview

  • Keywords has-patch added

atom:id should be changed as well. This patch replaces the feed-atom.php part of the previous patch.

Thanks simek for the patch. I have uploaded a new patch replacing the feed-atom.php part.

This is the first time for me to generate a patch file. Please let me know if I have done anything wrong. Thanks.

New patch, replaces all old patches.

  • Keywords dev-feedback added
  • Severity changed from normal to major

The v2 patch has included the changes proposed in #9515, the patch will have to be updated when #9515 is settled.

In addition, since I have made many modifications to the files, I would like to get some comments from the core developers.

  • Keywords needs-testing added
  • Milestone changed from Unassigned to 2.8

Could this be added in WordPress 2.8?

patch applies cleanly

This report will be updated after #9515 is fixed.

  • Milestone changed from 2.8 to Future Release

patch is b0rke

  • Milestone changed from Future Release to 2.8

Patch updated.

Version 3 of the patch, changes from #9515 adopted, with minor corrections

  • Milestone changed from 2.8 to Future Release
  • Type changed from defect (bug) to enhancement

Postponing from 2.8.

  • Milestone changed from Future Release to 2.9
  • Keywords dev-feedback removed

patch still applies clean

Patch will be updated after #4967 is fixed.

  • Keywords needs-review added; needs-testing removed
  • Summary changed from Show different subtitle, self link, alternate link and replies link in Atom feed based on the page type to Show different subtitle, self link, alternate link and replies link in feeds based on the page type

A new patch has been uploaded, with the changes proposed in #4967 excluded. The patch also fixes #9992, #9831 and some formatting issues in feeds.

The updated version 4 patch fixes #4523 as well.

Correction: It's #4253, not #4523

Patch updated to fix a problem that the required <description> element is sometimes not displayed under RSS 2 channel.

  • Priority changed from normal to high

Attempt to fix #8828 as well.

Added the change proposed in #10016

  • Summary changed from Show different subtitle, self link, alternate link and replies link in feeds based on the page type to Multiple feed fixes and enhancements

Added the changes proposed in #10509, also made Atom support sy:updatePeriod and sy:updateFrequency.

comment:22 follow-up: ↓ 23   beaulebens4 years ago

  • Cc beau@… added

Not to be too picky, but it'd be nice if this was closer to the WordPress Coding Standard. Specifically, reversing most comparisons, spacing things out a bit to make them easier to read and avoiding quote-escaping by going between single and double quotes where appropriate.

That being said, after a very quick visual skim over the code it looks like it adds a lot more flexibility and robustness to the feed system of WP, so I'm all for it (haven't tested to see if the patch applies cleanly or does as advertised). Looks very thorough.

feed_link() and feed_entry_link() looked identical (except for the filter they run), perhaps they can just be combined into a more generic feed_link() function, with a parameter indicating what filter to run over the resulting code, or just have it run at the point that calls them?

You're using get_lastpostmodified() to get a value for feed_updated(), but it seems like that value would not necessarily be accurate for anything except the full-site feed. If there's an easy way to get that date from the first matching item in the feed, that seems like that would consistently give you the correct value for that specific feed.

comment:23 in reply to: ↑ 22   peaceablewhale4 years ago

@beaulebens:

Thanks for your comment. I will upload a patch that conforms to the coding standard later.

The refreshed patch is expected to combine feed_link() and feed_entry_link() into generic_feed_link(), with a parameter indicating which filter to be used.

I know that get_lastpostmodified() is problem... but I am not able to fix that until #4575 is fixed...

After a second thought, I think that adding $is_entry to feed_link() is better. A refreshed patch has been uploaded, and it is now closer to the WordPress Coding Standard.

Updated the patch to resolve the conflict caused by [11864].

Updated the patch to resolve the conflict caused by [11980].

  • Keywords needs-testing added; needs-review removed

Marking this report "needs-testing" in order to gain attention in the upcoming bug hunt.

  • Milestone changed from 2.9 to Future Release
Note: See TracTickets for help on using tickets.