Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical error when adding new feed #134

Closed
biguenique opened this issue Feb 8, 2022 · 7 comments
Closed

Critical error when adding new feed #134

biguenique opened this issue Feb 8, 2022 · 7 comments

Comments

@biguenique
Copy link

FeedWordPress version 2022.0204
Multisite setup
WordPress recently updated to 5.9: same issue.
Tried PHP 7.3, 7.4, 8.0: same issue.
Web server is OpenLiteSpeed (CyberPanel) but I don't think this is relevant.

When adding a new feed, it aborts with a critical error within the RSS 2.0 Sample Item display box, eg.:

Sample Item
Title: [Item Title Here](https://bestever.media/article-url)
Date: 01-Feb-22 12:00:00 am
Une erreur critique est survenue sur votre site.

[En apprendre plus sur le débogage de WordPress.](https://fr.wordpress.org/support/article/faq-troubleshooting/)

Yep, I know, it's in French. But it means: "There has been a critical error on this website."

The PHP error log shows something akin to the following:

2022-02-08 05:32:25.954317 [NOTICE] [3129299] [104.37.80.211:55455-Q:B76B1D77724A9467-8#example.com] [STDERR] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function wp_kses(), 1 passed in /home/example.com/public_html/wp-content/plugins/feedwordpress/feeds-page.php on line 998 and at least 2 expected in /home/example.com/public_html/wp-includes/kses.php:762
Stack trace:
#0 /home/example.com/public_html/wp-content/plugins/feedwordpress/feeds-page.php(998): wp_kses('Truncated Feed Title...')
#1 /home/example.com/public_html/wp-content/plugins/feedwordpress/feeds-page.php(134): FeedWordPressFeedsPage->display_feedfinder()
#2 /home/example.com/public_html/wp-content/plugins/feedwordpress/feeds-page.php(1320): FeedWordPressFeedsPage->display()
#3 /home/example.com/public_html/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php(1184): include_once('/home/example.c...')
#4 /home/example.com/public_html/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php(409): fwp_feedfinder_page()
#5 /home/example.com/public_html/wp-content/plugins/feedwordpress/syndication.php(5): FeedWordPressSyndicationPage in /home/example.com/public_html/wp-includes/kses.php on line 762

So I guess something was changed in WP's wp_kses.php.

All existing feed on various sites (of the multisite network) get fetched and updated without any problem. But since some time (last update? plugin or WordPress?) I'm simply not able to add new feeds because of this error.

@glg222
Copy link

glg222 commented Feb 8, 2022

I have the same problem

@radgeek
Copy link
Owner

radgeek commented Feb 8, 2022

Thanks for the (very useful) report of the error message, and I am sorry for the issue. I think that I should have a fix which resolves this; pull the most recent version of FWP from github and see if it fixes the problem for you.

@cogdog
Copy link

cogdog commented Feb 10, 2022

I am seeing the same issue on adding a new feed, critical error, but the feed ends up in the syndication list.

An error of type E_ERROR was caused in line 1203 of the file /home/cogdog/public_html/cogdogblog.com/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php. Error message: Uncaught Error: Using $this when not in object context in /home/cogdog/public_html/cogdogblog.com/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php:1203
Stack trace:
#0 /home/cogdog/public_html/cogdogblog.com/wp-content/plugins/feedwordpress/feedwordpresssyndicationpage.class.php(409): fwp_switchfeed_page()
#1 /home/cogdog/public_html/cogdogblog.com/wp-content/plugins/feedwordpress/syndication.php(5): FeedWordPressSyndicationPage->display()
#2 /home/cogdog/public_html/cogdogblog.com/wp-admin/admin.php(293): include('/home/cogdog/pu...')
#3 {main}

running under:

WordPress version 5.8.3
Current plugin: FeedWordPress (version 2022.0208)
PHP version 7.4.9

@biguenique
Copy link
Author

Thanks for the (very useful) report of the error message, and I am sorry for the issue. I think that I should have a fix which resolves this; pull the most recent version

I tried again to make sure I still had the bug before pulling the GitHub, and it seems that the "wp_kses" fix was already pushed on the latest release (2022.0208)!

Thanks for the quick fix ! There seems to be another issue with $this and its context, as reported by @cogdog above, so I'll leave this ticket open.

@biguenique
Copy link
Author

I am seeing the same issue on adding a new feed, critical error, but the feed ends up in the syndication list.

I am getting the very same error at the following step (after clicking "Use this feed"), but I confirm that the feed ends up in the syndication list. From there on it can be managed and updates successfully.

@cogdog
Copy link

cogdog commented Feb 10, 2022

My bad for jumping quickly, I should made this a new issue! Will move

@radgeek
Copy link
Owner

radgeek commented Feb 23, 2022

I'll go ahead and close this issue as resolved; if you were getting @cogdog 's error, that should hopefully now be resolved with a fix in version 2022.0222 (available via git pull or from the WordPress Plugin Repository SVN). In any case, if not, check out issue #135 to see more on that issue. Thanks, all!

@radgeek radgeek closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants