Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1219794
    Austin Abell
    Participant

    Hi!

    I am getting an error on all of my pages that seems to pertain to x-customizer-js.

    “Uncaught TypeError: Cannot read property ‘top’ of undefined”

    Whenever I try and go into customizer it just constantly refreshes. Any help on this?

    Thanks,
    Austin

    URL to check: https://centerclub.401kbuddy.com/getting-started/

    #1219795
    Austin Abell
    Participant
    This reply has been marked as private.
    #1219921
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Let us know how it goes.

    Thanks.

    #1220772
    Austin Abell
    Participant

    Just deactivating everything and they same error came up 🙁 the error is coming from this line of code var yloc = $(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top;.

    what does the code below do? maybe I can figure it out if I knew what the code did. thanks

    <script id=”x-customizer-js”>
    (function($){
    var tabnav = location.href.split(“#tab-“).slice(-1)[0];

    if ( tabnav || tabnav != ” ) {

    $( document ).ready ( function() {

    console.log(tabnav);

    var navbar = $(‘.x-navbar’).outerHeight();

    $(‘.x-nav-tabs .x-nav-tabs-item [data-cs-tab-toggle=”‘ + tabnav + ‘”]’).trigger(‘click’);

    setTimeout ( function() { //Let’s trigger the scroll animation just after the content is displayed.

    var yloc = $(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top;
    console.log($(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top);
    console.log(‘tab: ‘ + tabnav + ‘, yloc: ‘ + yloc);

    $(‘html, body’).animate({
    scrollTop: yloc
    }, 850, ‘easeInOutExpo’);

    }, 750 );

    } );

    }

    #1220955
    Rupok
    Member

    Hi there,

    Are you using Tabs element or shortcode in any page?

    Let us know. You can ignore the error for now if you have other pending development because it won’t affect anything else.

    Thanks!

    #1220971
    Austin Abell
    Participant

    I do use shortcodes on some pages but don’t think I use tabs element. The reason I was concerned was when I go into cusomizer it just continually refreshes and makes it hard to make changes. Good to know it wont affect anything else!

    #1221048
    Joao
    Moderator

    Hi There,

    Let us know if you need further help,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1219794 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>