Muffin Builder Broken

Hi,

pressing "Add Section" in the Muffin Builder does not work anymore. A Java Script exception is thrown:

"Uncaught TypeError: $ is not a function"

In the code you reference JQuery using "$" instead of "jQuery".

Please fix asap. Its not possible to use the MuffinBuilder anymore.

Thank you,

Torsten


Comments

  • Hi,
    Please disable all the plugins, clear cache and try again.
    Thanks.
  • Hi Pablo,

    thanks for your fast answer. Indeed, a plugin called "Site Reviews" seems to cause the exception. When activated, the exception occurs. I contacted the plugin author.

    Anything you could do?

    Regards,

    Torsten
  • Is something not working on your page?
    Cheers.
  • Hi Pablo,

    plug-in author says he's not responsible for the corrupt line. I have two blogs using your theme and both times Muffin Builder breaks when activating the plug-in.

    Can you please install the plug-in and test if the Muffin Builder breaks?


    Plug in:

    https://wordpress.org/plugins/site-reviews/

    Regards,

    Torsten
  • Hi Pablo,

    the plug-in author released an update and the error is gone. For your information, here is what he discovered:

    Ok I have tracked down the cause of the problem.

    Site Reviews’ javascript begins with “var x = jQuery.noConflict();”. This has no longer been needed since v2.0.0 and it is causing problems with the BeTheme.

    To explain what this does, here is an excerpt from the jQuery docs:

    Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If you need to use another JavaScript library alongside jQuery, return control of $ back to the other library with a call to $.noConflict(). Old references of $ are saved during jQuery initialization; noConflict() simply restores them.

    Because Site Reviews is being loaded before the Muffin Builder plugin, it is removing the “$” alias for jQuery which is causing the javascript error.

    Best practice when using jQuery is to not depend on “$” when using multiple javascript libraries. However, regardless of best practice, Site Reviews should not be using the noConflict() function for the very same reason as it doesn’t control what other scripts are being loaded and how they are written.


    Please wait for an update to Site Reviews which will fix this.
  • So, it's time to wait for update.
    Is there anything I can help you with?
    Cheers.
  • The author already released an update and everything works fine.

    My guess is that your programmers still need to fix the line causing the issue by referencing JQuery with $ instead using jQuery.

    Regards!
Sign In or Register to comment.