WordPress.org

Ready to get started?Download WordPress

Forums

Google Site Verification Plugin
[resolved] Failed due to an error (16 posts)

  1. DouglasVB
    Member
    Posted 2 years ago #

    The plugin fails to verify my blog with the following message:

    Verifying your blog... failed, due to an error:

    Error calling https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=META&alt=json: (400) The necessary verification token could not be found on your site.

    Any thoughts on why this might be happening and what I need to do to fix it?

    http://wordpress.org/extend/plugins/official-google-site-verification-plugin/

  2. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Hello Douglas,

    Are you using any page caching plugins for WordPress or Apache/IIS? If so, can you tell me which plugins you use?

    Thanks!

  3. DouglasVB
    Member
    Posted 2 years ago #

    Hi kbm,

    I'm using the following caching plugin:

    - WP Super Cache

    No Apache/ISS.

    Cheers,

    Douglas

  4. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Could you try deleting your cache? (WP Super Cache:Delete Cache)

    Also, does your theme's header.php file have a call to wp_head()? It would look something like this:

    <head>
    ...
    /* Always have wp_head() just before the closing </head>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to add elements to <head> such
    * as styles, scripts, and meta tags.
    */
    wp_head();
    ...
    </head>

    Let me know if either suggestion resolved the issue for you. Thanks for the feedback. I will resolve the situation as soon as I determine the root cause.

  5. DouglasVB
    Member
    Posted 2 years ago #

    Deleting the WP Super Cache cache solved the problem!

    Thanks!

  6. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Sweet! I'm happy to hear it. I'll update the instructions FAQ and see what I can do to flush the cache automatically to prevent similar issues from occurring to others.

  7. gotdistracted
    Member
    Posted 2 years ago #

    Hi chaps,

    Sorry to jump in this one. I'm getting the following error:

    Error details:
    Error calling https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=META&alt=json: (400) The necessary verification token could not be found on your site.

    I don use specific caching at present be that native or plugged in. I have disabled SimplePie that does cache certain items and removed timthumb.php all to no avail.

    I checked with with most host regarding the technical requirements and they too have all been ticked off.

    Any thoughts here?

  8. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Which theme are you using? Did you make any modifications to the HTML/PHP? Specifically, I am interested in whether or not your header PHP is making calls to wp_head().

    If you are interested in divulging the address of your blog, I could take a look.

  9. gotdistracted
    Member
    Posted 2 years ago #

    Hi kbm,

    I'm using a bastardised version of Twenty20, though very little has been modified within the core of the theme files.

    wp_head(); is present in my header, saw your note on that previously and checked that off too.

    The site is is at http://gotdistracted.net.

    Thanks for replying/looking, I know this is going to be user error, but can't for the life of me figure what the issue is.

  10. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    I think I see what the problem is. Can you verify that the wp_head(); call is placed inside the <head> HTML tag within your theme?

    When I visited your site, I noticed that your HTML looks like this:

    <html lang="en-gb" dir="ltr">
    <strong><meta name="google-site-verification" content="T0OYaBRMYmtdTxdyD-nBx0fpfB4vnHUU1lNosMXzq7Q" /> </strong>
    <head>
    ...

    Note that in your case, the meta tag that is used for verification is located outside the head tag. The verification service requires that it be located within the head instead.

    I hope that helps!

  11. gotdistracted
    Member
    Posted 2 years ago #

    Hmmm, yep both where in the <head> in the mark-up. I have moved wp_head(); to be the very last item in <head>. I have removed my hand coded verify key (noticed a dup), as I assume the plug-in/API sort that (looked at the amended source and the verify key still appears).

    I've viewed source in FF and all seems correct this end. But having tried to verify again I'm still receiving:

    Error details:
    Error calling https://www.googleapis.com/siteVerification/v1/webResource?verificationMethod=META&alt=json: (400) The necessary verification token could not be found on your site.

  12. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    I'm still seeing the same issue on gotdistracted.net:

    <!DOCTYPE html>
    <html lang="en-gb" dir="ltr">
    <meta name="google-site-verification" content="T0OYaBRMYmtdTxdyD-nBx0fpfB4vnHUU1lNosMXzq7Q" />
    <head>

    <title>Distracted Studio | New site up and coming</title>
    ...

    Are you attempting to perform verification on a local staging server? Is the blog hosted under a subdirectory of gotdistracted.net? The HTML of the site looks hand-coded; it doesn't look particularly like it was generated by WordPress.

    Thanks!

  13. ckong
    Member
    Posted 2 years ago #

    Hi,

    I have tried to get this going, but no go! Any thoughts? Help Please..
    got this message:
    Parse error: syntax error, unexpected '{' in /hermes/web07/b234/mXXXXX/XXXX/wordpress/wp-content/plugins/official-google-site-verification-plugin/googleSiteVerification.php on line 162

    Thanks!

  14. kbm
    Member
    Plugin Author

    Posted 2 years ago #

    Hello ckong,

    What version of PHP are you using?

    This plugin requires at least PHP 5.2.0 to run properly. I think that your error may be related to running a version that is older than that.

  15. ckong
    Member
    Posted 2 years ago #

    Thanks... My host only runs 5.0 :(

    Many thanks!!

  16. gotdistracted
    Member
    Posted 2 years ago #

    kbm,

    As stated user error was always going to be the cause! Adjusted header in my 'holding' page a voila. Sorted (idiot).

    Thanks for all the help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic