site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Unicode domains have issues with setup

Open tofumatt opened this issue 7 years ago • 30 comments

Bug Description

Still exploring the specifics, but it seems unicode domains aren't handled properly by Site Kit.

See:

  • https://wordpress.org/support/topic/404-cyrillic-domains/
  • https://wordpress.org/support/topic/umlaut-domain/
  • https://wordpress.org/support/topic/cannot-get-through-the-setup/#post-12243161

Steps to reproduce

To be determined.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Sites that use unicode domains should be able to complete the setup flow.
    • The redirect for e.g. site verification should work as expected, not result in a 404 and ending up with the site owner successfully being verified.
    • The site should be matched a correct Search Console property, or one should be created, and the same property should be looked up from / used by the plugin afterwards.

Implementation Brief

  • Ensure all domain comparisons use the punycode decoded domain name form for all comparisons.
  • Adjust domain comparisons in both Search_Console.php and Site_Verification.php, using Requests_IDNAEncoder::encode on the host part of each domain being compared.

Changelog entry

  • Fix problems around comparing domains with unicode characters that could result in blocking the plugin setup.

tofumatt avatar Nov 05 '19 11:11 tofumatt

I've added a video of the issue here. There seems to be a false REST API error in addition to the underlying problem: https://recordit.co/mAa2yrvYqn

A workaround might be to temporarily change the Site Address (URL) by removing any non standard characters during setup.

jamesozzie avatar Nov 06 '19 16:11 jamesozzie

I tried changing the Site Address, without result. I don't understand how to remove any non standard characters since I assume that would either break my site or will lock me out of the admin.

Below is just an example URL:

  • Setting Site Address to "xn--bcher-kva.example" doesn't work.
  • Setting Site Address to "bücher.example" doesn't work either. Instead I can't access the front end anymore since I automatically get redirected to the back end.

danielbenjamins avatar Nov 06 '19 17:11 danielbenjamins

Just installed 1.1.0 and was hoping this got finally fixed. Any news on this bug?

danielbenjamins avatar Nov 21 '19 20:11 danielbenjamins

No updates yet, sorry. I've been trying to debug it but the error isn't quite clear to me yet. I will post as soon as I figure anything out in this issue though. 😃

tofumatt avatar Nov 22 '19 11:11 tofumatt

The error still exists for me, even after the update.The following happens:

  1. Within WordPress I try to activate the setup
  2. Then I get redirected to this url:

https://sitekit.withgoogle.com/site-management/setup/?version=1.1.0&scope=openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsiteverification%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters&supports=file_verification&site_id=QAnYiLpp2s4923vb8zjqw8-amm877p84nCnJcNcKorudh.apps.sitekit.withgoogle.com&code=sitekit-p96rz49qkyj10u1d&verification_nonce=d0acf82193

  1. When I click under “1) Verify Siteownership” –> “Proceed” is get redirected back to my wordpress installation:

https://xn--dachtrume-02a.de/xn--dachtrume-02a.de/wp-admin/index.php?googlesitekit_verification_token=051bf0f1af5864cd&googlesitekit_verification_token_type=FILE&googlesitekit_verification_nonce=d0acf82193&googlesitekit_code=sitekit-p96rz49qkyj10u1d

  1. Then nginx tells me: 404 Page does not exist.

https://dachträume.de/xn--dachtrume-02a.de/wp-admin/index.php?googlesitekit_verification_token=051bf0f1af5864cd&googlesitekit_verification_token_type=FILE&googlesitekit_verification_nonce=d0acf82193&googlesitekit_code=sitekit-p96rz49qkyj10u1d

iamklaus avatar Nov 25 '19 21:11 iamklaus

We don't yet have a fix for the error, so it will still appear in the plugin. Sorry about that!

tofumatt avatar Nov 26 '19 00:11 tofumatt

Any updates on this? It's been months and I still can't connect these kind of sites to Sitekit. I even tried to remove all these properties from Search Console and run the setup again, but without any luck.

danielbenjamins avatar Feb 08 '20 04:02 danielbenjamins

+1 in support/need of a fix ☝️

jonasskafte avatar Feb 12 '20 15:02 jonasskafte

@eaglejohn Unfortunately we haven't yet been able to triage this one and reproduce it/debug it, but I'll bring it up next time we have an issue planning session. Thanks for checking in on the issue though.

@jonasskafte In the future, please use GitHub's "reaction" feature to thumbs-up any previous comment. It helps maintainers understand others are "+1"ing an issue without adding too much noise to developer notification inboxes/issue history. Thanks 🙂

tofumatt avatar Feb 12 '20 15:02 tofumatt

Is this plugin actually developed and maintained by Google, just wondering... I asked about this on the WordPress forums but they avoided my question.

danielbenjamins avatar Feb 12 '20 15:02 danielbenjamins

@eaglejohn I provided an answer to your topic here that yes it was. Thanks again for your patience.

ernee avatar Feb 12 '20 19:02 ernee

Hi guys,

Hope you've had a good week.

Any chance a fix to this could be included in Sprint 16 or Sprint 17?? 🤞

Thanks and have a lovely weekend!

jonasskafte avatar Feb 21 '20 20:02 jonasskafte

Hi again @tofumatt, @jamesozzie and @ernee,

Any chance this can be included as a milestone for your next release?

Thanks!

jonasskafte avatar Feb 28 '20 12:02 jonasskafte

And there was silence...

jonasskafte avatar Mar 10 '20 15:03 jonasskafte

@adamsilverstein – thanks for having taken a look at this! 👍

@felixarntz – why did you remove it from the 'oh right' milestone?? You probably have a good reason, but just wondering why?

jonasskafte avatar Mar 13 '20 08:03 jonasskafte

Hi @jonasskafte, we are working on debugging this but don't have any update yet. We will post an update once we make progress on this.

Thanks,

ThierryA avatar Mar 17 '20 14:03 ThierryA

I've made some progress debugging this issue.

One problem I discovered is that we store our domains in the service as "punycode" like "http://xn--trkish-3ya.com" while the API we use to check for domains returns the unicode variation: "http://türkish.com/" - I fixed this in the service allowing site verification to complete, however the plugin also does a separate lookup after you complete the setup flow and this is failing to identify the connected site.

I will update here once I have a resolution.

adamsilverstein avatar Mar 18 '20 14:03 adamsilverstein

@adamsilverstein Can you write a rough IB about the necessary changes on the plugin side? Since this issue mostly talks about site verification and the current PR #1265 addresses Search Console issues, I wonder whether there's more to it. Although more of the fix is likely needed on our service, which we can discuss separately.

felixarntz avatar Mar 19 '20 00:03 felixarntz

@cole10up In order to QA this, I think it's key to have a site with a domain that has unicode characters, and ensure the setup flow completes seamlessly.

Then, specifically also test the setup flow for a site where your Site Address has the unicode version of the URL (e.g. http://türkish.com) while your WordPress Address has the punycode version of the URL (e.g. http://xn--trkish-3ya.com).

felixarntz avatar Mar 25 '20 18:03 felixarntz

Tested

This isn't fixed on my end. Reproduced this issue in setup redirecting during site verification: image

Domain: http://türkish.com

Using the attached zip google-site-kit-1.6.0.zip

@felixarntz, log into the domain above and try to setup SK. See below:

Site Kit by Google Dashboard ‹ Just another WordPress site — WordPress

cole10up avatar Mar 26 '20 05:03 cole10up