WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 42 hours ago

#36669 assigned enhancement

Update SimplePie to Latest Version and possibly include PHP-MF2

Reported by: dshanske Owned by: rmccue
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: has-patch early needs-refresh
Focuses: SimplePie Cc:

Description

SimplePie Version 1.4 is now available.

https://github.com/simplepie/simplepie/releases

It is the first release in 3 years and has a large number of bug fixes. It also is the first version that includes support for new types of feeds as described by the IndieWebCamp community.

These feeds are made up of h-feed and h-entry microformats, which allows the feed to be parsed from the html rather than a separate xml file.

SimplePie will now detect when it finds such a feed and parse them when it finds the php-mf2 parser available.

Attachments (2)

update-simplepie.patch (86.6 KB) - added by slushman 3 years ago.
Patch updating SimplePie to version 1.4.
SimplePie-1.5.2.diff (120.1 KB) - added by wpshades 5 months ago.
The latest release of SimplePie found at - https://github.com/simplepie/simplepie/releases

Download all attachments as: .zip

Change History (21)

#1 @jorbin
3 years ago

  • Owner set to rmccue
  • Status changed from new to assigned

@rmccue - thoughts?

This ticket was mentioned in Slack in #core by dshanske. View the logs.


3 years ago

@slushman
3 years ago

Patch updating SimplePie to version 1.4.

#3 @slushman
3 years ago

  • Keywords has-patch added

I've run into an issue with a plugin trying to read an RSS feed from a site with a Lets Encrypt (self-signed) cert. It appears this was fixed in [May 2015](https://github.com/simplepie/simplepie/pull/407) and that fix is part of SimplePie 1.4.
Submitting patch to update SimplePie to version 1.4.

This ticket was mentioned in Slack in #core by dshanske. View the logs.


2 years ago

#5 @jhabdas
21 months ago

SimplePie 1.5 has been released. It still does not support PHP 7.0, which is what I believe WP suggests. It seems apt to deprecate or make private fetch_feed() entirely and let the plugins manage the use cases and forward-facing support role for end users.

Last edited 21 months ago by jhabdas (previous) (diff)

#6 @Presskopp
16 months ago

1.5.1 is latest now

#7 @aquakitty
16 months ago

#42515 was marked as a duplicate.

#8 @etruel
11 months ago

Hi all, someone recommended me to tell the following here. I'll try to say some different behaviours that we have in our plugin WPeMatico by reading different feeds.

I can't give too much technical details, but we're attending so much tickets of lot of users with problems using the Simplepie 1.3.1 included in WordPress that we solved just by using the new version 1.5 or newer.

Almost all the new things we found in the 1.5 version (already to download in simplepie.org) was related with fixed issues and improvements. (https://github.com/simplepie/simplepie/releases)

Using 1.3.1 included in WP, some of the feeds with problem are solved with force_feed and others by changing to a known User-agent. (But in 1.5 works by default)

There are feeds giving different errors in 1.3.1 than 1.5. And some of them work well in 1.5 and not in 1.3 (1.3 tried with and without force_feed)

For example http://thenationonlineng.net/feed/
Works well with 1.5.

1.3.1 = ERROR: The feed http://thenationonlineng.net/feed/ cannot be parsed. Simplepie said: This XML document is invalid, likely due to invalid characters. XML error: Reserved XML Name at line 2, column 38

Many errors that produce notices like examples below are fixed easily by using the new 1.5:

ERROR: Feed https://www.cryptocoinsnews.com/feed could not be parsed. (SimplePie said: A feed could not be found at https://www.cryptocoinsnews.com/feed. A feed with an invalid mime type may fall victim to this error, or SimplePie was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed.)

ERROR: Feed https://www.youtube.com/feeds/videos.xml?channel_id=UCCWYNcRdRteOF3wIRVeaJZQ could not be parsed. (SimplePie said: cURL error 60: SSL certificate problem: unable to get local issuer certificate)

Hope this helps.

cheers

etruel

#9 @swissspidy
10 months ago

#44309 was marked as a duplicate.

@wpshades
5 months ago

The latest release of SimplePie found at - https://github.com/simplepie/simplepie/releases

#10 @wpshades
5 months ago

  • Focuses SimplePie added
  • Version changed from 4.6 to 4.9.8

Hi everyone!

I have just submitted a patch that includes the latest release of SimplePie(1.5.2).
If there's any way in which I can help test this out, please let me know.

Thanks!

#11 follow-up: @dmenard
5 months ago

Hi!

I would like to second this request.

With WP 4.9.8 and PHP 7.2, the WordPress RSS widget generates many warnings like this:

Warning: A non-numeric value encountered in wordpress\wp-includes\SimplePie\Parse\Date.php on line 694

10	SimplePie->get_items( $start = ???, $end = ??? )			...\class-simplepie.php:2812
11	SimplePie_Item->get_date( $date_format = 'U' )				...\class-simplepie.php:2925
12	SimplePie_Parse_Date->parse( $date = '2018-10-02T08:38:56Z' )		...\Item.php:773
13	SimplePie_Parse_Date->date_w3cdtf( $date = '2018-10-02T08:38:56Z' )	...\Date.php:603

These are caused by the way SimplePie 1.3.1 parses dates and by the new E_WARNINGs introduced in PHP 7.1.

A simple fix for this has been made in july 2016 and is included since SimplePie 1.4.2.

So upgrading SimplePie to the latest version would solve these warnings.

Thanks!

#12 in reply to: ↑ 11 @miunosoft
5 months ago

Just in case for someone who are facing this issue and need to get away from the warnings without modifying the core, here is a plugin, Fix - SimplePie Errors: https://github.com/michaeluno/_fix-simplepie-errors).

#13 @pento
4 months ago

#45436 was marked as a duplicate.

#14 @Znuff
3 months ago

This bug has been present for years and it affects all production websites on current PHP versions.

There have been patches submitted, people even made plugins.

How come this is taking so long to be adopted in the core?

It's spamming our servers logs so hard that we ended up at 3GB in 3 days. It's incredible.

This ticket was mentioned in Slack in #core by dshanske. View the logs.


3 months ago

#16 @pento
2 months ago

#42684 was marked as a duplicate.

#17 @pento
2 months ago

  • Milestone changed from Awaiting Review to 5.2
  • Version 4.9.8 deleted

PHP 5.2 support was dropped in SimplePie 1.4, 1.5 requires PHP 5.3+.

I'm moving this to the 5.2 milestone, when we'll be bumping WordPress' minimum PHP version to 5.6.

#18 @knutsp
4 days ago

#42515 was marked as a duplicate.

#19 @desrosj
42 hours ago

  • Keywords early needs-refresh added
  • Milestone changed from 5.2 to 5.3

5.2 beta is in less than 2 days. The latest patch needs to be refreshed to apply cleanly to trunk, and this needs to be tested. Punting to 5.3.

@rmccue do you have any thoughts about this?

Note: See TracTickets for help on using tickets.