feediron / ttrss_plugin-feediron

Evolution of ttrss_plugin-af_feedmod
https://discourse.tt-rss.org/t/plugin-update-feediron-v1-2-0/2018
MIT License
204 stars 34 forks source link

Uninitialized config null value incorrectly handled #195

Closed entekadesign closed 9 months ago

entekadesign commented 10 months ago

Expected Behavior

Current Behavior

Failure Information (for bugs)

PHP Warning: foreach() argument must be of type array|object, null given in /var/www/html/tt-rss/plugins.local/feediron/preftab/fi_pref_tab.php on line 44

op=pluginhandler&method=add&plugin=feediron&addrecipe=https%3A%2F%2Fapi.github.com%2Frepos%2Ffeediron%2Ffeediron-recipes%2Fcontents%2Fgeneral%2Fabgeordnetenwatch.de.json%3Fref%3Dmaster&csrf_token=29b175bd0bfceac378895b04c123534d

{"error":{"code":"E_UNKNOWN_METHOD","params":{"info":"UNKNOWN:pluginhandler->add"}}}

{}
dugite-code commented 10 months ago

@entekadesign Ah yes, I was going to post a bug as I had this reported over on community.tt-rss.org

It's the empty config, just manually add {} then save the config an it should work, the config is returning as null rather than an empty array on the backend. We need to add a catch to deal with fully null configs

dugite-code commented 10 months ago

I just added a quick check in the nullconf branch I'll try check it today but if you get around to it first let me know how it goes

entekadesign commented 10 months ago

I updated the plugin on the persistent volume with the "init.php" from the nullconf branch. Unfortunately, that didn't seem to work: “undefined” result. I don't have the setup right now to do a proper troubleshoot. Incidentally, adding "{}" to the config window and attempting to save the config, results in the same "undefined" response

dugite-code commented 10 months ago

Ok, I'll have a tinker when I can get around to setting up a new use on my instance.

dugite-code commented 9 months ago

It looks like I may have misdiagnosed the issue see: pull #196 Try the latest master and let me know if that fixes your issue.

entekadesign commented 9 months ago

That was it. I should have noticed that. Ugh. Thanks!

dugite-code commented 9 months ago

That's ok I missed that in the Logs and the post on the forum as well.