-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "get help" link to the "reconnect_after_url_mismatch" notice. #5481
Comments
@eugene-manuilov Hmm, is this really what we should do here? Did that come up before? This is not an error I'd say, if anything we would put an actual documentation link here. I think we should only consider things errors which are "unexpected" or variable. If we cover for a certain situation, and we want to make documentation for this specific topic available, I'd rather say this is not an error but a regular documentation link. |
@felixarntz this has been added to the error redirects mapping document. I agree with you that it is a regular documentation link. @bethanylang or @adamdunnage do you think we can move it from the errors document to the "learn more" redirects? |
@eugene-manuilov Is this the same as what we have documented here? Or is it slightly different? |
@adamdunnage, no this is different. This issue is for the case when the URL of the site has changed. The issue you are referring to happens during OAuth process. |
@eugene-manuilov Okay thanks for explaining. In which case I think that yes we should it from the errors document to the "learn more" redirects. @bethanylang Do you agree? |
Makes sense to me, thanks! |
Thanks, @adamdunnage and @bethanylang. Adam, will you remove the "reconnect_after_url_mismatch" row from the error redirects and add it to the "learn more" redirects? I have updated AC to use the redirect link from the documentation redirects but left the same "get help" label. The only question is where do we need to put that "get help" link, right after the |
@eugene-manuilov I have added this to the "get help" document with the slug and documentation URL for this. |
@adamdunnage we need to add it to the "learn more" redirects (for documentation links) and remove it from the "get help" redirects (which is intended for errors). I don't see it's added to the correct redirects doc. Could you please check again? |
Ok, updated AC to use the |
Thanks, @nfmohit. Mostly looks good to me. Have a few comments:
No need to put the new link into a separate
How about |
Same here, no need to put it into a separate |
Thank you @eugene-manuilov! I've updated the IB so that the |
IB ✔️ |
…ite-kit-wp into enhancement/##5481-add-get-help.
Add a get help link to mismatched url errors.
QA Update
|
@mohitwp I think the easiest way to replicate this scenario is to create a multisite instance with subdirectories. Such setup will allow you to create a subsite with a subfolder URL that you can change as you want on the general settings page. Just do something like this:
Let me know if it helps. |
QA Update ✅Verified 👍
|
Feature Description
We need to add a new "Get Help" link to the notification that appears when site has changed its URL. The URL for the new "get help" link should be obtained using the
getDocumentationLinkURL
selector introduced in #5423.site-kit-wp/includes/Core/Authentication/Authentication.php
Lines 1110 to 1117 in 16a446a
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
{proxy}/support/?doc=url-has-changed
URL.Implementation Brief
includes/Core/Authentication/Authentication.php
:get_reconnect_after_url_mismatch_notice
method.Notice
class definition, in the second parameter array, locate the function in thecontent
property.$content
variable is assigned, add a full stop after the closing</a>
tag. After the full stop, add a new<a>
tag withhref
attribute having the fifth placeholder (%5$s
- the support link) and the content as the sixth placeholder (%6$s
- the get help string). It should also have atarget
attribute with the value of_blank
.site-kit-wp/includes/Core/Authentication/Authentication.php
Line 1116 in 4306cdd
/?doc=url-has-changed
appended to theget_proxy_support_link_url()
method of the sameAuthentication
class. It should be escaped withesc_url()
.Get Help
(translatable).assets/js/components/setup/SetupUsingProxyWithSignIn.js
:getDocumentationLinkURL
selector with the slugurl-has-changed
from thecore/site
store and assign it in a variable namedurlHasChangedHelpLink
(or something more relevant).getHelp
.description
is displayed, check ifgetHelp
is truthy and if so, display a<Link />
component with anhref
prop pointing to thegetHelp
variable and anexternal
prop withtrue
. The content of the component should beGet Help
(translatable).site-kit-wp/assets/js/components/setup/SetupUsingProxyWithSignIn.js
Lines 303 to 305 in 4ebc699
DISCONNECTED_REASON_CONNECTED_URL_MISMATCH === disconnectedReason
is true andurlHasChangedHelpLink
is truthy, assignurlHasChangedHelpLink
to thegetHelp
variable.site-kit-wp/assets/js/components/setup/SetupUsingProxyWithSignIn.js
Lines 207 to 215 in 4306cdd
Test Coverage
Setup -> Using Proxy with Sign-in -> Disconnected - URL Mismatch
stories.QA Brief
<proxiedSupportURL>/?doc=url-has-changed
?/doc=url-has-changed
link in a new tab.Changelog entry
The text was updated successfully, but these errors were encountered: