This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Search is not working when audio player is open

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search is not working when audio player is open

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #45298
    TomkaragounisTomkaragounis
    Participant

    Hello Team!
    Congrats on the product of Ajax search! Honestly such a cool plugin for us πŸ™‚

    I have a problem with my website (https://dev2.streamee.gr) which streams background (continues) music on each page. The whole wordpress is a SPA (ajax content) and when I have a player open and listen to music and go to my search page https://dev2.streamee.gr/search, then the search is not being triggered and the results are not being shown.

    Steps to reproduce:
    1. Open https://dev2.streamee.gr/mood/greek-hits
    2. Hit play
    3. From sidebar or footer click on search menu (I have ilink between the link pages so my player not stop), so dont go direct please, use link
    4. Try using search

    I have been busting my mind for a few days in this problem…
    *When I try the same thing, but have an input search of the sidebar, (and audio player is open), then the search work OK.
    *7 years ago you suggested this on a comment on themeforest that had the same problem, I have tried it, but didnt work on my end:

    “I’ve installed the plugin on my test environment, but it was not working with Ajax Search Pro, as it created dynamical content (the results) and these were not recognized by AWS.

    However after checking the AWS code I’ve managed to find a quick workaround without changing any of the plugins code. If I put this code into the active theme footer.php file just before the closing body tag: http://pastebin.com/raw.php?i=RzxBctgk
    ..then it’s working πŸ™‚ This code basically recognizes when the search displays the results and binds the ajaxify() function to it.”

    Please let me know πŸ™‚
    Have a great day!
    Lots of dev lov <3,
    Tom

    #45301
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Tom,

    Well, this is going to be a really tough one. Unfortunately I can’t promise anything, as this is a very special case of combining multiple stuff together.

    Generally I would recommend avoiding live reloading of the whole site contents where possible, I guess in this case it’s not because of the music player.

    I believe the issue is related to the results shortcode here. What I noticed is that for some reason it is completely cleared from the content area and the plugin is not able to push it back.
    Can you try using on the simple plugin shortcode to see how that acts?
    [wd_asp id=1]

    #45305
    TomkaragounisTomkaragounis
    Participant

    Hello Ernest!

    Thanks for reaching out and answering so quickly.
    Yes… you are right.. This conflict of ajax type sites are sooo hard… Can we try together though? I work as developer but honestly I have tried every other solution, like adding the code to header or sidebar (it actually work on sidebar, and loads the content on top of other menu items, while audio player is playing, so thats a good). When tried to add in on header and have it display only on /search page, I had so many conflicts, I had to change approach.

    I made the change but unfortunately, didn’t make any change. You can check the template of the search if you want on streamee-theme/streamee-custom-search.php

    * I also re-enable the input search on sidebar, so you can see it working while audio player is on.
    Please let me know on how could I help πŸ™‚

    Cheers mate,
    Tom

    #45306
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Sure, I will try to help you out as much as I can.

    I still can see a results shortcode container in the left sidebar search, can you please change that shortcode as well?

    Do you have programmatical access to the event where the ajax page loading finishes? If so, then placing this line of code to the event listener function may resolve the problem:

    ASP.initialize()

    #45309
    TomkaragounisTomkaragounis
    Participant

    I got blocked from this site due to code I guess. Gonna try again

    #45310
    TomkaragounisTomkaragounis
    Participant

    Hello,

    I change the sidebar’s shortcode to [wd_asp id=1]

    I dont know exactly where the ajax page loading finishes in the JS files. (I didnt develop this evvironment).
    I tried these 3 solutions to add this after ajax page loading finishes with the below codes, but none have worked:

    https://jsfiddle.net/3uwhL8om/

    The main JS files that is responsible for most of the actions is on streamee-theme/js/streamee.js if you want to take a look.

    Any ideas on how to implement correctly?

    Thank you!

    #45312
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Great, that helped.

    This variation seems to work for me:

    jQuery(document).ajaxComplete(function(event, xhr, settings) {
        ASP.initialize()
    });

    See here: https://i.imgur.com/aVeYrQ1.png

    That should do the trick πŸ™‚

    #45313
    TomkaragounisTomkaragounis
    Participant

    That DID the trick! WOW

    1000 thanks mate! You saved me today. Thank you πŸ™‚

    Lots of dev love,
    Tom

    #45314
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

    #45315
    TomkaragounisTomkaragounis
    Participant

    100% I will do 5 stars.

    Thanks again!

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Search is not working when audio player is open’ is closed to new replies.