Skip to content

Cannot retrieve value of undefined directive Core.RemoveBlanks #428

New issue

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

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

Already on GitHub? Sign in to your account

Open
FadeFx opened this issue Nov 17, 2024 · 15 comments
Open

Cannot retrieve value of undefined directive Core.RemoveBlanks #428

FadeFx opened this issue Nov 17, 2024 · 15 comments

Comments

@FadeFx
Copy link

FadeFx commented Nov 17, 2024

Hi,

I am using nextcloud and its news app, which actually is an RSS reader and uses your library. Since its latest alpha build it constantly floods nextcloud logs with

{"reqId":"S9A6V7FoXrzh4bT1hs1U","level":2,"time":"2024-11-16T08:50:24+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Cannot retrieve value of undefined directive Core.RemoveBlanks invoked on line 75 in file /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/DOMLex.php at /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php#901","userAgent":"--","version":"30.0.2.2","data":{"app":"PHP"},"id":"67385db8a6022"}

And the Dev suggested to post this here, as it seems to be an upstream issue in your library.
Please also check this bugreport in nextcloud/news
nextcloud/news#2883

@ezyang
Copy link
Owner

ezyang commented Nov 18, 2024

We didn't remove this directive. What if you reinstall HTML Purifier?

@bytestream
Copy link
Contributor

The directive was added in 4.18 (latest release), but I cannot replicate the issue when using DOMLex. $config->get('Core.RemoveBlanks') returns false

@castle-giant
Copy link

I'm also experiencing this in nextcloud news. Is there anything specific I can dig into to help investigate?

@FadeFx
Copy link
Author

FadeFx commented Nov 19, 2024

I don't really know much about HTML Purifyer, but I guess it is bundled with nextcloud news as an external library would I just need to replace a file to reinstall it? Or is it actually installed in the os?

@FadeFx
Copy link
Author

FadeFx commented Nov 19, 2024

OK, so this is shipping with the nextcloud-news app, nothing I could do there I guess

@ezyang
Copy link
Owner

ezyang commented Nov 20, 2024

I am guessing they botched their bundle. Go complain back at them.

@FadeFx
Copy link
Author

FadeFx commented Nov 20, 2024

So you confirm everything is working from your side?
I guess that "RemoveBlanks" function is widely used and it would surface immediately if there was a bug at your side, right?

@SMillerDev
Copy link

I am guessing they botched their bundle. Go complain back at them.

News just ships whatever Composer gives us, is there a way to further debug this?

The initialisation in news is done like this: https://github.com/nextcloud/news/blob/594be805c85c8b06c9b9918f90453309cfd1ade3/lib/AppInfo/Application.php#L103

@ezyang
Copy link
Owner

ezyang commented Dec 3, 2024

I'd go look at the ConfigSchema ser and manually check it matches what's in Git

@yvonnewat
Copy link

Hello, I am not using nextcloud and have also noticed this exact issue when using the latest version of htmlpurifier v4.18.0. We have temporarily fixed it by reverting to v4.17.0.

@kavanagh21
Copy link

I also have the same issue, and I'm installing it directly from Composer.

@FadeFx
Copy link
Author

FadeFx commented Feb 6, 2025

It seems the nextcloud news team have narrowed the issue down to another app using htmlpurifier as well, causing dependency issues, if I got it right.
Check here: nextcloud/news#3017

@kavanagh21
Copy link

Sorry, I didn't write that very clearly; I'm installing HTMLPurifier directly from composer. I don't have nextcloud installed and have never used it. I've tried rolling back to 4.17.0 but that didn't fix it either, sadly.

@FadeFx
Copy link
Author

FadeFx commented Feb 6, 2025

What I wanted to asy, is there anything else, using htmlpurifier on your system that could cause cross dependencies?

@bytestream
Copy link
Contributor

My understanding is that this is not a HTMLPurifier issue. They had the news app running v4.17.0 and the mail app running v.4.18.0. That created a conflict as Core.RemoveBlanks was only introduced in v4.18.0

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

No branches or pull requests

7 participants