JavaScript Library Not Working for WP-Table Reloaded
-
I have JavaScript libary enabled and set to DataTables for WP-Table Reloaded, and sorting and pagination enabled for my table.
This worked fine until I updated to version 3.0.1 a few months ago.
The table displays on the webpage as a static table. The sorting and pagination options have disapeared.
Any suggestions?
-
Hi,
can you provide a link to your page with the table?
Have you changed your theme since you saw it working the last time?
Have you installed any plugins that use JavaScript?Tobias
Here’s the link: https://hardinnorthern.org/?page_id=914
I have not changed my theme or messed with any of the backend of my theme since it last worked.
Below are a list of all my plugins that are active. I have other plugins installed that aren’t active. Could a plugin that is installed and not active cause an issue? I’m pretty sure all of these were installed and active prior to wp-table reloaded not functioning 100%. I’m not sure which ones use JavaScript. Could any of these cause issues? I’m very confident that table reloaded stopped functioning when I upgraded the site from the latest version of MU to 3.0.1. It could be a plugin issue, but I’m not sure how to track it down.
BM Custom Login
Contact Form 7
Flash Video Player
NextGEN Gallery
PJW Mime Config
Podcasting Plugin by TSG
Redirect
Reviionary
Role Scoper
Role Scoping for NextGen Gallery
SI Captcha Anti-Spam
TynyMCE Advanced
User Photo
Wordpress.com StatsHi,
thanks for the link and the plugin list.
The plugins should all be fine, I don’t know of conflicts with them. Installed but deactivated plugins can not cause conflicts, as nothing from them is loaded.
Anyway, the problem is rather simple: The necessary JavaScript libraries are not included into the page. This likely is, because your theme’s footer.php does not contain a call to
<?php wp_footer(); ?>
.
It should be located right before the closing </body> tag there.
Can you check that and insert it, if it is missing?Regards,
TobiasYou’re the man! That fixed it. I’m thinking I had to take that out at one time during my upgrade to WP 3.0.1 to fix another issue, but I can’t remember what that was.
Hi,
no problem ??
The wp_footer(); call is necessary to give plugins a chance to insert code into the page, so you should not remove it, but rather fix the plugin which was creating that other issue back then.
Best wishes,
TobiasHi Tobias,
I’m also having a problem with the javascript libraries not being loaded on the page, but I definitely have wp_footer(); in the theme: I can hook into it and add stuff to it from my functions file.
I’m using Wp-Table Reloaded 1.8 and WP 3.0.4.
I can’t really give you a link to the site because it’s not public yet, and most of the content will be members only, but I hope you can point me in the direction of things to look at.
The other plugins activates are:
AVH Extended Category widgets
Cforms
Event Calendar / Scheduler
Mingle
Poll Daddy Polls
Shadowbox JS
Simple:Press
Social Media Widget
Tooltip Glossary
Wenderhost Subpages Widget
Widget Logic
Wishlist Member
WordPress.com StatsBut I don’t see how they would cause the javascripts not to load… only cause js conflicts after they’ve loaded.
Hope you can help me. Thanks!
Hi,
hhhm, without the site to look at this is really hard to debug unfortunately ??
Please check the following: Is the plugin’s JavaScript loading call included in the resulting page output (i.e. are there
<script>
tags to the DataTables library in the page’s HTML code)?If yes, are the files all accessible from the web or do you maybe get an error message when manually trying to load the file in your browser?
Also, is jQuery loaded properly in the page’s HTML code?
You could also temporarily switch to the WordPress Default Theme to see if things work there (just to make sure that it is not a theme issue).
Regards,
TobiasThanks for your prompt reply Tobias!
I think the problem was that jQuery and UI were being called twice on the page… I’m not sure if that is known to cause errors, but I stopped that from happening and the sorting seems to be working.
Thanks!
Hi,
thanks for your further investigations!
That definitely could be the reason for those issues, as I have heard about the problem of jQuery being loaded twice before. Basically, what happens is that the second copy removes stuff that the first one had created.So, good to hear that this is now working!
Best wishes,
TobiasOh great, I got it… as you wrote:
The
<?php wp_footer(); ?>
should be located right (!!!) before the closing</body>
tag there.Had it in before, but not RIGHT BEFORE the
</body>
Hi,
great that you found the problem. I guess that this solves your question in https://www.ads-software.com/support/topic/plugin-wp-table-reloaded-cant-activate-datatables as well.
Regards,
TobiasHi
I can only get the sort function to work using the tablesorter library.
I really want the search and Pagination functions. I’ve changed the library to DataTables+TableTools and tried the defualt DataTables and selected the relevent option in the table editor but nothing works.
If I can get my table workking like the demo table on this site: https://tobias.baethge.com/wordpress-plugins/wp-table-reloaded-english/
That would be awesomeMy theme does have <?php wp_footer(); ?> in the footer right before </body>.
The plugins I have active are:
Fast Secure Contact Form
Contact Form to DB Extension
HeadSpace2
W3 Total Cache
WP-Table ReloadedAnyone know why This isn’t working?
Thanks
MikeAh it seems it doesn’t work in firefox and that’s the problem
Mike — I had some troubles with the datatables javascript and W3 Total Cache when javascript minification was on. I had to play around with the minification settings a bit, including only having the first setting checked (so not removing line breaks etc). And if you do have javascript minification on, you might need to reorder the way the files are compressed into one file so that any files that are dependent on other files come after the files they’re dependent on.
Also, if you’re using Firefox with Firebug installed, or Chrome, or Safari you can right click on the page and select “Inspect Element”. If there are any errors on the page a red number with a little cross icon will show up at the bottom right of the firebug or inspection window. If you click on that number it should bring up a list of the errors and that may indicate whether there’s a javascript error affecting the page.
Hi,
kristarella, those are very good hints for Mike, thanks for posting them!
Mike, if you still can’t get it to work with those ideas, please post the link to the page with your table, so that we can take a look at it and maybe find the cause for the issue.
Thanks,
Tobias
- The topic ‘JavaScript Library Not Working for WP-Table Reloaded’ is closed to new replies.