Open jeyip opened 7 months ago
Wait for custom domain to activate and set it to the primary domain
this step wasn't strictly necessary for me going through the flow.
The current code that is supposed to fix this is here: https://github.com/Automattic/wp-calypso/blob/0b9e2b92dc7af73af5fa73e25e45978326983e9b/apps/editing-toolkit/editing-toolkit-plugin/common/override-preview-button-url.js#L55
However, that selector is currently invalid. (And the next line of code throws an error.) I tried to change the selector, but couldn't get it working.
Also, the link in this PR (https://github.com/Automattic/wp-calypso/pull/85179) -- the snackbar "view post" link -- has the same problem where the page is logged out.
also this button, which opens the published post in a new tab:
Ok, I found the root issue of the original bug. The selector has changed to this .components-popover__fallback-container
, but that container element doesn't exist until the popover opens for the first time. As a result, there is no container for the mutation observer to observe. That fallback container does exist permanently after the popover is closed, though.
📌 REPRODUCTION RESULTS – Tested on Simple – Replicated / Could Not Replicate / Uncertain
📌 FINDINGS/SCREENSHOTS/VIDEO I was able to reproduce the issue on my test site.
📌 ACTIONS – Triaged
Quick summary
When clicking on "preview in new tab" for a new site with a new custom domain, the preview shows a logged out screen.
Steps to reproduce
domains/manage/{CUSTOM_DOMAIN_SLUG}/edit/{WORDPRESS_DOMAIN_SLUG}
( ex./domains/manage/test3213.blog/edit/test321908.wordpress.com
)What you expected to happen
I'd see a proper site preview of my post or page
What actually happened
Shown a logged out site preview of a "Coming soon" page
Impact
One
Available workarounds?
Yes, easy to implement
Platform (Simple and/or Atomic)
Simple
Logs or notes
No response