• Resolved tenacityio

    (@tenacityio)


    We are seeing events triggered by the_content() duplicating. Even if the Table of Contents doesn’t have Enable Support activated for that Post Type. Example we only have this activated on Posts and one Custom Post Type, but it is firing on Pages as well.

    Is there any way to disable this function from triggering this on specific pages?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Magazine3

    (@magazine3)

    That’s strange,

    Can you pls let me know how did you got to know if the function is running?

    We’re you using any tool to find out, if so please send the screenshot if it?

    Thread Starter tenacityio

    (@tenacityio)

    Sure, we discovered the issue due to another process that was linked to a shortcode related to a Login function, which generated two emails, don’t get me started on why that’s bad.

    While that plugin dev wouldn’t admit the function was tied to the shortcode and thereby the_content(). We were able to confirm it, by hooking into the_content() filter and creating a simple log file for every time it runs.

    We wouldn’t have suspected your plugin, since it was not Enabled on Pages (/wp-admin/options-general.php?page=table-of-contents). But we know it definitely does process the_content() to generate the ToC. So, it became one of our suspects. I searched all of our plugins directory to see if any use output buffering with the_content(), and your’s does (/wp-content/plugins/easy-table-of-contents/includes/class.widget-toc.php line 121).

    Neither Enable Support on Pages nor the Widget itself were being loaded onto Pages, so it made no sense why it would cause it, but we were still getting the_content() triggered twice, so we Deactivated the plugin and the duplication stopped.

    • This reply was modified 2 years, 8 months ago by tenacityio.
    • This reply was modified 2 years, 8 months ago by tenacityio.
    Plugin Author Magazine3

    (@magazine3)

    Can you please share us a small video of the issue for reference purposes of the issue? And also please share us a screenshot of the snippet regarding the_content(). So that we will go trough it and get back to you accordingly to resolve it.

    Thread Starter tenacityio

    (@tenacityio)

    You need me to share a snippet of your code? I provided you with the exact file and line where your plug-in loads the_content().

    I’m happy to share a video with you, but I’d rather not display the backend or directories to the world. Is there somewhere I can send it?

    Plugin Author Magazine3

    (@magazine3)

    Yes, you can send a message via plugin settings.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Plugin Runs the_content() even if deactivated’ is closed to new replies.