WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] DataTables FixedHeader, DataTables Sorting plugins, search option are no long (30 posts)

  1. longnha
    Member
    Posted 10 months ago #

    Hello,

    DataTables FixedHeader, DataTables Sorting plugins, search option are no long on big table.

    At first I thought that it was problem with W3 Total Cache again so I tried to disable the plugin but it still the same. Those functions work on small table but not on big table with 200 rows.

    When check the page source, I still see TablePress JS.

    The most recent change I had that is upgrade to latest Genesis Version: 2.0.1 ยท Released: August 21, 2013. I'm not sure if it cause the problem.

    I hope you could have a look into this.

    Thank you.

    http://wordpress.org/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    Could you please post a link to the page with the table that's not working, so that I can have a direct look? Thanks!

    Regards,
    Tobias

  3. longnha
    Member
    Posted 10 months ago #

    Yes, here is not working table:

    http://www.digitalcashpalace.com/forex-brokers-comparison/

    Hope you can figured out something. Thank you.

  4. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    thanks for the link! I think that this is related to the script minification in W3 Total Cache. Can you please try again after turning that off. It looks like the jQuery JS library gets garbled by that...

    Also, there's PHP code visible in the page

    <?php
    wp_deregister_script('jquery');
    wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
    wp_enqueue_script('jquery');
    ?> <?php
    wp_deregister_script('swfobject');
    wp_register_script('swfobject', 'http://ajax.googleapis.com/ajax/libs/swfobject/2/swfobject.js');
    wp_enqueue_script('swfobject');
    ?>

    that should not be there. Please check if you see that in your theme's "header.php" and delete it.

    Regards,
    Tobias

  5. longnha
    Member
    Posted 10 months ago #

    Hi Tobias,

    I deleted those PHP code that you mentioned and disable Minify feature in W3 Total Cache but it still does not work.

    I had another table and it work fine:

    http://www.digitalcashpalace.com/binary-options-brokers/

    The only different that the first table seem bigger!

    Thank you.

  6. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    ok, thanks for deleting that, and for turning off the minification for now.

    Indeed, it looks like this is not the reason for this. Instead, the problem seems to be that the Shortcode is evaluated twice on the page. For the small table, that does not matter, as that's not using the FixedHeader Extension. The bigger table however does use the FixedHeader Extension, and that doesn't like being evaluated twice.

    You should therefore try to find out why the Shortcodes on the page are evaluated twice. My assumption is that this is done by your theme, so please start by switching to the WordPress default theme TwentyFourteen temporarily.

    Regards,
    Tobias

  7. longnha
    Member
    Posted 10 months ago #

    Hi Tobias,

    Thank you very much for your support.

    I switched to default theme and test but the result is still same. So, the problem may not lie within the theme.

    I tried to disable fixed header and just use normal TablePress code, the Search and Sorting functions back to work as normal. So, I think the problem come from the fixed header plugin or the two plugin FixedHeader and DataTables Sorting plugins just do not work well together.

    I hope you can figure out where the problem lie.

    Thank you.

  8. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    thanks for checking this! That then means that another plugin is causing the double-evaluation of the Shortcode.
    If you check near the bottom of the HTML source of the page ("View source" in the browser), you will see this:

    $('#tablepress-11').dataTable({"aaSorting":[],"bSortClasses":false,"asStripeClasses":['even','odd'],"bPaginate":false,"bInfo":false});
    $('#tablepress-11-no-2').dataTable({"aaSorting":[],"bSortClasses":false,"asStripeClasses":['even','odd'],"bPaginate":false,"bInfo":false});

    and that's too much.

    The problem is not directly in the FixedHeader Extension, that's just affected by this, as the first evaluation of the Shortcode is "thrown away".

    So, if this is not caused by the theme, it's another plugin. Please try disabling all other plugins except TablePress one by one, until there's only

    $('#tablepress-11').dataTable({"aaSorting":[],"bSortClasses":false,"asStripeClasses":['even','odd'],"bPaginate":false,"bInfo":false});

    in the HTML source of the page.

    Regards,
    Tobias

  9. longnha
    Member
    Posted 10 months ago #

    Hi Tobias,

    Thanks for your suggestion, I found the plugin that cause the problem: WordPress SEO by Joost de Valk. Disable the plugin - shortcode generated one, enable it - twice.

    Could you figure out how to fix it? or I need to contact WordPress SEO author to inform about the error?

    Thank you.

  10. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    great find! :-)
    That's what's causing the problem then!

    Yes, please contact Joost about this then. I know of many plugins that do the same as TablePress (namely print JavaScript code to the page when the Shortcode is evaluated), so that this likely affects a lot of sites.
    I'll also dive into the WordPress SEO code to see if I can find the exact cause and maybe a workaround.

    Regards,
    Tobias

  11. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    I already found something. The problem seems to stem from the call to do_shortcode() in the function WPSEO_OpenGraph::image() in the file "/frontend/class-opengraph.php" of WordPress SEO.
    That indeed evaluates the Shortcode, but throws the output away. However, TablePress will then enqueue the JS code, which is the only option.

    I'm not sure what the reason is for WordPress SEO to evaluate the Shortcodes there...

    Regards,
    Tobias

  12. longnha
    Member
    Posted 10 months ago #

    Hi Tobias,

    Great find. As you found the problem come from WPSEO_OpenGraph, I tried to disable "Add Facebook Open Graph meta data" and the shortcode is no longer double-evaluation.

    I guess the problem is solved now.

    Thank you.

  13. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    great idea again! :-) Good to see that the plugin allows to deactivate this! :-)

    And even better that you were now able to enable the FixedHeader Extension and the Minification again! :-)

    Best wishes,
    Tobias

  14. karivan
    Member
    Posted 10 months ago #

    Hi,
    I have a similar problem and I think it came after I installed WP 3.6. I lost possibilities to sort and search in table. I can send you some exported file if you give me email where to send.
    Affected page is here
    http://nuuksioclassic.com/ilmoittautuminen/osanottajat/

    Best Regards,
    Kari

  15. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi Kari,

    thanks for your post, and sorry for the trouble.

    No, from what I can see, there's something wrong in your theme. The footer is not being loaded properly.

    To find out more about this, please try changing the "WP_DEBUG" constant to "true" in the wp-config.php file on the server.
    Then, please check if you are seeing an error message at the bottom of the page.

    If that does not help, please temporarily switch to the WordPress default theme Twenty Thirteen, to see if it's working there. Thanks!

    Regards,
    Tobias

  16. karivan
    Member
    Posted 10 months ago #

    Thanks,
    I chanced it, but now I got extra text in the page

  17. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    ok, thanks!

    From this, I think the problem is caused by the "Anflex GA - Google Analytics for WordPress" plugin. Could you please deactivate that for a test?

    Regards,
    Tobias

  18. karivan
    Member
    Posted 10 months ago #

    Hi,

    Deactivated, but no effect.

    Thanks,
    Kari

  19. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    ok, I think, we are getting closer :-)

    Then it's indeed not that plugin, and you can reactivate it again.
    Now, please switch to the Twenty Thirteen theme, to see if the footer loads there.

    Regards,
    Tobias

  20. karivan
    Member
    Posted 10 months ago #

    Hi,

    Theme footer loads there, but Tablepress has the same problem.

    Thanks,
    Kari

  21. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    can you please leave the Twenty Thirteen theme activated, so that I can take a look what's different there?

    And from what I can see, you are using TwentyTen now. Did you make any modifications to that? It looks like the footer.php is not loaded.

    Regards,
    Tobias

  22. karivan
    Member
    Posted 10 months ago #

    Hi,

    Ok, now it is activ

    Thanks,
    Kari

  23. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    ok, thanks for that! This has the same problem, with the footer not being loaded, so this issue is not caused by the themes, but must be in one of the other plugins.

    We'll therefore have to find that plugin... To do that, please deactivate other plugins (except TablePress) one by one, and check if the sorting works, each time.

    You can also switch back to your original theme again.

    Regards,
    Tobias

  24. karivan
    Member
    Posted 10 months ago #

    Hi,

    Ok, I will try.

    Thanks,
    Kari

  25. karivan
    Member
    Posted 10 months ago #

    Hi,

    It seems, that NextGEN Galleryview was the problem.

    Thanks,
    Kari

  26. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    yes, it looks like it! Nice find!
    Indeed, everything is working now, and the HTML footer is in the page again :-)

    Regards,
    Tobias

  27. karivan
    Member
    Posted 10 months ago #

    Hi,

    Thanks a lot about this! Are you going to contact Nexgen or what will we do that we can get both plugin would work.

    Thanks,
    Kari

  28. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi Kari,

    sure no problem!

    This is not really a problem of "getting both plugins to work", but more a "NextGen Galleryview needs a fix". (This problem in that plugin is not only breaking TablePress but also others.)
    Therefore, I'd like to leave contacting the NextGen devs to you, as this is not a direct problem with TablePress and I just don't have time to deal with other plugins. The Galleryview plugin seems to have a more general problem that somehow breaks the footer of every page (as you could see, it was a problem in several themes).
    Unfortunately, I'm not that optimistic that they can or will do something about this in the near future. The original NextGEN plugin is now developer by a company, and I don't know if they support this add-on as well.

    Regards,
    Tobias

  29. karivan
    Member
    Posted 10 months ago #

    Hi,

    OK, thanks for the information. I will contact to NexGen.

    Best Regards,
    Kari

  30. TobiasBg
    Member
    Plugin Author

    Posted 10 months ago #

    Hi,

    that sounds good! I hope that they can fix their plugin, so that you can use it without it breaking other things!

    Best wishes,
    Tobias

Reply

You must log in to post.

About this Plugin

About this Topic