Jumplinks jump to wrong locaiton after PRO V2 update

It jumps to wrong direction the jQuery issue is now gone. So it’s only issue where it jumps right now.

See that the according open doesn’t work. See our side bar on a lot of pages now where you can’t open the accordion. Url example shared in secure note.

Hi,

It jumps because there are two js codes with different scroll offset that is being triggered.

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password

You may change your login it immediately after we check.

Thanks

How could it be? This is the only customized javascript we have on the site:

jQuery(document).ready(function($) {
  $('.img-zoom').hover(
    function(e) { 
      $(this).css('z-index','999999999');
    $(this).css('position','relative');

      $('body').addClass( "darken");
    }, function(e) {
       $('body').removeClass( "darken");
    } );  
});
 //
 // Above is dark opacity when hover
 //

jQuery(document).ready(function($) {

  var $body                = $('body');
  var bodyHeight           = $body.outerHeight();
  var adminbarHeight       = $('#wpadminbar').outerHeight();
  var navbarFixedTopHeight = 134;
  var locHref              = location.href;
  var locHashIndex         = locHref.indexOf('#');
  var locHash              = locHref.substr(locHashIndex);
  var dragging             = false;
  
  $body.on('touchmove', function() {
      dragging = true;
  } );
  
  $body.on('touchstart', function() {
      dragging = false;
  } );


  //
  // Calculate the offset height for various elements and remove it from
  // the element's top offset so that fixed elements don't cover it up.
  //

  function animateOffset( element, ms, easing ) {
    $('html, body').animate({
      scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
    }, ms, easing);
  }


  //
  // Page load offset (if necessary).
  //

  $(window).load(function() {
    if ( locHashIndex !== -1 && $(locHash).length ) {
      animateOffset(locHash, 1, 'linear');
    }
  });


  //
  // Scroll trigger.
  //

  $('a[href*="#"]').off('touchend click').on('touchend click', function(e) {
      console.log($('.hm1.x-bar-fixed').outerHeight());
    href        = $(this).attr('href');
    notComments = href.indexOf('#comments') === -1;
    if ( href !== '#' && notComments ) {
      var theId = href.split('#').pop();
      var $el   = $('#' + theId);
      if ( $el.length > 0 ) {
        e.preventDefault();
        
        if (dragging) {
            return;
        }
        
        animateOffset($el, 850, 'xEaseInOutExpo');
      }
    }
  });
});

Hi,

Try to change it with this.

jQuery(document).ready(function($) {
  $('.img-zoom').hover(
    function(e) { 
      $(this).css('z-index','999999999');
    $(this).css('position','relative');

      $('body').addClass( "darken");
    }, function(e) {
       $('body').removeClass( "darken");
    } );  
});
 //
 // Above is dark opacity when hover
 //
 
jQuery(document).ready(function($) {
  $('a[href*="#"]').off('touchend click');
  var $body                = $('body');
  var bodyHeight           = $body.outerHeight();
  var adminbarHeight       = $('#wpadminbar').outerHeight();
  var navbarFixedTopHeight = 134;
  var locHref              = location.href;
  var locHashIndex         = locHref.indexOf('#');
  var locHash              = locHref.substr(locHashIndex);
  var dragging             = false;
  
  $body.on('touchmove', function() {
      dragging = true;
  } );
  
  $body.on('touchstart', function() {
      dragging = false;
  } );


  //
  // Calculate the offset height for various elements and remove it from
  // the element's top offset so that fixed elements don't cover it up.
  //

  function animateOffset( element, ms, easing ) {
    $('html, body').animate({
      scrollTop: $(element).offset().top - adminbarHeight - navbarFixedTopHeight + 1
    }, ms, easing);
  }


  //
  // Page load offset (if necessary).
  //

  $(window).load(function() {
    if ( locHashIndex !== -1 && $(locHash).length ) {
      animateOffset(locHash, 1, 'linear');
    }
  });


  //
  // Scroll trigger.
  //

  $('a[href*="#"]').on('touchend click', function(e) {
      console.log($('.hm1.x-bar-fixed').outerHeight());
    href        = $(this).attr('href');
    notComments = href.indexOf('#comments') === -1;
    if ( href !== '#' && notComments ) {
      var theId = href.split('#').pop();
      var $el   = $('#' + theId);
      if ( $el.length > 0 ) {
        e.preventDefault();
        
        if (dragging) {
            return;
        }
        
        animateOffset($el, 850, 'xEaseInOutExpo');
      }
    }
  });
});

Hope that helps.

Above code still jumps correct but then jump further and to wrong locations.

See that the according open doesn’t work. See our side bar on a lot of pages now where you can’t open the accordion. Url example shared in secure note.

Could you check this as well shared once again in secure note. Plus the white space see in secure note.

Hello there,

Can you share to us your Wordpress User/Pass in a secure note? This is so we can take a closer look of the issues for the jump links and accordion.

Thank you.

Will have a look at this tomorrow.

Let us know how it goes,

Cheers!

Will have a look during the day. thanks

Hi there,

It’s now moved too. Please note that we can only continue the troubleshooting once the credentials are provided. We can’t fully check due to existing custom javascript.

Thanks!

The only custom JS Is the the one you have here in the chat so. But I will create an account for you once I’m done with other issues after the update.

Hey There,

Please do and insert it in a secure note so that we can login and check your site.
It would be easy for us to test and look for error when we do have access to your dashboard.

Thanks for understanding.

Shared in secure note. But as usual know what you doing.

So please check accordion and jump links.

Hi there,

Login credential is incorrect, perhaps, just remove all custom javascript and back it up. All we need is to test it without any active custom javascript so we could test it through browser console.

Thanks!

Sorry Will share correct information in this note.

Hi there,

Could you test it again? It’s now scrolling okay on my end. I did only add stop() before animating the scroll.

Thanks!

Hmm not really good enough it’s not jumping to the headline as it should. Not convenient for the user so not solved yet. Accordion is not 100% working… on a few pages but not on eg the one I share in a secure note.

Hello there,

Another support staff here on duty. :slight_smile: I’ve look deeper into the issue and found a sizzle.js error about a missing '(' tag on the console. Also, I found a missing socket error there. Please see attached image on the secure note. The issue can be resolved on this thread:

Just to let you know as I was logging into your WP dashboard to check further into the accordion issue, I was locked out and got a ERROR: Access from your IP address has been blocked for security reasons. Please contact the administrator.

That message indicates that the login lockdown feature is temporarily blocking me because I must have exceeded the number of login attempts.

For me to get back into logging in, can I request you log into your server and temporarily rename the All In One WP Security & Firewall plugin folder? Then, once you are logged in you can rename the folder back and then unlock my IP address (see secure note) from the Locked IP Addresses tab in the aiowps dashboard menu.

Once done, I’ll proceed with taking a closer look of the issue.

Thank you.

Jumar… you caused sourly issues on our site and can read the thread here: https://theme.co/apex/forum/t/prevent-background-color-on-sides/29056/10 I’m far away from happy with what you caused on our flagship site.

The mixed content is never going to cause a jQuery issue? it’s just red now since chrome take non-http to be considered a major issue since it’s not secured under SSL certificate. This does not cause jQuery issues?

And regarding the sizzle.js what do you mean? Not a fairly good explanation where what how and why.

Hi there,

We are sorry for the inconvenience. We already took some measures and informed our leadership team and they will investigate this matter internally.

Now I what to mention a point about this thread. The problem with the whole case scenario is that the One Page Navigation and scroll to options are not working correctly on Pro at the moment. Now whatever we do and give the band aid solutions will not work well and it might be break soon as our development team is in the process of refactoring the whole code on that section and a complete solution will be available in the upcoming release.

We do not have any more suggestions at the time being as whatever we suggested did not handle the whole picture and there are still problems.

Thank you for your understanding and patience.