joshp23 / ttrss-to-wallabag-v2

A Tiny Tiny RSS plugin to post to a Wallabg v2 instance
GNU General Public License v3.0
77 stars 19 forks source link

tt-rss php8 error #41

Closed somedevreally closed 3 years ago

somedevreally commented 3 years ago

tt-rss has upgraded to php8 and since last week, its getting error for wallabag plugin

Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/wallabag_v2/init.php:138
Stack trace:
#0 /var/www/html/tt-rss/classes/pluginhost.php(144): Wallabag_v2->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(131): Pref_Prefs->index()
#3 {main}
1. classes/pluginhost.php(148): user_error(Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/wallabag_v2/init.php:138
Stack trace:
#0 /var/www/html/tt-rss/classes/pluginhost.php(144): Wallabag_v2->hook_prefs_tab()
#1 /var/www/html/tt-rss/classes/pref/prefs.php(1..., 512)
2. classes/pref/prefs.php(1054): run_hooks(hook_prefs_tab, prefPrefs)
3. backend.php(131): index()
trockenasche commented 3 years ago

Unfortunately I getting the same error with the new tt-rss version.


E_USER_WARNING (512) | classes/pluginhost.php:148

Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/wallabag_v2/init.php:51
Stack trace:
#0 /var/www/html/tt-rss/classes/pluginhost.php(144): Wallabag_v2->hook_prefs_tab()
#1 /var/www/html/tt-rss/classes/pref/prefs.php(1031): PluginHost->run_hooks()
#2 /var/www/html/tt-rss/backend.php(131): Pref_Prefs->index()
#3 {main}
1. classes/pluginhost.php(148): user_error(Error: Call to undefined function print_hidden() in /var/www/html/tt-rss/plugins.local/wallabag_v2/init.php:51
Stack trace:
#0 /var/www/html/tt-rss/classes/pluginhost.php(144): Wallabag_v2->hook_prefs_tab()
#1 /var/www/html/tt-rss/classes/pref/prefs.php(10..., 512)
2. classes/pref/prefs.php(1031): run_hooks(hook_prefs_tab, prefPrefs)
3. backend.php(131): index()```
vishalg commented 3 years ago

This is not due to the php version rather the print_hidden function has been removed and replaced in TT-RSS. Unfortunately, I don't know enough about web-development to try and troubleshoot the issue.

joshp23 commented 3 years ago

I've identified the necessary changes, @vishalg is correct about the cause. print_hidden needs to be replaced with the updated methods which are demonstrated in some of Fox's plugins. I do not have time to address this right now, and will get to it as I can. In the meantime, Pull requests are welcome :)

vishalg commented 3 years ago

@joshp23 I have submitted a pull request. Let me know if you have some time to test it. I have done simple testing on my install and it worked fine.

trockenasche commented 3 years ago

I tried your PR and it does work at my setup as well.

somedevreally commented 3 years ago

@vishalg changes fixed the issue, awesome. thanks

vishalg commented 3 years ago

That's good news. It's up to @joshp23 to accept the pull request if he is happy.

joshp23 commented 3 years ago

looks good :)