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

Unexpected or missing limited Global Styles notices #81628

Closed
mmtr opened this issue Sep 12, 2023 · 10 comments
Closed

Unexpected or missing limited Global Styles notices #81628

mmtr opened this issue Sep 12, 2023 · 10 comments
Assignees
Labels
[Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Global Styles The Global Styles tools in the site editor and theme style variations. [Feature Group] Appearance & Themes Features related to the appearance of sites. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug

Comments

@mmtr
Copy link
Member

mmtr commented Sep 12, 2023

Seems that under some circumstances, we're either displaying the "Your site includes customized styles" notice in the frontend incorrectly, or maybe we're showing it correctly but it's missing in the site editor.

I'm unable to reproduce the issue, but I spotted a couple of tickets where it's definitely happening:

  • Blog ID 222367729 (6766682-zd-a8c, forums)
Frontend Site editor (view) Site editor (edit)
Screenshot 2023-09-12 at 11 56 13 Screenshot 2023-09-12 at 11 56 32 Screenshot 2023-09-12 at 11 56 45
  • Blog ID 222358887 (6722727-zd-a8c)
Frontend Site editor (view) Site editor (edit)
Screenshot 2023-09-12 at 11 54 13 Screenshot 2023-09-12 at 11 53 38 Screenshot 2023-09-12 at 11 58 00
  • Blog ID 222434302 (6678419-zd-a8c, forums)
Frontend Site editor (view) Site editor (edit)
Screenshot 2023-09-12 at 12 26 40 Screenshot 2023-09-12 at 12 26 59 Screenshot 2023-09-12 at 12 27 15
@mmtr mmtr added [Type] Bug [Pri] High [Feature] Global Styles The Global Styles tools in the site editor and theme style variations. labels Sep 12, 2023
@github-actions github-actions bot added the [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts label Sep 12, 2023
@github-actions
Copy link

github-actions bot commented Sep 12, 2023

Support References

This comment is automatically generated. Please do not edit it.

  • 6766682-zen
  • 6722727-zen
  • 6678419-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Sep 12, 2023
@cuemarie
Copy link

cuemarie commented Sep 12, 2023

📌 REPRODUCTION RESULTS

  • Tested on Simple – Could Not Replicate
  • Tested on User Report Sites - Still reproducible

📌 FINDINGS/SCREENSHOTS/VIDEO
I'm not able to replicate this on a test site yet, but I can see the same error warnings the users are reporting on their sites.

Markup on 2023-09-12 at 14:28:25

I SU'd into the owner of the the following sites:

  1. Blog ID 216823552 (free) from the first interaction: https://wordpress.com/forums/topic/customized-styles-is-reset-issue/
  2. Blog ID 222367729 (free) from the first interaction: https://wordpress.com/forums/topic/customized-styles-is-reset-issue/
  3. Blog ID 222434302 (free) from the second forum post: https://wordpress.com/forums/topic/upgrade-required-but-no-customization-can-be-found/

In all sites, the editor does not show any warning about custom styles, but viewing the homepage while logged in shows the warning. Additionally, their sites contain Styles Revisions , but the styles can't be reset (which should mean there are no custom styles saved currently):

screenshot Screenshot on 2023-09-12 at 14-34-58

If Styles were never changed, the Reset to defaults option will appear greyed out.


📌 ACTIONS

  • Noted the GH link on the Forums posts for reference

@cuemarie cuemarie added [Feature Group] Appearance & Themes Features related to the appearance of sites. [Platform] Simple [Product] WordPress.com All features accessible on and related to WordPress.com. labels Sep 12, 2023
@cuemarie cuemarie moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Sep 12, 2023
@cuemarie cuemarie added Triaged To be used when issues have been triaged. [Pri] Normal and removed [Pri] High labels Sep 12, 2023
@dsas
Copy link
Contributor

dsas commented Sep 27, 2023

Additionally, their sites contain Styles Revisions , but the styles can't be reset (which should mean there are no custom styles saved currently):

They should be able to use the revision list to set back to the initial styles, but yes the 'Reset to defaults' menu item is greyed out.

@dsas
Copy link
Contributor

dsas commented Sep 27, 2023

Global Styles customisations are stored in a custom post type. For all of the sites mentioned the post corresponding to their active theme includes this:

        "post_content": "{\"behaviors\":[],\"version\":2,\"isGlobalStylesUserThemeJSON\":true}",
        "post_content_filtered": ""

So they technically have global styles customisations saved, but those customizations are effectively blank.

I'm not sure how or why they were able to have an effectively blank GS saved but they have and so must many other people. We could track down this behaviour, fix it and remove the affected data....but it's probably easier to make our front-end upgrade notice resilient to "empty" customisations.

@dsas
Copy link
Contributor

dsas commented Sep 27, 2023

It's the empty behaviors key that does it, we filter out other keys we should ignore here: https://github.com/Automattic/wp-calypso/blob/c315e666979970a047efb20043c84041c684eae6/apps/editing-toolkit/editing-toolkit-plugin/wpcom-global-styles/index.php#L305C96-L305C96 so we probably need to do the same for behaviors. I'll double check that and open a PR.

@dsas dsas self-assigned this Sep 27, 2023
@dsas
Copy link
Contributor

dsas commented Sep 27, 2023

Behaviours was removed from GB16.7, so there's possibly nothing to be done upstream about the revisions really. I'll update our allowlist that I linked above so we're not displaying the notices any longer.

@cuemarie
Copy link

cuemarie commented Sep 29, 2023

Thanks. We've got a couple of folks to follow up with here.

@supernovia is this a note for the Chiron team, or are you requesting a batch reply for this? I'm not sure this one warrants a batch reply from my side of things (they can be a slog, and there aren't a ton of interactions here).

If I'm understanding @dsas 's last comment, it seems the users should stop seeing the notices, so there's nothing users need to take action on for that fix to reach them, which is another reason I'm thinking that a batch reply wouldn't really be worth the effort here.

@dsas
Copy link
Contributor

dsas commented Sep 29, 2023

If I'm understanding @dsas 's last comment, it seems the users should stop seeing the notices,

Yep, that's right. The bugfix has been deployed and the notices should disappear without any action from the users. I've verified the deployment with the first blog in the initial list.

@dsas dsas closed this as completed Sep 29, 2023
@cuemarie cuemarie added the [Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. label Oct 2, 2023
@supernovia
Copy link
Contributor

If I'm understanding @dsas 's last comment, it seems the users should stop seeing the notices, so there's nothing users need to take action on for that fix to reach them, which is another reason I'm thinking that a batch reply wouldn't really be worth the effort here.

Since these are in the forums with multiple people involved in the threads, it's a nice look for us to update when the issues are solved. We can get that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Closed] Fixed Issues explicitly fixed with PRs. Do not use for no longer reproducible issues. Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Global Styles The Global Styles tools in the site editor and theme style variations. [Feature Group] Appearance & Themes Features related to the appearance of sites. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts Triaged To be used when issues have been triaged. [Type] Bug
Development

No branches or pull requests

4 participants