Veer
Well-known member
- Affected version
- XF 2.3.0
I've encountered a bug when adding an RSS feed URL. For example, using the URL:
Here is a sample of the server error log:
This error also occurs when I save this feed and click the "Import now" button, as well as when the cron job runs. It seems to happen whenever the system tries to import the feed.
https://www.cnbc.com/id/100727362/device/rss/rss.html
and clicking the Preview button generates a lot of errors.Here is a sample of the server error log:
Rich (BB code):
Server error log
ErrorException: [E_DEPRECATED] Return type of Laminas\Feed\Reader\Feed\AbstractFeed::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice src\vendor\laminas\laminas-feed\src\Reader\Feed\AbstractFeed.php:116
Generated by: admin Jul 5, 2024 at 8:24 PM
Stack trace
#0 src\vendor\laminas\laminas-feed\src\Reader\Feed\AbstractFeed.php(17): XF::handlePhpError(8192, '[E_DEPRECATED] ...', 'C:\\laragon\\www\\...', 116)
#1 src\vendor\composer\ClassLoader.php(576): include('C:\\laragon\\www\\...')
#2 src\vendor\composer\ClassLoader.php(427): Composer\Autoload\{closure}('C:\\laragon\\www\\...')
#3 src\vendor\laminas\laminas-zendframework-bridge\src\Autoloader.php(112): Composer\Autoload\ClassLoader->loadClass('Laminas\\Feed\\Re...')
#4 src\vendor\laminas\laminas-feed\src\Reader\Feed\Rss.php(17): Laminas\ZendFrameworkBridge\Autoloader::Laminas\ZendFrameworkBridge\{closure}('Laminas\\Feed\\Re...')
#5 src\vendor\composer\ClassLoader.php(576): include('C:\\laragon\\www\\...')
#6 src\vendor\composer\ClassLoader.php(427): Composer\Autoload\{closure}('C:\\laragon\\www\\...')
#7 src\vendor\laminas\laminas-zendframework-bridge\src\Autoloader.php(112): Composer\Autoload\ClassLoader->loadClass('Laminas\\Feed\\Re...')
#8 src\vendor\laminas\laminas-feed\src\Reader\Reader.php(366): Laminas\ZendFrameworkBridge\Autoloader::Laminas\ZendFrameworkBridge\{closure}('Laminas\\Feed\\Re...')
#9 src\XF\Service\Feed\ReaderService.php(63): Laminas\Feed\Reader\Reader::importString('<?xml version="...')
#10 src\XF\Service\Feed\ReaderService.php(35): XF\Service\Feed\ReaderService->setFeed()
#11 src\XF\Container.php(275): XF\Service\Feed\ReaderService->__construct(Object(XF\Admin\App), 'https://www.cnb...')
#12 src\XF\App.php(1948): XF\Container->createObject('XF\\Service\\Feed...', Array)
#13 src\XF\Container.php(233): XF\App->XF\{closure}('XF\\Service\\Feed...', Array, Object(XF\Container))
#14 src\XF\App.php(3500): XF\Container->create('service', 'XF\\Service\\Feed...', Array)
#15 src\XF\Mvc\Controller.php(873): XF\App->service('XF\\Service\\Feed...', 'https://www.cnb...')
#16 src\XF\Admin\Controller\FeedController.php(256): XF\Mvc\Controller->service('XF\\Service\\Feed...', 'https://www.cnb...')
#17 src\XF\Admin\Controller\FeedController.php(162): XF\Admin\Controller\FeedController->getFeedReader('https://www.cnb...')
#18 src\XF\Mvc\Dispatcher.php(362): XF\Admin\Controller\FeedController->actionPreview(Object(XF\Mvc\ParameterBag))
#19 src\XF\Mvc\Dispatcher.php(264): XF\Mvc\Dispatcher->dispatchClass('XF\\Admin\\Contro...', 'Preview', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\FeedController), Object(XF\Mvc\Reply\Reroute))
#20 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\FeedController), Object(XF\Mvc\Reply\Reroute))
#21 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#22 src\XF\App.php(2777): XF\Mvc\Dispatcher->run()
#23 src\XF.php(798): XF\App->run()
#24 admin.php(15): XF::runApp('XF\\Admin\\App')
#25 {main}
Request state
array(4) {
["url"] => string(28) "/xf23/admin.php?feeds/0/save"
["referrer"] => string(42) "https://localhost/xf23/admin.php?feeds/add"
["_GET"] => array(1) {
["feeds/0/save"] => string(0) ""
}
["_POST"] => array(15) {
["_xfToken"] => string(8) "********"
["url"] => string(53) "https://www.cnbc.com/id/100727362/device/rss/rss.html"
["frequency"] => string(4) "1800"
["active"] => string(1) "1"
["user_id"] => string(1) "0"
["node_id"] => string(1) "2"
["prefix_id"] => string(1) "0"
["title_template"] => string(0) ""
["message_template"] => string(52) "{content}
Continue reading..."
This error also occurs when I save this feed and click the "Import now" button, as well as when the cron job runs. It seems to happen whenever the system tries to import the feed.