Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error #34

Open
wikd opened this issue Nov 6, 2024 · 7 comments
Open

Error #34

wikd opened this issue Nov 6, 2024 · 7 comments

Comments

@wikd
Copy link

wikd commented Nov 6, 2024

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.

Copy link

github-actions bot commented Nov 6, 2024

Welcome wikd 🎉

Congrats to your first issue!

@marek2001
Copy link

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

@Nyriel
Copy link

Nyriel commented Jan 6, 2025

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;

@alontraut
Copy link

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

@wikd
Copy link
Author

wikd commented Jan 10, 2025

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

@gstorelli
Copy link

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?

@mutax
Copy link

mutax commented Mar 1, 2025

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')),
            ];

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants