cntools_FreshRssExtensions icon indicating copy to clipboard operation
cntools_FreshRssExtensions copied to clipboard

Error

Open wikd opened this issue 1 year ago • 8 comments

In FreshRss 1.25.0-dev, whenever I try adding keywords to the filter and hit submit, it just loads a white page on mobile, and on the computer, it loads an error 500. I checked FreshRss logs, and there is nothing there. The installation check says everything is good, and I've manually checked permissions, etc.

wikd avatar Nov 06 '24 18:11 wikd

Welcome wikd :tada:

Congrats to your first issue!

github-actions[bot] avatar Nov 06 '24 18:11 github-actions[bot]

Confirm the same problem. I am using docker latest version.

marek2001 avatar Jan 01 '25 21:01 marek2001

I came across the same issue using the docker version.

UI did not give much, ./tmp/FreshRSS.log shows "PHP Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /config/www/freshrss/extensions/xExtension-FilterTitle/extension.php on line 66"

Line 66:

65 private function isPatternFound(string $title, string $pattern): bool { 66 if (1 === preg_match($pattern, $title)) { 67 return true;

Nyriel avatar Jan 06 '25 08:01 Nyriel

Hello,

I have been trying everyting I can to configure FilterTitle with no success. I even tried resetting FreshRSS from a new install with all the latest builds. :(

I was really hoping to implement filtering based on article title. Any help would be greatly appreciated.

This is the only error I can identify in the docker logs: [Wed Jan 08 14:15:06.542947 2025] [php:error] [pid 38:tid 38] [client IP:0] PHP Fatal error: Uncaught TypeError: Minz_Request::paramTextToArray(): Argument #2 ($plaintext) must be of type bool, array given, called in /var/www/FreshRSS/extensions/xExtension-FilterTitle/extension.php on line 15 and defined in /var/www/FreshRSS/lib/Minz/Request.php:148\nStack trace:\n#0 /var/www/FreshRSS/extensions/xExtension-FilterTitle/extension.php(15): Minz_Request::paramTextToArray()\n#1 /var/www/FreshRSS/app/Controllers/extensionController.php(127): FilterTitleExtension->handleConfigureAction()\n#2 /var/www/FreshRSS/lib/Minz/Dispatcher.php(120): FreshRSS_extension_Controller->configureAction()\n#3 /var/www/FreshRSS/lib/Minz/Dispatcher.php(49): Minz_Dispatcher->launchAction()\n#4 /var/www/FreshRSS/lib/Minz/FrontController.php(61): Minz_Dispatcher->run()\n#5 /var/www/FreshRSS/p/i/index.php(59): Minz_FrontController->run()\n#6 {main}\n thrown in /var/www/FreshRSS/lib/Minz/Request.php on line 148

alontraut avatar Jan 08 '25 22:01 alontraut

I fiddled with extension.php and fed chatgpt the php errors and somehow it fixed it. No idea what it did but here is the php code if anyone knows what it did. I been using it and it works fine. Pastebin

wikd avatar Jan 10 '25 00:01 wikd

I fiddled with extension.php and fed chatgpt the php errors and somehow it fixed it. No idea what it did but here is the php code if anyone knows what it did. I been using it and it works fine. Pastebin

Tested and it works, I think you can publish it.

Is there a way to set somehow the blacklist on specific category \ feed?

gstorelli avatar Jan 14 '25 22:01 gstorelli

Hey,

the call to Minz_Request::paramTextToArray is getting two parameters, the name of the variable and an empty array, in the current code. The empty array needs to go, then it seems to work again.

so in xExtension-FilterTitle/extension.php:

            $configuration = [
                'blacklist' => array_filter(Minz_Request::paramTextToArray('blacklist', [])),
                'mark_as_read' => Minz_Request::paramString('mark_as_read'),
                'whitelist' => array_filter(Minz_Request::paramTextToArray('whitelist', [])),
            ];

becomes

            $configuration = [
                'blacklist' => array_filter(Minz_Request::paramTextToArray('blacklist')),
                'mark_as_read' => Minz_Request::paramString('mark_as_read'),
                'whitelist' => array_filter(Minz_Request::paramTextToArray('whitelist')),
            ];

mutax avatar Mar 01 '25 19:03 mutax

Stale issue message

github-actions[bot] avatar May 01 '25 17:05 github-actions[bot]

Still getting this error when clicking "submit" for blacklist or filtertitle.

Borrower543 avatar Jul 04 '25 19:07 Borrower543