• Downloaded (git clone) files dated 4/6/2017 4:58pm
    Apache, PHP 7.1, WordPress 4.7.3

    I hadn’t yet run any configuration of the plugin. Tried editing a post with PRE tags, when clicked on the Crayon button (in either Visual or Text editing mode) get a white screen for the pop-up.
    Viewing the post looks good (numbered, lines have alternating background, syntax colors)

    PHP Fatal error:  Uncaught Error: Undefined class constant 'SHOW_MIXED' in /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php:327
    Stack trace:
    #0 /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_highlighter.class.php(189): CrayonFormatter::print_code(Object(CrayonHighlighter), '<span class="cr...', true, false)
    #1 /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php(698): CrayonHighlighter->output(true, false)
    #2 /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php(1171): CrayonWP::the_content('<p>Protecting y...')
    #3 /home/USERNAME/public_html/wp-includes/class-wp-hook.php(298): CrayonWP::post_excerpt('<p>Protecting y...')
    #4 /home/USERNAME/public_html/wp-includes/plugin.php(203): WP_Hook->apply_filters('<p>Protecting y...', Array)
    #5 /home/USERNAME/public_html/wp-content/themes/Divi/epanel/custom_functions.php(225): apply_filters('the_excerpt', 'Protecting your...')
    #6 /h in /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 327
    

    http://mydomain.com/wp-admin/options-general.php?page=crayon_settings

    <b>Fatal error</b>:  Uncaught Error: Undefined class constant 'SHOW_MIXED' in /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php:1077
    Stack trace:
    #0 /home/USERNAME/public_html/wp-admin/includes/template.php(1343): CrayonSettingsWP::code(Array)
    #1 /home/USERNAME/public_html/wp-admin/includes/template.php(1302): do_settings_fields('crayon_fields', 'crayon_general')
    #2 /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php(220): do_settings_sections('crayon_fields')
    #3 /home/USERNAME/public_html/wp-includes/class-wp-hook.php(298): CrayonSettingsWP::settings('')
    #4 /home/USERNAME/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #5 /home/USERNAME/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #6 /home/USERNAME/public_html/wp-admin/admin.php(222): do_action('settings_page_c...')
    #7 /home/USERNAME/public_html/wp-admin/options-general.php(10): require_once('/home/USERNAME/...')
    #8 {main}
       in <b>/home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php</b> on line <b>1077</b><br />
    

    Last text displayed: Allow Mixed Language Highlighting with delimiters and tags.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter George wp-website-mastery

    (@lernerconsult)

    http://mydomain.com/wp-admin/options-general.php?page=crayon_settings

    <b>Fatal error</b>:  Uncaught Error: Undefined class constant 'SHOW_MIXED' in /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php:1077
    Stack trace:
    #0 /home/USERNAME/public_html/wp-admin/includes/template.php(1343): CrayonSettingsWP::code(Array)
    #1 /home/USERNAME/public_html/wp-admin/includes/template.php(1302): do_settings_fields('crayon_fields', 'crayon_general')
    #2 /home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php(220): do_settings_sections('crayon_fields')
    #3 /home/USERNAME/public_html/wp-includes/class-wp-hook.php(298): CrayonSettingsWP::settings('')
    #4 /home/USERNAME/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #5 /home/USERNAME/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #6 /home/USERNAME/public_html/wp-admin/admin.php(222): do_action('settings_page_c...')
    #7 /home/USERNAME/public_html/wp-admin/options-general.php(10): require_once('/home/USERNAME/...')
    #8 {main}
       in <b>/home/USERNAME/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_settings_wp.class.php</b> on line <b>1077</b><br />
    

    Last text displayed:
    Allow Mixed Language Highlighting with delimiters and tags. ?

    No Save button for settings.

    Thread Starter George wp-website-mastery

    (@lernerconsult)

    crayon_settings.class.php

    line 67 Changed:

    const TAB_CONVERT = 'tab-convert'; 
    

    To:

    const TAB_CONVERT = 'tab-convert'; const SHOW_MIXED = 'show-mixed';		/* GL Added SHOW_MIXED */
    

    line 205 Changed:

    new CrayonSetting(self::TAB_CONVERT, FALSE),
    

    To:

    new CrayonSetting(self::TAB_CONVERT, FALSE), new CrayonSetting(self::SHOW_MIXED, FALSE),	/* GL added SHOW_MIXED */
    

    Preliminary result: No errors.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Undefined class constant ‘SHOW_MIXED’’ is closed to new replies.