• Resolved Jan

    (@locke85)


    Hi Bob,

    we are using the Chained Quiz Plugin on a WordPress Multisite and ran into the following “Critical error”:

    thrown in /home/wp/disk/wordpress/wp-content/plugins/chained-quiz/helpers/htmlhelper.php on line 88#7 {main}#6 /home/wp/disk/wordpress/wp-admin/admin.php(259): do_action()#5 /home/wp/disk/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()#4 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()#3 /home/wp/disk/wordpress/wp-includes/class-wp-hook.php(324): ChainedQuizQuizzes::manage()#2 /home/wp/disk/wordpress/wp-content/plugins/chained-quiz/controllers/quizzes.php(11): ChainedQuizQuizzes::edit_quiz()#1 /home/wp/disk/wordpress/wp-content/plugins/chained-quiz/controllers/quizzes.php(48): ChainedQuizQuiz->save()#0 /home/wp/disk/wordpress/wp-content/plugins/chained-quiz/models/quiz.php(52): chained_strip_tags()Stack trace:[04-Mar-2024 15:13:05 UTC] PHP Fatal error: Uncaught Error: Undefined constant "WATUPRO_UNFILTERED_HTML" in /home/wp/disk/wordpress/wp-content/plugins/chained-quiz/helpers/htmlhelper.php:88

    Use Case: Site Admins cannot create new quizzes or modify existing quizzes (e.g. that were created by Super Admins or that were imported via SQL into the database).

    The above error message refers to this function in the htmlhelper.php:

    function chained_strip_tags($content) {
       if(!current_user_can('unfiltered_html') and WATUPRO_UNFILTERED_HTML != 1) {
    		$content = strip_tags($content, '<b><i><em><u><a><p><br><div><span><hr><font><img><strong>');
    	}
    	
    	return $content;
    }

    We added the following to the wp-config.php as a temp fix:

    define('WATUPRO_UNFILTERED_HTML', '');

    We kindly ask you to provide a permanent fix for this issue in the next version of the plugin and provide further guidance as to why this issue occurs.

    Thanks,

    Jan

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bug in function chained_strip_tags’ is closed to new replies.