Skip Navigation

[Closed] Search or pagination function break display

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by pierre.s 5 years, 4 months ago.

Assigned support staff: pierre.s.

Author
Posts
#303778

Views display works fine. However once we run a search or pagaination our video player/mp3 player break. They work fine without search or pagination. More details below in "private"

#303780

Can you please setup this thread to post private information? Thank you.

#304046

The site is protected and I would prefer to post this privately on the forum. I do not see the link on the "reply to" page to do this.

#304217

pierre.s
Supporter

Hello,

Thank you for your message!

Your next reply will be private.

Regards,
Pierre

#304220

Thanks. It still shows public.

#304226

pierre.s
Supporter

Can you see a private reply now?

#304530

pierre.s
Supporter

Hello Sammut,

Maybe you didn't received my previous reply.
Do you manage to see a private reply?

Regards,
Pierre

#304649

pierre.s
Supporter

Hello,

Thank you for your message!

I tested the search on your site and I think we have 2 cases:

#1 Audio blocks
Audio block are simply hidden. I don't know why, but it's just a CSS issue. An easy workaround is to add this CSS rule:

.wp-audio-shortcode {
    visibility: visible!important;
}

#2 Video blocks
The FV plugin suggest that the JavaScript is broken but I don't see any JS errors actually,

Finally, I managed to reproduce this issue on my test site, but it goes fine when I use a full page refresh on search.

I think the Ajax is the reason why these features doesn't work. Usually, after having refreshed the content with the AJAX results, we should fire some function to make the audio/video plugins handle those new elements in the DOM.

With the JS library embedded with WordPress (mediaelement.js), I found a workaround which is to fire this function when the search results are refreshed with Ajax.

In the custom JS, add this function:

function init_ajax_audio_video() {
  jQuery( 'video, audio' ).mediaelementplayer();
}

Then, for "How do you want to update the results?" select "Let me choose individual settings manually". In the advanced settings, add the function "init_ajax_audio_video" to "will run after updating the results". This setup should fix case 1 and 2.

As you are using a 3rd part plugin (FV or JW), I am not sure of which function to fire to init the audio/video elements again. Maybe you can get information from the plugin's support.

Let me know if this helps.

Regards,
Pierre

The topic ‘[Closed] Search or pagination function break display’ is closed to new replies.