• Resolved WriterDan

    (@writerdan)


    This is the error that I’m seeing in my server error logs:

    [15-Apr-2015 23:46:16 UTC] PHP Fatal error: Cannot redeclare class URI_Template_Parser in /www/wp-content/plugins/google-pagespeed-insights/google-api/src/external/URITemplateParser.php on line 30

    Apparently another plugin that I’m using is including the google-api library and there is a conflict here. Is there a way to check for the library before including it?

    Or is there something else that I’m missing that might be causing this error to occur?

    Thanks for your help.

    https://www.ads-software.com/plugins/google-pagespeed-insights/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    Hey Dan,

    URITemplateParser.php is loaded by the main Google_Client.php file (containing the Google_Client class). My plugin checks if the Google_Client class already exists before including Google_Client.php, to avoid the sorts of errors that you are seeing.

    It sounds like perhaps the other plugin you have installed is bypassing this main class for some reason and directly loading the URITemplateParser.php file. Or perhaps they are not using the Google API at all and just needed that file/class (maybe it is distributed elsewhere without the rest of the Google API package).

    Are you able to isolate which other plugin is using the URI_Template_Parser class and provide me the name?

    Thread Starter WriterDan

    (@writerdan)

    Found it.

    Official Google Site Verification Plugin.

    Somebody else on the team put the plugin on the site. It adds a meta tag to the header and… that’s it.

    Genius.

    Thanks for reminding me that I know how to do a simple search on Linux. Grep is your friend peoples.

    Great plugin by the way. Works like a charm.

    Plugin Author Matt Keys

    (@mattkeys)

    Haha thanks, glad you got it sorted out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No reports generated. Error being thrown in my server logs…’ is closed to new replies.