printfuck / xExtension-Readable

A FreshRSS extension to fetch article content with Readability or Mercury
GNU Affero General Public License v3.0
51 stars 9 forks source link

Uncaught Error: Call to undefined method FreshRSS_Entry::feedId() #3

Closed parcelcat closed 2 years ago

parcelcat commented 2 years ago

There is a bug that prevents FreshRSS from updating feeds when Readable is enabled:

PHP Fatal error: Uncaught Error: Call to undefined method FreshRSS_Entry::feedId() in /var/www/FreshRSS/extensions/xExtension-Readable/extension.php:22\nStack trace:\n#0 /var/www/FreshRSS/lib/Minz/ExtensionManager.php(337): ReadableExtension->fetchStuff()\n#1 /var/www/FreshRSS/lib/Minz/ExtensionManager.php(308): Minz_ExtensionManager::callOneToOne()\n#2 /var/www/FreshRSS/app/Controllers/feedController.php(424): Minz_ExtensionManager::callHook()\n#3 /var/www/FreshRSS/app/Controllers/feedController.php(769): FreshRSS_feed_Controller::actualizeFeed()\n#4 /var/www/FreshRSS/lib/Minz/Dispatcher.php(119): FreshRSS_feed_Controller->reloadAction()\n#5 /var/www/FreshRSS/lib/Minz/Dispatcher.php(48): Minz_Dispatcher->launchAction()\n#6 /var/www/FreshRSS/lib/Minz/FrontController.php(76): Minz_Dispatcher->run()\n#7 /var/www/FreshRSS/p/i/index.php(57): Minz_FrontController->run()\n#8 {main}\n thrown in /var/www/FreshRSS/extensions/xExtension-Readable/extension.php on line 22

Thanks for creating this extension!

printfuck commented 2 years ago

I'm sorry for your inconvenience.

Seems like a recent update to FreshRss broke compatibility with all previous versions. This small workaround should be working with all versions for now.

Can you tell me, how you'd upgrade your addon? Since I'm testing and developing on my main instance, I don't use addon update features of FreshRSS and don't know how to go about that. Would be nice to hear, if there are any problems or complications.

parcelcat commented 2 years ago

@printfuck Thank you, Readable now works as expected!

Since I'm using the official FreshRSS Docker image, I fetched the latest version of the extension with Git and then manually loaded it into the container.

  1. Obtain the container ID (represented as *container_id*) of the FreshRSS instance:
sudo docker ps | grep freshrss
  1. Delete the existing version of Readable:
sudo docker exec -it *container_id* /bin/bash
rm -rf extensions/xExtension-Readable
exit
  1. Load the newest version of Readable from the xExtension-Readable directory into the Docker container:
sudo docker cp xExtension-Readable *container_id*:/var/www/FreshRSS/extensions/

The extension is now updated in FreshRSS. It would be nicer if FreshRSS had an extension installer/updater in the settings, instead of just a list of installed and available extensions, but it doesn't look like this feature is implemented yet.

printfuck commented 2 years ago

Thank you for the issue and your time!