Plugin loading twice
-
My plugin is loading twice, and I cannot understand why.
Plugin design:
The plugin uses a Singleton class to avoid loading twice.Verification:
I added a simple error_log() to dump the debug_backtrace(). This debug outputs this identical stack twice (with different timestamps) in the log file:/wp-content/plugins/rover-idx/roveridx.php / Function: require_once / Line: 49 /wp-content/plugins/rover-idx/roveridx.php / Function: __construct / Line: 38 /wp-content/plugins/rover-idx/roveridx.php / Function: get_instance / Line: 53 /wp-settings.php / Function: include_once / Line: 255 /wp-config.php / Function: require_once / Line: 99 /wp-load.php / Function: require_once / Line: 37 /wp-blog-header.php / Function: require_once / Line: 13 /index.php / Function: require / Line: 17
Things I’ve tried:
– I’ve found this to be happening on three websites. One was part of a multisite, and two were standalone.
– Some folks who complain about this have determined that various plugins or the fact that they are running locally was the root cause. I’ve captured debug from three sites using my plugin. All are remote, and I’ve disabled all other plugins.
– Made sure I wasn’t logged into WordPress – so admin initialization is not affecting this problem.
– My plugin has the option to load content into the header. I’ve disabled it – but unfortunately still seeing the problem.Any suggestions?
PS – I really hope this doesn’t get sucked into the black hole of this very busy forum.
- The topic ‘Plugin loading twice’ is closed to new replies.