• Matt

    (@syntax53)


    If I add “error_log(‘page_load’);” to one of my plugins and then click refresh on any front-facing page (e.g. not the dashboard), I get two lines with “page_load” in my error log. If I disable AiO SEO and do the same thing I only get 1.

    Afraid it’s causing all of my pages to load twice, slowing them down.

    https://www.ads-software.com/plugins/all-in-one-seo-pack/

Viewing 3 replies - 1 through 3 (of 3 total)
  • syntax53,

    I’m not aware of this issue; what’s your site, and how/where are you adding this in your plugin?

    Thread Starter Matt

    (@syntax53)

    Unfortunately the site I’m working on is still in development and therefor not front-facing. But it doesn’t matter if I put the “error_log(‘page_load’);” in one of my plugins (was putting it in the main .php file) or just in the theme’s functions.php. The result is the same.

    So just now I put “error_log(‘page_load’);” in the theme’s function.php. Without SEO activated if I hit refresh I only get 1 “page_load” in the error log. After activating SEO and hitting refresh I get two every time.

    Hi syntax53,

    A lot of things can potentially cause behaviors like this, for example any missing resources referenced on your site; I haven’t seen it happen with our plugin specifically, though. Of course I can’t troubleshoot the site myself without seeing it, but maybe you could do a bit more logging here – try logging info from debug_backtrace() or debug_print_backtrace() or capturing info from the $_SERVER superglobal, perhaps, to get a better idea of where this might be occurring. Also you can check in the Network tab of your browser or with a tool like the Pingdom Website Speed Test to see if you have any missing resources (returning status code 404) linked on the page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin causes pages to load twice’ is closed to new replies.