Support » Plugins » Shortcode functions called twice on page load?

  • Hello everyone,

    I’ve written several plugins and have just noticed that every shortcode function that I’ve tested is being called twice. At first, I thought this was theme related, but it’s not. It’s generally not noticeable unless you do things like increment indexes (they’ll be incremented twice) or generate forms (submitted twice), etc.

    Can anyone share some wisdom on this? If this should not be happening, then I’ll dig more deeply into my code. Just wanted to know if anyone else has seen this and experienced it.


Viewing 5 replies - 1 through 5 (of 5 total)
  • Update on this. It’s only happening when I run locally on my desktop (running LAMP on Ubuntu 10.x).


    I’ve witnessed this exact behavior twice now on my local development machine. I’m running Ubuntu 11.04 on an Intel Core i5. I can’t confirm whether or not this bug occurs on my production server (at this time), because I’m reluctant to deploy the affected code.

    For what it’s worth, I’m an “expert” PHP developer, and I don’t believe the issue I’m seeing lies within my own code. (I suspect you feel the same way). I’ve also grepped through my code to confirm that I’m not invoking wp_head() twice or something, which I’m not.

    So, I don’t know what is happening or why, but I can confirm that I’m having the same issue.


    So, a bit of lucky Googling just put me on the right track.

    Are you using Simple Facebook Connect on your site? I am, and disabling it solved this problem entirely for me. Presumably, then, this is just some kind of bug within that plugin.

    I’ll send the developer a bug report about his otherwise fantastic plugin.

    I hope that’s helpful.

    Oh, interesting! Thank you for that update. No, I wasn’t running that plugin on my local installation, nor on any production server. I just noticed that it went away when I deployed the plugin anywhere remotely. I don’t know if it was related to another plugin that I did have installed on my machine, but I’ll keep an eye on it (recently upgraded machines and set up my local installation – likely with different plugins. Same OS though. 🙂

    Same issue here, with sfc.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode functions called twice on page load?’ is closed to new replies.