WordPress.org

Ready to get started?Download WordPress

Forums

Shortcodes Ultimate
[resolved] Shortcodes Loading before jQuery (7 posts)

  1. novusweb
    Member
    Posted 2 years ago #

    Shortcodes is not working in the text editor correctly: whenever we select a shortcode from the drop-down, nothing is revealed. No js action occurs.

    Console reports an error that the var JQuery can't be found for use in generator.js.

    Looking at the page code, we see this:

    <script type='text/javascript' src='http://www.domain.com/wp-includes/js/l10n.js?ver=20101110'></script>
    <script type='text/javascript' src='http://www.domain.com/wp-content/plugins/shortcodes-ultimate/js/generator.js?ver=3.2.1'></script>
    <script type='text/javascript' src='http://www.domain.com/wp-includes/js/jquery/jquery.js?ver=1.6.1'></script>
    <script type='text/javascript' src='http://www.domain.com/wp-admin/js/utils.js?ver=20101110'></script>

    It looks like generator.js is loading before the jquery library. All other plug-in js comes after this block of code.

    Could this be the cause of the problem? How do we solve it?

    (BTW, it has worked before. This particular MU site has very few plug-ins installed, as it's our internal Wiki site. However, SU is showing the same problem on all MU sites.)

    Thanks.

    http://wordpress.org/extend/plugins/shortcodes-ultimate/

  2. Vladimir Anokhin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for report!

    Please wait for next release. I'll fix it.

    At this moment you can manually solve the problem by editing plugin source code.

    File: shortcodes-ultimate.php, line: 61

    replace this:

    wp_register_script( 'shortcodes-ultimate-generator', su_plugin_url() . '/js/generator.js', false, su_get_version(), false );

    with this:

    wp_register_script( 'shortcodes-ultimate-generator', su_plugin_url() . '/js/generator.js', array( 'jquery' ), su_get_version(), false );

  3. novusweb
    Member
    Posted 2 years ago #

    Thanks. I'll give this a try.

    We really enjoy using these!

  4. novusweb
    Member
    Posted 2 years ago #

    Just tried your fix, and it works!

    Thanks!

  5. Vladimir Anokhin
    Member
    Plugin Author

    Posted 2 years ago #

    Not at all.

    Wait for next release and update. It will contain this changes.

  6. darkpollo
    Member
    Posted 2 years ago #

    Has this been fixed on the latest version 3.3?

    thanks

  7. Vladimir Anokhin
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, it fixed!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic