Problem (Conflict) with scroll bars

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Problem (Conflict) with scroll bars

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9545
    dgaeman
    dgaeman
    Participant

    We have been using Ajax Search Pro and WooCOmmerce Ajax Product Filter (BeRocket) for months without a problem. After the last update the scroll bars no longer work on the Ajax Product Filter. I spoke to them and they found that you are both using the same jQuery addon:

    Main problem, that both of the plugins uses same jQuery addon to create scrollbar. You can try to remove this addon from one of the plugin, but this can cause some other problem.

    wp_enqueue_script( ‘berocket_aapf_widget-scroll-script’, plugins_url( ‘js/scrollbar/Scrollbar.concat.min.js’, __FILE__ ), array( ‘jquery’ ), BeRocket_AJAX_filters_version );

    I tried removing their line but that didn’t work. Do you have any thoughts or ideas?
    We would like to continue using both products.
    Thanks,
    Darryl

    #9546
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I’ve tried to access the site url you provided, but I’m getting a wordfence error: https://i.imgur.com/KgjwGtG.png
    Can you please authorize viewing of the site?

    I have a few ideas on resolving this. Until I can see the site, I can only guess.

    Solution 1: Changing javascript source
    On the Compatibility Options panel, try changing the Javascript Source to “Minified Scoped” to see if that changes anything. If not, then try the other options as well: https://i.imgur.com/Vyy4tjF.png

    If this doesn’t work:

    Solution 2: Disabling the scrollbar in Ajax Search Pro
    i.) For that first you will have to change the Javascript Source option to non-minified: https://i.imgur.com/WIij5hS.png
    ii.) Then open the wp-content\plugins\ajax-search-pro\includes\classes\core\class-asp-init.php file, and remove lines 132-133:

    
    wp_register_script('wpdreams-scroll', ASP_URL . 'js/' . $js_source . '/jquery.mCustomScrollbar.js', array($prereq), $media_query, $load_in_footer);
    wp_enqueue_script('wpdreams-scroll');
    

    These are guesses only, but I hope one of them will actually work.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #9547
    dgaeman
    dgaeman
    Participant

    What country are you loging in from?

    #9548
    dgaeman
    dgaeman
    Participant
    You cannot access this content.
    #9549
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you, I was able to find a solution.

    For future reference, I’ve changed lines 132-138 in the wp-content\plugins\ajax-search-pro\includes\classes\core\class-asp-init.php file to:

    if ( 
      !wp_script_is('berocket_aapf_widget-scroll-script') && 
      !wp_script_is('berocket_aapf_widget-scroll-script', 'registered')
    ) {
      wp_register_script('wpdreams-scroll', ASP_URL . 'js/' . $js_source . '/jquery.mCustomScrollbar.js', array($prereq), $media_query, $load_in_footer);
      wp_enqueue_script('wpdreams-scroll');
    }

    The problem might have been caused because ajax search pro uses a newer version of the scrollbar script. Luckily it’s backwards compatible, so it will work with the older version as well.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #9560
    dgaeman
    dgaeman
    Participant

    Ernest,

    Thanks for your help!! Seems to have solved the issue. Appreciate it….

    -Darryl

    #9561
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Problem (Conflict) with scroll bars’ is closed to new replies.