Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » Uncaught TypeError: e.indexOf is not a function – v2

  • Resolved adminlibreriaurano


    Greetings friends.

    The “Like” button is not activated, it remains in loading mode. And I don’t know how to fix it in my newsmagz (Free) template.

    It gives me this error:
    Uncaught TypeError: e.indexOf is not a function
    And the “I like” does not tell me anything, but it remains totally unloaded.

    OK, If I use Jquery 3.3.1, the function of LIKES, now shown. (The explain is: The load method was obsolete in version 1.8 and removed in version 3 and for this reason it will no longer work for you in 3.3.1, use the following code (as mentioned)

    Ok. How can I modify _inc / build / QueueHandler, to correctly load the function call: $ (window) .on (“load”, function () {});
    Can you help me?
    Or I could suggest adding an If else, if Jquery-3.3.1.min.js is active, execute this other LOAD (LIKES) where $ (window) .on (“load”, function () {} will appear );

    Could you take a look, to repair it in the FREE version of this plugin? …
    More info
    load jQuery

    I have verified that the theme does not have the problem. It is not a problem of the subject, because I have checked it without loading JQuery-3.3.1. And the module loads, but as Jquery says. If you don’t call the LOAD function correctly it won’t work. And in the LIKES code, it is not called correctly as Jquery indicates.


    Newsmagz theme free

    Thank you very much, and I hope you keep improving. JM from Spain.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor csonnek


    Happiness Rocketeer 🚀

    @adminlibreriaurano – it looks like we already answered your question in another support thread.

    The theme you’re using has not been updated in over two years and is likely not compatible with modern versions of WordPress and Jetpack.

    Additionally, Jetpack doesn’t load any custom version of jQuery – we only use the version that ships with WordPress itself so there’s nothing here that we can fix. Any theme or plugin in the directory should be doing the same.

    You would need to audit your theme and other plugins to see which ones are adding the extra, outdated jQuery to your site. You can test by disabling plugins that are not in the plugin directory first as any plugin in the directory uses WordPress’s jQuery instead of setting their own.

    Since this isn’t a problem with Jetpack, we’ll mark this resolved for now.

    Thread Starter adminlibreriaurano



    csonnek thanks for answering me so soon.
    I think I have not explained myself, and if you are right on the subject of Jquery by WP. The LIKES plugin does work on this issue without problems. But when I remove the Function from the theme, the line of code to Jquery 3.3.1. Because if I use Jquery for my news ticker, the LIKES module stays on loading, since it gives an error with e.indexOf. But if I remove Jquery 3.3.1 from my function globally, LIKES doesn’t load … 😀

    Ok I’m going to try to do the same Slide effect, with CSS.

    Thread Starter adminlibreriaurano


    Hello friends.

    the code of error in firefox.
    function JetpackLikesWidgetQueueHandler(){var e;if(jetpackLikesMasterReady){jetpackUnloadScrolledOutWidgets();var t=jetpackGetUnloadedWidgetsInView();t.length>0&&JetpackLikesBatchHandler();for(var i=0,a=t.length;i<=a-1;i++)(e=t[i].id)&&jetpackLoadLikeWidgetIframe(e)}else setTimeout(JetpackLikesWidgetQueueHandler,500)}function jetpackLoadLikeWidgetIframe(e){var t;if(void 0!==e){(t=jQuery(“#”+e)).find(“iframe”)

    I can use this code to unblock the “Loading freezer”?
    $(window).on(“load”, function(e){var i=jQuery(;JetpackLikesPostMessage({event:”loadLikeWidget”,name:i.attr(“name”),width:i.width()},window.frames[“likes-master”]),t.removeClass(“jetpack-likes-widget-loading”));<– (it OK?) continue the line (.addClass(“jetpack-likes-widget-loaded”), this the finish of function load?)

    Many thanks 😀

    Please, only need know this to the theme, work correctly. 😀

    Thread Starter adminlibreriaurano


    I can use, JQuery or $
    jQuery(window).on(“load”, function(e){var i=jQuery(;JetpackLikesPostMessage({event:”loadLikeWidget”,name:i.attr(“name”),width:i.width()},window.frames[“likes-master”]),t.removeClass(“jetpack-likes-widget-loading”));

    jQuery(window).on(“w.fn.load”=function(e,t,n){var r,i,o,a=this,s=e.indexOf(” “);return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&”object”==typeof t&&(i=”POST”),a.length>0&&w.ajax({url:e,type:i||”GET”,dataType:”html”,data:t})
    I can use this? is correctly?…

    Plugin Contributor csonnek


    Happiness Rocketeer 🚀

    @adminlibreriaurano – Troubleshooting these things falls outside the scope of support we can provide in the forums. Since this isn’t a Jetpack problem – because we don’t ship our own jQuery in our plugin – this is more a general WordPress troubleshooting issue.

    I’d recommend reaching out to the WordPress community for guidance on how to resolve your jQuery conflict:

    Thread Starter adminlibreriaurano


    Hello csonnek.
    Ok, understand of the problem not is of WP, and JetPack. Is true, I try another options, and the results is. Exist conflicts between versions of JS and the jetpack code.

    But I try to use the “noconflict JS” and the results not is good. Please helpme 😀
    * Añade JS y CSS al tema
    add_action(‘wp_enqueue_scripts’, ‘registrar_jscss’);
    function registrar_jscss(){

    * Añadimos los archivo para evitar los conflictos con $
    wp_enqueue_script( ‘noconflict’, get_stylesheet_directory_uri() . ‘assets/js/noconflict.js’, array ( ‘jquery’ ), 1.1, true);
    wp_enqueue_script( ‘newsmagz-news-ticker-slider’, get_template_directory_uri() . ‘/assets/js/jquery-3.3.1.min.js’, array( ‘jquery’ ), ‘3.3.1’, true );

    whit noconflict file assets/js/noconflict.js
    whitout file

    I just try that within my function, I can make two independent JS files coexist, so that each thing works. 😀 how can I use “noconflict” correctly. If I can get it to work, this solution will work for a lot of people. So you can use the Newsticker that I use with (jquery-3.3.1 and bootstrap-3.3.5) but I want to comment on one thing. ONLY THE NEWSTICKER WORKS FOR ME, when I register my local jquery-3.3.1 in functions. And I call a different version of Jquery-3.3.1 from the theme “header”. If I don’t put Jquery-3.3.1 in the header, Slide’s effects don’t work: – / buuuaa.

    Please, Please, let’s revive that LINUX spirit, which we had in the 90s and 2000. Where we were looking for a solution at the speed of light. PLEASEEE BY RICHARD STALMAN, PLEASEEEE. :-p

    Thread Starter adminlibreriaurano



    Check my website. (Use Jquery-3.3.1.min.js – news ticker version

    STEP TO FIXED the message to Firefox( load not is a function).:-D

    wp-content / plugins / jetpack / modules/ likes / queuehandler.js
    1 step
    change the code to this.
    $wrapper.find( ‘iframe’ ).on(‘load’, function ( e ) {
    var $iframe = jQuery( );
    2 step
    change the WraperID to WraperId
    ( wrapperId ) all results.

    3 step
    change in the queuehandler.min.js
    wp-content / plugins / jetpack / _inc / build / likes / queuehandler.min.js
    find the line – t.find(“iframe”).load(function)
    And change to this
    t.find(“iframe”).on(‘load’, function
    And save.
    Reload the website. 😀 and enjoy.

    NOTE: Using Jquery-3.3.1-min.js version with news ticker. And it no longer gives conflict. Because this is what firefox tells you. How to fix it. And works.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Uncaught TypeError: e.indexOf is not a function – v2’ is closed to new replies.