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

Customizer "X" link can return to incorrect site, only on AT #91650

Open supernovia opened 3 months ago

supernovia commented 3 months ago

Quick summary

In the customizer, the "X" button is just a link to WordPress.com, which redirects to My Home for the primary site, causing users to "switch sites" when they don't want to.

(video has sound)

https://github.com/Automattic/wp-calypso/assets/3476361/cc7682b8-247b-4695-ae18-a3b7f7c074a1

Steps to reproduce

  1. Have more than one site, including at least one AT site that is not primary at https://wordpress.com/me/account
  2. Open customizer for that non-primary AT site
  3. Hover over the X to close customizer. Note it points to just WordPress.com
  4. Click the X. Note you're sent to My Home for the primary site, not the site you were working on.

What you expected to happen

I would expect to just go back to the page I was in when I loaded the Customizer

What actually happened

I'm sent back to WordPress.com, which redirects to My Home for my primary site. If I have multiple sites, this can feel like I'm "switching sites" while I'm in the middle of working on one of them.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement (using Customizer in a new tab and just closing that, for example)

Platform (Simple and/or Atomic)

Atomic

Logs or notes

This only happens on Atomic sites. The problems is that the X link itself just points to WordPress.com. On simple sites, it goes back to the correct home link, as demonstrated in the video.

In my video it's easy enough for me to see the site switched, but it can be problematic when the user has multiple similar sites.

retnonindya commented 2 months ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO I can't replicate it. The "X" button on Customizer redirects back to the AT site I'm currently working on.

https://github.com/Automattic/wp-calypso/assets/44726232/29a7c90a-1f2f-4c9c-9a65-98cafcf277af

📌 ACTIONS

📌 Message to Author Perhaps the issue has been resolved. @supernovia, can you check your site and see if the issue persists? Thanks!

mrfoxtalbot commented 1 month ago

I have noticed that the Customizer oftine includes a return parameter:

https://defaultinterfacevanilla.wpcomstaging.com/wp-admin/customize.php?return=https%3A%2F%2Fwordpress.com%2Fcustomize%2Fdefaultinterfacevanilla.wpcomstaging.com

If the parameter is missing, it will sometimes failt to return to the correct URL or even to exit the Customizer altogether.

https://github.com/user-attachments/assets/1368549e-1399-4d84-8bf7-40aeab0c5d1a

I think this is partially by design and will only occur if the customizer URL is entered directly.

I am going to close this but please feel free to reopen if you can add more details, @supernovia. Thank you!

supernovia commented 1 month ago

@retnonindya & @mrfoxtalbot this now takes me back to the correct page. Thanks!

supernovia commented 1 month ago

ope! @mrfoxtalbot , @retnonindya , I tested again with the original site here and that one has the same issue still!

so just.legendofvelda.com is fine; littlesttestshop.wpcomstaging.com is not. On the latter, the X points to WordPress.com (you can see it in the address thing near the bottom of my screenshot here)

The URL does say to return to just wordpress.com and the X box leads to that, but I don't know how that's getting set. I just used Appearance like in the video I made above. Screenshot 2024-07-18 at 9 56 02 PM

mrfoxtalbot commented 2 weeks ago

Thanks for the thorough re-testing @supernovia. I am not sure how much dev time we are going to be able to assign to this given our focus on all-block-things but I have added it to the board.