Skip to content
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

Templates Blanked or Deleted when Making Changes to Global Styles with Gutenberg Active #92191

Open
masperber opened this issue Jun 27, 2024 · 10 comments
Labels
[Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Pri] High [Product] WordPress.com All features accessible on and related to WordPress.com. Triaged To be used when issues have been triaged. [Type] Bug

Comments

@masperber
Copy link

Quick summary

Under certain circumstances, a template can be blanked out when making changes to Global Styles, if Gutenberg is active. This "blanking out" appears a revision entry, and it can be reversed by visiting the template's revision history, but from the user's perspective, it is difficult to understand what has happened or how to reverse it.

Steps to reproduce

This is one set of steps to reproduce this issue. There may be other circumstances that can produce the bug.

  1. Create a plugin-enabled site on WordPress.com
  2. Activate the theme Zaino
  3. Ensure that WooCommerce and Gutenberg plugins are active
  4. Go to Appearance > Editor, then Templates, then edit the template Page: Cart
  5. Open Global Styles
  6. Click on Blocks, then search for the Mini-Cart Proceed to Checkout Button
  7. Change the button text to another color
  8. Note that the "Are you ready to save?" prompt indicate a change to the Page: Cart template as well as Custom Styles. Unchecking the "Page: Cart" template change will prevent the bug from occurring. Leave it checked to verify the bug.
  9. On saving, the Pattern selection modal will appear.
  10. Visit {siteurl}/cart. Note that the page is completely blank.

What you expected to happen

Making a change in Global Styles should not make any change to the template that is currently being edited.

What actually happened

The edited template is blanked out.

Impact

All

Available workarounds?

Yes, difficult to implement

Platform (Simple and/or Atomic)

Atomic

Logs or notes

No response

@masperber masperber added [Type] Bug Needs triage Ticket needs to be triaged [Feature] Full Site Editor The site editor. [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. labels Jun 27, 2024
@masperber
Copy link
Author

Initial report: 8392059-zen

Customer requests followup on resolution.

@mrfoxtalbot
Copy link

Thank you for the detailed report @masperber. It sounds like the likely culprit here is the Mini-Cart block, right?

Were you able to replicate this using a different theme?

@Aljullu, are you still working on Woo blocks? If not, who could help triage this? Thank you!

@mrfoxtalbot mrfoxtalbot added Triaged To be used when issues have been triaged. [Pri] High and removed Needs triage Ticket needs to be triaged labels Jun 28, 2024
@dsas
Copy link
Contributor

dsas commented Jun 28, 2024

There's some investigation done on this here: p1719520111073669-slack-C02FMH4G8 and #91763 has the exact same symptoms

@Aljullu
Copy link
Contributor

Aljullu commented Jun 28, 2024

@Aljullu, are you still working on Woo blocks? If not, who could help triage this? Thank you!

Thanks for the ping, @mrfoxtalbot!

Note that the "Are you ready to save?" prompt indicate a change to the Page: Cart template as well as Custom Styles.

I was able to replicate the Page: Cart template appearing in the save sidebar unnecessarily, but upon saving nothing weird happened. The template was still there and the frontend still worked.

Pinging Rubik's porter in case he can give it a try as well. cc @mikejolley

@Aljullu
Copy link
Contributor

Aljullu commented Jun 28, 2024

I was able to replicate the Page: Cart template appearing in the save sidebar unnecessarily

I opened an issue in the WooCommerce repo about this: woocommerce/woocommerce#48936.

@dsas
Copy link
Contributor

dsas commented Jun 28, 2024

The takeaway from the slack thread (p1719520111073669-slack-C02FMH4G8) so far is this:

so far I've only managed to reproduce it on an Atomic site with Zaino, when editing the Cart template and when using the undo button to save more than 2 entities (e.g. template, GS, and footer).

any other combination doesn't trigger the issue for me.

it sounds like a race condition somewhere when saving multiple entities at the same time

It's also reproducible in wp studio, so it's not some dotcom specific thing.

@Aljullu
Copy link
Contributor

Aljullu commented Jun 28, 2024

Some questions that would be good to know:

  1. Is this reproducible with other WooCommerce templates? Ie: Product Catalog, Single Product, etc. or only with Page: Cart?
  2. Is this reproducible with non-WooCommerce templates? Ie: Blog Home.
  3. Can the issue be reproduced consistently or it happens every other time you try?

In Slack I see some folks mentioned that pressing Undo allows reproducing the issue, but it didn't work for me either. 😕

cc @roykho as well, as the porter of Origami.

@mikejolley
Copy link
Contributor

I was able to replicate @Aljullu I'll comment on the issue in woo repository.

@dsas
Copy link
Contributor

dsas commented Jun 28, 2024

Is this reproducible with other WooCommerce templates? Ie: Product Catalog, Single Product, etc. or only with Page: Cart?

I've also repro'd it on the page-checkout woo template. I haven't reprod it in Single Product template

Is this reproducible with non-WooCommerce templates? Ie: Blog Home.

I haven't managed to repro it on non-woo templates yet, and neither has any of the other investigators in the slack thread afaik.

Can the issue be reproduced consistently or it happens every other time you try?

Consistently. Here's a video taken first time of asking

Screen.Recording.2024-06-28.at.14.47.27.mov

@supernovia
Copy link
Contributor

Quite possibly another case here; their home page template keeps getting blanked:
8513169-zd-a8c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Pri] High [Product] WordPress.com All features accessible on and related to WordPress.com. Triaged To be used when issues have been triaged. [Type] Bug
Projects
Development

No branches or pull requests

6 participants