Project

General

Profile

Bug #4869

HTMLPurifier warning in questions categories

Added by Yannick Warnier about 8 years ago. Updated almost 8 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/06/2012
Due date:
% Done:

80%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

When creating a question category, I was faced with thed following error (I believe it's because of the HTML area in the category description, and personally I don't think it needs to be a multimedia area, so this could be very easy to fix:

[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP Warning:  Element 'noscript' is not supported (for information on implementing this, see the support forums)  in /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php on line 265, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   1. {main}() /var/www/chamilo/main/exercice/tests_category.php:0, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   2. add_category_form() /var/www/chamilo/main/exercice/tests_category.php:46, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   3. Security::remove_XSS() /var/www/chamilo/main/exercice/tests_category.php:168, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   4. HTMLPurifier->purify() /var/www/chamilo/main/inc/lib/security.lib.php:322, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   5. HTMLPurifier_Generator->__construct() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier.php:127, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   6. HTMLPurifier_Config->getHTMLDefinition() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/Generator.php:59, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   7. HTMLPurifier_Config->getDefinition() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/Config.php:330, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   8. HTMLPurifier_Definition->setup() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/Config.php:413, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   9. HTMLPurifier_HTMLDefinition->doSetup() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/Definition.php:45, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP  10. HTMLPurifier_HTMLDefinition->setupConfigStuff() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php:167, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP  11. trigger_error() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php:265, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP Warning:  Element 'script' is not supported (for information on implementing this, see the support forums)  in /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/HTMLDefinition.php on line 265, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   1. {main}() /var/www/chamilo/main/exercice/tests_category.php:0, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   2. add_category_form() /var/www/chamilo/main/exercice/tests_category.php:46, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   3. Security::remove_XSS() /var/www/chamilo/main/exercice/tests_category.php:168, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   4. HTMLPurifier->purify() /var/www/chamilo/main/inc/lib/security.lib.php:322, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   5. HTMLPurifier_Generator->__construct() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier.php:127, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
[Sat Jun 09 20:20:04 2012] [error] [client 127.0.0.1] PHP   6. HTMLPurifier_Config->getHTMLDefinition() /var/www/chamilo/main/inc/lib/htmlpurifier/library/HTMLPurifier/Generator.php:59, referer: http://my.chamilo.net/main/exercice/tests_category.php?action=addcategory
This happens, in order, with:
  • noscript
  • script
  • html
  • head
  • body
  • type attribute
  • xmlns attribute
  • profile attribute
  • alink attribute
  • background attribute
  • bgcolor attribute
  • link attribute
  • text attribute
  • vlink attribute

It doesn't always show, so I suppose there is some specific step required, like clicking the textarea or something like that, but the stack trace should definitely help locating it.

Associated revisions

Revision 125d5e10 (diff)
Added by Julio Montoya almost 8 years ago

Using $form->add_html_editor() instead of $form->addElement('html_editor'...) see #4869

History

#1

Updated by Laurent Opprecht about 8 years ago

Looks like there is an issue with the configuration of html purifier. This happens only the first time - due to caching - so it is necessary to disable caching. When disabling caching and removing the static the same issue happens every time for each variable.

#2

Updated by Julio Montoya almost 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#3

Updated by Julio Montoya almost 8 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Yoselyn Castillo
  • % Done changed from 0 to 80

Should be fixed now

#4

Updated by Yoselyn Castillo almost 8 years ago

  • Assignee changed from Yoselyn Castillo to Julio Montoya

There is still a problem, when i tested the first time the warning appeared, later, it worked fine, and now i can't reproduce the bug

#5

Updated by Julio Montoya almost 8 years ago

  • Assignee changed from Julio Montoya to Yoselyn Castillo

mmm weird, did you have the latest files?
You have to logout from the platform and then try to create a category, no warning should be appear now

#6

Updated by Yoselyn Castillo almost 8 years ago

  • Status changed from Needs more info to Bug resolved
  • Assignee deleted (Yoselyn Castillo)

It is really strange, because when i entered the platform for first time, it occurred but later i have entered and loged out several times and it nothing happens. Thus,i assume it is solved.

Also available in: Atom PDF