Hi,
thanks for your post, and sorry for the trouble.
This is a little bit tricky. TablePress is indeed not active during AJAX requests (because that is usually not necessary). In your case, this might however be a valid use case. I’ll therefore need to look at the Hello AJAX tabs plugin in more detail, to see what exactly it needs.
I’ll reply again later, once I’ve had time to investigate this in more detail.
Regards,
Tobias
Thread Starter
grios
(@grios)
Thank you! I appreciate you taking the time to investigate.
Hi,
sure, no problem! I’m also interested in this personally. I’m pretty busy at the moment, but should have some results this weekend.
Regards,
Tobias
Hi,
I have now looked into this a little bit, but could not go too deep, as Hello AJAX Tabs seems to be a commercial plugin, so that I can’t dive into the code.
The best way to fix this issue for you should be some custom code, that basically tells TablePress to load its Shortcode routines on such AJAX requests as well. This is not guaranteed to work 100%, but it should. Please try adding this to the “functions.php” of your theme:
add_action( 'tablepress_run', 'tablepress_hello_ajax_tabs_loader' );
function tablepress_hello_ajax_tabs_loader() {
TablePress::load_controller( 'frontend' );
}
Regards,
Tobias
Thread Starter
grios
(@grios)
Thank you Tobias,
I tried the code you suggested, added as is into the theme functions.php
Result was I got the following error in place of the table inside the ajax tabs:
Fatal error: Call to undefined method TablePress_Admin_AJAX_Controller::shortcode_table()
I should note that here I’m calling the table via php inside a shortcode from a membership plugin, hope this helps with any possible solutions.
Hi,
thanks for trying. That’s a strange error and I’m not really sure why this is happening then 🙁
Can you show me in more detail how you are calling the table?
Regards,
Tobias