• Resolved pbsbluejay

    (@pbsbluejay)


    Hello,

    I have been using TablePress for a number of years on the same free 3rd party WP theme (Semiologic Pinnacle Version: 2.0) that never updates. On 9/22/16, I started getting the DataTables warning: table id=tablepress-1 error. After doing some research, I found what could be a solution by Tobias…

    “This is indeed an issue in your theme. For some reason, it’s printing the JS in the footer twice. It seems that it’s calling the wp_footer(); function twice, or a related filter hook or action.”

    I looked in the footer.php file of the Semiologic Pinnacle theme to see whether or not there were two wp_footer(); but only one was there. There is no other wp_footer(); that I could see in any other Semiologic Pinnacle theme file, so I’m at a lost.

    By the way, I used the following browsers to see whether or not the same issue occur: Google Chrome, IE & Mozilla Firefox. I even disabled all plugins and cleared each web browser cache. The DataTables warning: table id=tablepress-1 issue appears to be intermittent; it doesn’t always appear on every browser. I only created one TablePress table.

    However, when I used a different WP free theme the issue never appeared when using any web browser. It seems the issue is indeed related to my Semiologic Pinnacle theme. Just can’t understand after all this time using TablePress, without experiencing any major issues, why this issue is showing up now.

    Here is the shortcode I’m using: [table id=1 datatables_scrolly="500px"/] at internettvdotcom(DOT)com/internet-tv-software

    Any help would be greatly appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    It seems like you are using a RocketScript plugin here. Can you therefore please try again after temporarily deactivating all other plugins and after switchting to a WordPress default theme like Twenty Sixteen? That way, we can find what’s causing this.

    Regards,
    Tobias

    Thread Starter pbsbluejay

    (@pbsbluejay)

    Thanks Tobias for getting back.

    Yes… I have been using the WP Rocket caching plugin for quite some time. Never have I experienced a dataTables warning, until now.

    The issue seems to appear more so in Mozilla Firefox when visiting the url where TablePress appears… internettvdotcom(DOT)com/internet-tv-software

    However, when I use Mozilla Firefox incognito the issue never appears, from what I have noticed so far. When I activated the default Twenty Thirteen WP theme with all plugins activated the dataTables warning does not appear anymore. I know the issue is related to the Semiologic Pinnacle Version: 2.0 theme.

    I don’t know what could have caused my theme to change. The theme never updates. There was, however, an automatic Windows security update. Right after is when I started getting the dataTables warning. Can’t see how this is related.

    The issue does appear in IE browser but hasn’t appeared in Google Chrome as of late.

    If you still want me to activate the default WP theme and deactivate all plugins again, let me know when to do so. I don’t want to lose sales. Or provide whatever suggestions you may have that I may try to do myself to resolve this issue.

    Thanks

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    it’s up to the browser to decide whether the warning actually appears. The root cause is that the TablePress JS code is embedded into the page twice.
    We need to find out what’s embedding it for a second time.

    You can see this code when using “View Source” in the browser and then searching for “datatable(“. You will see two identical lines, but that line should only be there once.

    So, please turn off all plugins one by one (starting with WP Rocket) and each time, check if the second line goes away after refreshing the page and using “View Source”.

    Regards,
    Tobias

    Thread Starter pbsbluejay

    (@pbsbluejay)

    Hello Tobias,

    Really appreciate the help.

    I do see two of the following code in the Page Source…

    $('#tablepress-1').dataTable({"stripeClasses": [],"ordering":false,"paging":false,"searching":false,"info":false,"scrollX":true,"scrollY":"500px","scrollCollapse":true});
    });

    internettvdotcom(DOT)com/internet-tv-software

    As per your instructions…

    I deactivated each plugin, one after the other, with exception to TablePress, and checked the Page Source after each deactivation. However the code above still appeared twice, after each plugin deactivation.

    I also put Cloudflare on pause and temporarily removed some of the hard code scripts in the footer to see whether or not the duplicate code datatable( would only show one time. But it still appeared twice.

    As of now, all plugins are still deactivated, with exception to TablePress, and Cloudflare is still on pause. I’ll leave everything as is for awhile for you to check.

    Anymore suggestions will be greatly appreciated. I will continue to try to resolve the issue.

    • This reply was modified 7 years, 9 months ago by pbsbluejay.
    • This reply was modified 7 years, 9 months ago by pbsbluejay.
    • This reply was modified 7 years, 9 months ago by pbsbluejay.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    nice findings! This basically means that the theme is causing this.
    Can you please double check that there’s just one instance of a line like
    wp_footer();
    in the theme’s “footer.php” file?
    The line being there twice is a common cause for something like this. If there’s only one line, you’ll have to get in touch with the theme developers, I’m afraid.

    Regards,
    Tobias

    Thread Starter pbsbluejay

    (@pbsbluejay)

    By the way, I’m using TablePress Version 1.7

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that’s the latest version, so that’s fine.

    Investigating the theme should be the next step.

    Regards,
    Tobias

    Thread Starter pbsbluejay

    (@pbsbluejay)

    Tobias… Thanks for all your help.

    Here is the code I see in my footer.php file…

    do_action('wp_footer');
    # end wrapper
    echo '</div><!-- wrapper_middle -->' . "\n";
    echo '<div id="wrapper_bottom" class="wrapper_section"><div class="hidden"></div></div>' . "\n";
    echo '</div><!-- wrapper -->' . "\n";
    echo '</div><!-- site_container -->' . "\n";
    do_action('after_the_canvas');
    do_action('body_close');
    ?>
    <?php wp_footer(); ?>

    I didn’t find two wp_footer(); codes in the footer.php file but was wondering about this code… do_action(‘wp_footer’);` that also appeared. If you think that code is perfectly fine, then I’m out of luck so it seems.

    I went back a week to try to figure out what could have changed, including what I may have changed. Found nothing, so the DataTables warning issue still remains.

    Unfortunately, I am using a free theme and cannot get support, unless I buy the Pro theme. Something I never wanted to do.

    Looks like I have to make a decision now. Either replace the theme or replace TablePress.

    • This reply was modified 7 years, 9 months ago by pbsbluejay.
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    nice find! This is indeed the problem! 🙂
    Technically, these two lines are exactly the same. wp_footer(); is just a wrapper or short hand for the do_action('wp_footer'); line.

    Please delete that do_action('wp_footer');, as there should only be a the wp_footer(); in the line right before the </body> HTML tag.

    Regards,
    Tobias

    Thread Starter pbsbluejay

    (@pbsbluejay)

    Thanks Tobias…

    Issue Resolved!

    As per your instruction, I removed the do_action('wp_footer'); code and that did the trick. No more DataTables warning.

    Thanks Again!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘DataTables warning: table id=tablepress-1’ is closed to new replies.