WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
[resolved] Toolbar not working (8 posts)

  1. Progi1984
    Member
    Posted 1 year ago #

    Hi after update WordPress in 3.5.1, I updated Crayon to the last version.

    But after test, I see that the toolbar is not working.

    Why ? It seens that the script js are not called.

    http://wordpress.org/extend/plugins/crayon-syntax-highlighter/

  2. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    Can you provide a URL for me to debug?

  3. Progi1984
    Member
    Posted 1 year ago #

  4. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    See if it works on the default wordpress template - it may be a theme issue.

  5. Progi1984
    Member
    Posted 1 year ago #

    Yes I just find the problem.
    Before the wp_head function, i use this code
    <?php if ( !is_admin() ) wp_deregister_script('jquery'); ?>

    Because I use my version of jquery.

    So if I deregister jquery script (same if I use my own script), that disables crayon script.

  6. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    Yep, that's a good find! I'll add that to the online docs. Instead of printing a <script> tag, register the new jquery with:

    wp_register_script('jquery', 'url/of/your/jquery');

    Since jquery doesn't exist as a script, all scripts that depend on it will fail to load. This is done internally in wordpress and I don't have control over it. I assume it doesn't want to load just in case it throws errors, but I would rather throw errors that are very obvious and easy to find rather than dying silently, but I guess that fits in nicely with PHP :S

  7. Progi1984
    Member
    Posted 1 year ago #

    I confirm that solves my problem.

    Thanks for your help

  8. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    No problem!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic