• Resolved doffine

    (@doffine)


    Hello Woody support team,

    we just noticed a problem with your plugin used via Shortcode in a widget called “SiteOrigin Editor” that is part of https://www.ads-software.com/plugins/so-widgets-bundle/ (800k installations) and related to https://www.ads-software.com/plugins/siteorigin-panels/ (900k installations).

    If we put a Woody PHP Snippet shortcode into such a “SiteOrigin Editor” widget, then the PHP script gets executed twice. At least this happens if you send some data via POST to the WordPress page / script. Then the script gets executed twice with the same POST data within some microseconds. Perhaps interesting: We could stop this behaviour by putting…

    <?php exit(); ?>

    …to the end of our PHP script. But then of course the website’s footer didn’t get rendered anymore.

    We solved the problem by not putting your script’s shortcode into a “SiteOrigin Editor” widget but into a widget “Individual HTML”. Then all was fine and the script is only executed once as it should.

    We cannot guarantee if there are not more SiteOrigin Widgets having such problems. But at least it is the “SiteOrigin Editor” one.

    For our case we don’t need a solution for this anymore since we solved it by using another widget type. But we thought perhaps you want to look into this.

    Thanks for your great plugin and work,
    -doffine

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Temyk

    (@webtemyk)

    Hello.

    This is not a Woody plugin issue. Woody generates a shortcode and executes the code at the place where the shortcode is inserted. Shortcodes are a standard WordPress mechanism. Most likely, the editor widget calls the content twice.

    Thread Starter doffine

    (@doffine)

    Hey,

    I understand and think you will be right. I’ll mark this as resolved here and post in the SiteOrigin support forum.

    Thanks for your reply,
    -doffine

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP script gets executed twice in SiteOrigin’ is closed to new replies.