ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.08k stars 327 forks source link

nextcloud log spam Core.AggressivelyRemoveScript invoked on line 352 #132

Open Tealk opened 7 years ago

Tealk commented 7 years ago

On nextcloud i get this error, me was told I should report this here https://github.com/nextcloud/news/issues/133

Error


Cannot retrieve value of undefined directive Core.AggressivelyRemoveScript invoked on line 352 in file /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php at /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php#901
cubefoo commented 7 years ago

Got the same error flooding my log file

"remoteAddr":"","app":"PHP","message":"Cannot retrieve value of undefined directive Core.AggressivelyRemoveScript invoked on line 352 in file \/var\/www\/nextcloud\/apps\/news\/vendor\/ez$

ezyang commented 7 years ago

What happens if you reinstall HTML Purifier from scratch, by deleting the old directory.

Others reported similar problem at #98

Tealk commented 7 years ago

have update to HTML Purifier 4.9.2 without errors

cubefoo commented 7 years ago

@ezyang // thanks, reinstalling latest version from scratch solved this issue

btw - congrats doctor - quite impressive :)

wwwindisch commented 7 years ago

Hi! I still get the following error in my NextCloud log even after reinstalling HTML Purifier:

Cannot retrieve value of undefined directive Core.AggressivelyRemoveScript invoked on line 352 in file /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer.php at /var/www/nextcloud/apps/news/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Config.php#901

I'm running the News App ver. 11.0.3 on NextCloud 12.0.0.

I can reproduce the error by adding a new feed to the News App (e.g. http://rss.golem.de/rss.php?feed=ATOM1.0). Then one error message is thrown for every entry in the feed.

What I've tried so far:

--> no success...

Reinstalling the News App didn't help either...

Interestingly, I found that the Lexer.php shipped with the News App differs in one line from the one at your repository, although the VERSION file is identical (4.9.2):

Line 99 in the Lexer.php of the News App: if (class_exists('DOMDocument') && Line 99 in the Lexer.php in the repository: if (class_exists('DOMDocument', false) &&

But if this was the reason for the error messages, it would have been solved by reinstalling latest version from the repository... So, after all, I still have no clue, what's wrong...

I'd be thankful for advice on how to solve this issue or how to further analyze the problem.

ezyang commented 7 years ago

@wwwindisch if you can setup an environment that I can SSH into that repros the problem, I'd be happy to take a look.

wwwindisch commented 7 years ago

@ezyang Thanks for your kind offer. I'd need to set up a new installation from scratch in a VM for sharing the SSH login (can't share the one my current machine)...this will take some time (my calendar is really packed during the next weeks... ;-) As a possible alternative: Is there a way to log the data, which is transferred through the interface between the nextcloud news app and HTML Purifier (like some debug log switch)? This could then be used for trying to reproduce the error on a stand-alone version of HTML Purifier...

bodograumann commented 6 years ago

I just solved this issue. All I had to do, was change my nextcloud tables from utf8 to utf8mb charsets. Fortunately there is a convenient nextcloud cli command for that:

./occ db:convert-mysql-charset

I also had to change some settings for the mysql server, but the command gave a reference on what had to be done.