Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Domains: Email hosting verification #24126

Closed molszewska closed 6 years ago

molszewska commented 6 years ago

It looks like an universal issue. I've come across this with my user yesterday and managed to reproduce on my test site.

Steps to reproduce

  1. Get Zoho verification code starting from "zb..."
  2. Go to https://wordpress.com/domains/manage/SITENAME.com/name-servers/SITENAME.com
  3. Enter the code in the appropriate field
  4. Click "Set up Zoho Mail"

What I expected

I received "Success" message so I expected the change to be saved and visible in the field, even when I switched the tab. Expected outcome should look like this:

http://cld.wthms.co/kjNYJO

What happened instead

The change disappears from the UI, yet the record works and it's visible in DNS section:

http://cld.wthms.co/9MokZ2 http://cld.wthms.co/15x2C0

klimeryk commented 6 years ago

I can't reproduce this with my test domain 🤔 The token is not cleaned in my case and I see a green success notice in the upper right corner.

I did notice that we are sending a bit weirdly formatted URL:

https://public-api.wordpress.com/rest/v1.1/domains/example.com/dns/providers/zoho-mail/services/Zoho?http_envelope=1

The uppercase Zoho is what alerted me. It succeeded - but wondering if it's not causing problems (either on some OS on the user side or on some servers on our side). @hambai or @delputnam, does this looks as expected to you?

An alternative theory: there's a conflicting record and the backend returns some error (though, it should handle the conflicting records automatically). @molszewska, did the domain have any custom records before this change?

molszewska commented 6 years ago

Just MX records, nothing more complex than that. I've just tested in on a "clean" domain without any records previously added, and the behaviour still persists: http://cld.wthms.co/klQcL5

klimeryk commented 6 years ago

What browser/OS were you using? I can't seem to reproduce it on Mac/Chrome. Do you have email forwards on the domain? Anything that would help narrow down the steps to reproduce this 😁

molszewska commented 6 years ago

macOS Sierra, version 10.12.6, Chrome 63.0. Both domains didn't have any email forwards, I can't find anything that stands out here. (tested with magdatestdomain.com and interspellar.net)

klimeryk commented 6 years ago

Weird, that's very similar to my setup 🤔

@hambai or @delputnam, could you try to reproduce this problem? You two should be most familiar with this code (and maybe there's something wrong with my setup).

hambai commented 6 years ago

I think that's the expected behaviour. We don't keep the tokens anywhere - we just try to set up the DNS records and return a success or error notification. Not sure if it's worth it to do otherwise, since the usage here is to set up the DNS records using the token once and generally forget about it.

klimeryk commented 6 years ago

No, my request was to try to reproduce the problem described in the very first post here. I think your reply was meant for https://github.com/Automattic/wp-calypso/issues/23139 perhaps?

hambai commented 6 years ago

No, my request was to try to reproduce the problem described in the very first post here. I think your reply was meant for #23139 perhaps?

Well... the original problem described here is that once you apply an email template the token is not saved when you change the tab?

I received "Success" message so I expected the change to be saved and visible in the field, even when I switched the tab. Expected outcome should look like this...

Or am I reading that wrong?

delputnam commented 6 years ago

Just confirming that this is the expected behavior. Perhaps we could make it clearer by updating the design of the UI somehow.

When you enter the "zb code", it sets up the necessary DNS records, but we don't store a user's "zb code" anywhere.

Also, the uppercase Zoho in the URL is because this is the serviceId of the template.

klimeryk commented 6 years ago

🤦‍♂️ See, this is why I wanted to loop in someone else. For some reason I was under the impression that the report was about not getting the success notice (meaning, some error happened) and I tried reproducing that. Sorry for my confusion here, everyone.

But re-reading the description, I missed:

The change disappears from the UI, yet the record works and it's visible in DNS section:

So, yeah, it works "as expected". This is just a shortcut, a creator/wizard for quickly setting up the needed records, not a place that knows if you've done it already or not.

To fix this, we'd need some design support here and probably rework the UI to make it more like a place were you can set up and manage the email records. But I'm sorry, but that's nowhere near the top of our priorities right now and we have to be very picky about what we can take on and what we cannot.

Thank you for raising this issue, but closing it as wontfix. I've made a comment on the related issue https://github.com/Automattic/wp-calypso/issues/23139#issuecomment-382521739 based on our discussion here with a possible improvement that could help with the confusion users might have with this view, though.