Closed eric-pierce closed 3 years ago
Thanks @eric-pierce. I have tested the latest commits and the plugin has started working again.
However the patch may have introduced a new bug — the field to change/update the plugin's password in tt-rss' Preferences no longer appear:
@ansonlos I don't seem to have that problem, see below:
It looks like this is related to #14, which I'm not able to re-create
It's quite baffling; I have also checked file permissions, tried different browsers (Safari, Edge, Brave), but the field is still not showing. And not just the input field, the next few sentences that follow as well.
This is what I'm seeing in tt-rss' event log:
Error
E_USER_WARNING (512)
Filename:
classes/pluginhost.php:147
Message:
Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/fever/init.php:47 Stack trace: #0 /var/www/html/tt-rss/classes/pluginhost.php(143): Fever->hook_prefs_tab() #1 /var/www/html/tt-rss/classes/pref/prefs.php(1054): PluginHost->run_hooks() #2 /var/www/html/tt-rss/backend.php(120): Pref_Prefs->index() #3 {main} 1. classes/pluginhost.php(147): user_error(Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/fever/init.php:47 Stack trace: #0 /var/www/html/tt-rss/classes/pluginhost.php(143): Fever->hook_prefs_tab() #1 /var/www/html/tt-rss/classes/pref/prefs.php(1054): PluginH..., 512) 2. classes/pref/prefs.php(1054): run_hooks(hook_prefs_tab, prefPrefs) 3. backend.php(120): index() Remote IP: xx.xx.xx.xx Request URI: /tt-rss/backend.php?op=pref-prefs User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.152 Safari/537.36
Do you think the error above anything to do with it?
@eric-pierce Apparently the author of tt-rss has replaced print_hidden with hidden_tag. So with that, I just updated the corresponding lines in init.php like so:
print \Controls\hidden_tag("op", "pluginhandler");
print \Controls\hidden_tag("method", "save");
print \Controls\hidden_tag("plugin", "fever");
And the result is that the password input field re-appears. If you also find this acceptable, appreciate if you could help to push the changes to the repo. Thank you!
Just added a few "isset" checks to avoid the new warnings added in PHP8