Insert PHP
[resolved] Code executed twice (3 posts)

  1. dskowronski
    Posted 11 months ago #


    I am using php_insert for long time but recently (probably after update to 3.8.2 but there is no way I can check it) my code started to be executed twice.

    Normally I use require_once for external script - and it works. But now script does not produce output - even file with echo "OK";
    When I changed require_once into require PHP complained about redeclaration of function. Quick way around is using if (!function_exist('foo')){ function foo(){ ... } }

    My script downloads content from other website it's quite slow and executing it twice is really bad.

    I beleive that there is something in wordpress core that checks content of article with executing [php_insert].
    I know PHP well but I do not have idea how to debug which function is guilty except reading source code of everything in /wp-include

    Is there anything I can do not to execute code twice by modyfying only plugin?


  2. WillBontrager
    Plugin Author

    Posted 11 months ago #

    dskowronski, there may be another plugin that scans the post. A social media plugin, perhaps, or an SEO one. According to what you've told me, I'm thinking something is making the page load twice.

    The procedure described at this support cycle
    revealed that a Facebook plugin or extension was the culprit.

    Let me know what you find out.


  3. WillBontrager
    Plugin Author

    Posted 8 months ago #

    Because there has been no response, I'm assuming the original poster resolved the issue.


You must log in to post.

About this Plugin

About this Topic


No tags yet.