• Resolved migueldboland

    (@migueldboland)


    Hi,
    Tablepress seems to be getting initialised twice into the website’s main JS, causing an alert to appear. I cannot figure out why this is occuring; would anyone have an idea?

    Unfortunately I cannot disable the login to the website, but I got a copy of the page here
    https://gist.github.com/mb1069/d959669cec237208c9d00c0585a1e63a

    The offending lines are those containing $(‘#tablepress-462’).dataTable(…)
    Which occur at line 3067 and 3447.

    I am using the MasterStudy theme, but I haven’t found anything in the settings / code so far to suggest this is the cause.

    Thanks for a great plugin,

    Miguel

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    This indicates that something on the site is loading the footer code twice. Often this happens if the theme for some reason contains calls to the wp_footer() function twice, often in its “footer.php” file. Can you please check that?

    If that’s not it, can you please try again after temporarily deactivating all other plugins and after switching to a WordPress default theme like Twenty Twenty? That way, we can find what’s causing this.

    Regards,
    Tobias

    Thread Starter migueldboland

    (@migueldboland)

    Hi Tobias!
    Thank you for taking the time to reply,
    I grep’d over all the footer.php files in my codebase, and found 2 associated with my themes / plugins. MasterStudy (main theme) loaded it, as did a plugin for masterstudy (MasterStudy LMS – Learning Management System). I disabled the one in the plugin, which seems to have resolved the alert, but I’m double checking it hasn’t affected the site’s functionality.

    Have you come across this before?

    Best regards,
    Miguel

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    nice finds!

    Yes, I do see this from time to time, and it always was caused by a theme/plugin calling that footer function twice.
    I don’t have experience with your particular theme though.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cannot reinitialise DataTable.’ is closed to new replies.