After upgrading my xUbuntu release from 16.10 to 17.04 my tt-rss kept throwing errors and didn't function properly anymore. I dug around a little in the error logs and found two different errors flooding my logs.
Here I want to describe how I resolved/worked around the errors and got my tt-rss running again. Perhaps other users might encounter these problems, too and find it helpful.
First error was:
Code: Select all
[Sat Apr 15 10:57:59.607604 2017] [:error] [pid 22782] [client <redactedip>:39106] PHP Fatal error: Uncaught Error: Undefined class constant 'HOOK_ENCLOSURE_ENTRY' in /usr/share/tt-rss/www/plugins/af_zz_imgproxy/init.php:20\nStack trace:\n#0 /usr/share/tt-rss/www/classes/pluginhost.php(191): Af_Zz_ImgProxy->init(Object(PluginHost))\n#1 /usr/share/tt-rss/www/include/functions.php(843): PluginHost->load('af_comics,af_re...', 3, 1)\n#2 /usr/share/tt-rss/www/include/functions.php(885): load_user_plugins(1)\n#3 /usr/share/tt-rss/www/index.php(48): login_sequence()\n#4 {main}\n thrown in /usr/share/tt-rss/www/plugins/af_zz_imgproxy/init.php on line 20, referer: https://<redactedurl>/tt-rss/prefs.php
Unfortunately I haven't found a real solution for this problem but to rename /plugins/af_zz_imgproxy/init.php (to init.ph_) and thus disabling/removing the plugin.
Perhaps someone with a little deeper understanding of the functioning of tt-rss could have a look at this?
Second error was:
Code: Select all
[Fri Apr 14 07:14:39.240665 2017] [:error] [pid 17804] [client <redactedip>:40786] PHP Fatal error: Uncaught InvalidArgumentException: Select_string only accepts integers: 2 in /usr/share/tt-rss/www/lib/gettext/gettext.php:354\nStack trace:\n#0 /usr/share/tt-rss/www/lib/gettext/gettext.php(388): gettext_reader->select_string('2')\n#1 /usr/share/tt-rss/www/lib/gettext/gettext.inc(293): gettext_reader->ngettext('comment', 'comments', '2')\n#2 /usr/share/tt-rss/www/classes/feeds.php(749): _ngettext('comment', 'comments', '2')\n#3 /usr/share/tt-rss/www/classes/feeds.php(937): Feeds->format_headlines_list(7, '', 'unread', 30, false, '', 0, '', false, true, '', false)\n#4 /usr/share/tt-rss/www/backend.php(123): Feeds->view()\n#5 {main}\n thrown in /usr/share/tt-rss/www/lib/gettext/gettext.php on line 354
This was a little harder to knack. I ended up replacing the tt-rss-supplied gettext.php with one from https://launchpad.net/php-gettext/trunk/1.0.12 (which seems to be the source for the gettext lib used in tt-rss). The launchpad file only differs in one line (i.e. line 101) to the one supplied by tt-rss ... But this seems to do the trick.
Code: Select all
~$ diff gettext.php.orig gettext.php
101c101
< function __construct($Reader, $enable_cache = true) {
---
> function gettext_reader($Reader, $enable_cache = true) {
where gettext.php.orig is the tt-rss-supplied file and gettext.php is the file from the launchpad.
I know this is an external library and therefore no support is given for it here. But as my programming skills are very very low I don't exactly know why this works. If anybody can and wants to explain it to me I would be very happy to learn the difference.
Just for information here my server setup:
Code: Select all
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
~$ uname -a
Linux udzserver 4.10.0-19-generic #21-Ubuntu SMP Thu Apr 6 17:04:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
~$ php --version
PHP 7.0.15-1ubuntu4 (cli) (built: Feb 28 2017 21:33:59) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.15-1ubuntu4, Copyright (c) 1999-2017, by Zend Technologies
~$ mysql --version
mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
~$ git show
commit b8f23d68484d8c0672d6c01a1344804dd5aba17f
Merge: 0eed023e 32024bdf
Author: Andrew Dolgov <redactedmailaddress>
Date: Mon Apr 10 19:46:16 2017 +0300
Merge branch 'fix_af_comic_tfd_filter' into 'master'
Fix the TFD filter and add Married to the sea
A while ago TFD changed the html for the comics page and broke the filter.
Here is a patch to show the comics in the feed again, as well as add Married to the Sea (sister site)
See merge request !50