TablePress and Responsive Child: Javascript issues
  • I am cross-posting this Support-questions on Responsive and TablePress forums

    Hi,
    I am currently rebuilding the website of a small academic conference I am involved in. I am building it as a child theme on Responsive and am using TablePress to build a sortable archive over previously published papers in earlier editions of the conference. So far so good.

    However, during one of the later updates of the two plug-ins one has done some change which makes it not play nice with the other anymore. The table shows as it should, reads it CSS and so on. However, the javascript doesn't work - that is, no sorting and no searching which were the main reasons I opted for this plugin. When I first installed the two plugins several months ago the javascript did work. Since then I updated both as well as wordpress to the latest versions and now the javascript part doesn't work anymore.

    As the site isn't live yet and I am building a new theme on the new web page I can't provide a link, but when I change the theme displayed (with the help of "Toolbar Theme Switcher" plugin (only one link allowed)) I notice the problem is linked to Responsive and TablePress somehow. Neither the child theme nor the original Responsive theme display the javascript-parts of the table, but all my other installed themes do so. I even added the wp_footer()-function in my child theme as it isn't in the normal Responsive-them, but to no avail.

    Any ideas?
  • Hi,

    Not really sure if this is related to Responsive and leaving the topic to the plugin author. If it turns out that there's something with the Theme, please let me know.

    Thanks,
    Emil
    segelstrom wrote:
    I am cross-posting this Support-questions on Responsive and TablePress forums

    Hi,
    I am currently rebuilding the website of a small academic conference I am involved in. I am building it as a child theme on Responsive and am using TablePress to build a sortable archive over previously published papers in earlier editions of the conference. So far so good.

    However, during one of the later updates of the two plug-ins one has done some change which makes it not play nice with the other anymore. The table shows as it should, reads it CSS and so on. However, the javascript doesn't work - that is, no sorting and no searching which were the main reasons I opted for this plugin. When I first installed the two plugins several months ago the javascript did work. Since then I updated both as well as wordpress to the latest versions and now the javascript part doesn't work anymore.

    As the site isn't live yet and I am building a new theme on the new web page I can't provide a link, but when I change the theme displayed (with the help of "Toolbar Theme Switcher" plugin (only one link allowed)) I notice the problem is linked to Responsive and TablePress somehow. Neither the child theme nor the original Responsive theme display the javascript-parts of the table, but all my other installed themes do so. I even added the wp_footer()-function in my child theme as it isn't in the normal Responsive-them, but to no avail.

    Any ideas?
  • Hi Emil,
    after running the tests suggested by the Theme Author (see http://wordpress.org/support/topic/tablepress-and-responsive-theme?replies=4#post-3753507 ) it turns out that the javascript-errors I am getting seem to be originating from Responsive. Also, see this screenshot for what Chrome has to say; http://servdes.org/javascripterrors.jpg

    Thanks,
    Fabian
  • Hi Fabian,

    As Tobias mentioned the problem is most likely another plugin that is loading the latest jquery. It is not good practice to load your own jquery. If you could share your site with responsive showing then I could help you find that plugin.

    @Emil Uzelac the js code is not compatible with jquery 1.9. You can see the errors here.

    Ulrich
  • A small update; by copy-pasting the code generated by wp_footer and using it instead of wp_footer I managed to identify that the issue is located in responsive-plugins.js?ver=1.2.2'. As I however do not know javascript, I do not really know how to continue from there on. I'll see if I can find which function it is in that file by editing out the various scripts in responsive-scripts...

    @grappler: The problem is that the site isn't live yet and I am testing in the background. If the issue isn't solved by alunch time (in a week or two) I'll share the page here...

    EDIT: I first did a copy-paste error on the file name where the error preventing the table JS from loading properly is located. The right file is plugins as it says now.
  • OK, I am seriously confused as to why and how this works. But it does.

    If I go into responsive-plugins.js and edit and just change the order so that the function named Responsive Menu (TinyNav) is the first of the four functions listed in responsive-plugins.js the javascripted aspects of the TablePress plug-in works. If I let one of the three other functions in that file come prior to TinyNav, the plugin javascript doesn't work.

    That however leads me to another question; I tried creating a js subfolder with my edited version of responsive-plugins.js in it, but wp_footer still makes calls on the Responsive mother them for the JS. Is there any way I can set it up so that it calls on my child theme? Or will I have to remember to change the order in responsive-plugins.js each time I update Responsive (yes, one option would be to stop updating the theme).
  • Interesting, we will look at this but I do think you should find the plugin that is loading the latest jquery as it could hurt at a later stage also.

    Here is how to load the scripts from the child theme.

    Ulrich

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

    Most Popular This Week