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

Patterns: "My patterns" are missing #87366

Closed
daria2303 opened this issue Feb 11, 2024 · 15 comments
Closed

Patterns: "My patterns" are missing #87366

daria2303 opened this issue Feb 11, 2024 · 15 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Simple [Pri] Low Address when resources are available. [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

@daria2303
Copy link

daria2303 commented Feb 11, 2024

Quick summary

My patterns are missing in the editor. Classic theme, simple site, I cannot reproduce on a test site
https://github.com/Automattic/wp-calypso/assets/11535091/e9d98dd7-34a9-4231-923e-7334ab0816f9 but it looks like it is account specific because all user's sites have this issue. User mentioned that it started happening after the change to where you can select “edit original” on the pattern

Steps to reproduce

  1. Go to the post or page editor on that user's account (info in the ticket 7693912-zd-a8c)
  2. Try to find "My patterns" item

What you expected to happen

I see "My patterns"

What actually happened

"My patterns" item is missing

Impact

One

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple

Logs or notes

7693912-zd-a8c

@daria2303 daria2303 added [Type] Bug [Feature Group] Signup & Site Onboarding Tools for user registration and onboarding new users to the site. Needs triage Ticket needs to be triaged [Feature] Pattern Assembler The tool for building off of blank canvas using patterns. [Product] WordPress.com All features accessible on and related to WordPress.com. labels Feb 11, 2024
@github-actions github-actions bot added [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts [Platform] Simple [Pri] High Address as soon as possible after BLOCKER issues labels Feb 11, 2024
Copy link

Support References

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

  • 7693912-zen

@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Feb 11, 2024
@liviopv
Copy link

liviopv commented Feb 14, 2024

📌 REPRODUCTION RESULTS

  • Tested on Simple – Uncertain
  • Tested on Atomic – Uncertain

📌 FINDINGS/SCREENSHOTS/VIDEO

  • I couldn't reproduce on my sites using the TextBook theme

  • On https://onevoicebecametwo.life/, "My Patterns" is not showing up. When I tried to create two patterns on this test page, it took several minutes to register the pattern, even though both had a single Paragraph Block in it. Even after creating a pattern, the "My Pattern" link still doesn't show.

  • Going https://onevoicebecametwo.wordpress.com/wp-admin/edit.php?post_type=wp_block (WP Admin view for patterns, not accessible without direct link) shows the site has a whopping 635 patterns but only 435 posts which makes me question why are they even using Patterns? Either way, I guess that the number of patterns is causing a delay/failure in fetching the My Patterns link and the patterns across the site.

  • On the user's other site - mounteverestoftheobvious.com - after I created a pattern, the "My Patterns" item showed up:

CleanShot 2024-02-14 at 16 11 53@2x

User mentioned that it started happening after the change to where you can select “edit original” on the pattern

I believe this has been introduced in the recent GB versions with Pattern Overrides.

📌 ACTIONS

  • Triaged

📌 Message to Author
@daria2303 in future cases of isolated issues where there's no clear repro or indication of a widespread issue, a post on happinessfeedback is a better way to approach it.

@liviopv
Copy link

liviopv commented Feb 14, 2024

@glendaviesnz @talldan do you think this could be an edge case where the number of patterns present on the site might be causing performance issues in searching, listing and creating patterns?

I also noticed in some of the user's patterns that have patterns inside them https://onevoicebecametwo.wordpress.com/wp-admin/post.php?post=130108&action=edit - could that be an issue?

@liviopv liviopv added [Feature] Post/Page Editor The editor for editing posts and pages. [Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. Triaged To be used when issues have been triaged. [Pri] Low Address when resources are available. and removed [Feature Group] Signup & Site Onboarding Tools for user registration and onboarding new users to the site. [Feature] Pattern Assembler The tool for building off of blank canvas using patterns. Needs triage Ticket needs to be triaged [Pri] High Address as soon as possible after BLOCKER issues labels Feb 14, 2024
@matticbot matticbot moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Feb 14, 2024
@liviopv liviopv changed the title Pattern assembler: on all user's sites "My patterns" are missing Patterns: "My patterns" are missing Feb 14, 2024
@glendaviesnz
Copy link
Contributor

@liviopv it is hard to debug this on the user's site as no console errors showing. Is it possible to get a site export of this site so we can run it locally and add extra debugging - i tried running the export option but it doesn't work for that site with my permissions, and I also wasn't sure if we need the user's permission before getting a copy of their data for testing?

@talldan
Copy link

talldan commented Feb 15, 2024

@glendaviesnz @talldan do you think this could be an edge case where the number of patterns present on the site might be causing performance issues in searching, listing and creating patterns?

I wouldn't rule it out as the user does have a lot of patterns.

Having said that, the views are paginated to prevent issues like this. Perhaps that isn't working as expected.

@talldan
Copy link

talldan commented Feb 15, 2024

It looks like the server request for fetching patterns (formerly reusable blocks) fails due to a timeout after 2 minutes:
Screenshot 2024-02-15 at 11 40 38 am

I did some testing on the users site, opening up a post and running some commands in the console to fetch patterns, and I noticed that the requests are very very slow.

A request for even 20 patterns took around 7 seconds (which seems a lot), triggered via:

wp.data.select( 'core' ).getEntityRecords( 'postType', 'wp_block', { per_page: 20 } )

Now this user might have unusually large patterns. Or they might have one pattern that is causing an issue.

I think you'll require someone to debug the server performance (that's not really something @glendaviesnz or I can help with).

I believe this has been introduced in the recent GB versions with Pattern Overrides.

Given it's a server issue, it's very unlikely this is the cause of the problem, as the pattern overrides work hasn't involved any changes to the way patterns are stored or fetched (that I know of).

@supernovia
Copy link
Contributor

Shall we ask about exporting for experimentation? Noting too this user said when the problem started:

I can say for certain that this started happening after your change to where you can select “edit original” on the pattern (which was a great addition—as some overlap caused some confusion for me when I first started using them). I’m fine with them now because I’m careful not to let them bleed into each other, but I think the new feature is the better design.

@glendaviesnz
Copy link
Contributor

Shall we ask about exporting for experimentation?

If you were able to get an export we would be in a better position to help debug, if not, as Dan noted above a dotcom engineer can probably help narrow down the issue as it is definitely server side, not in the editor itself.

@supernovia
Copy link
Contributor

supernovia commented Feb 16, 2024

Thanks @glendaviesnz . It's a simple site, so I really hope we aren't having systems issues. My guess it's some limit the user is hitting with the way they've used patterns.

I've got permission as well as a zip file. I have passed it on to you.

@supernovia
Copy link
Contributor

Also: the user says they'd like the opportunity to "delete" the patterns but have their content merged into the posts. I don't know if there's a plugin or function out there that could do that, similar to "convert to blocks" on old reusable blocks, but in bulk. I'm prompting for more info.

@glendaviesnz
Copy link
Contributor

Thanks for the file @supernovia. I have downloaded it and removed the link.

@talldan
Copy link

talldan commented Feb 19, 2024

I did some more testing with the zip file using a self-hosted version of WordPress (tested both 6.4 and 6.5), and had the same kind of issues. The REST API responses for patterns (/wp/v2/blocks) take a very long time.

My self-hosted version didn't timeout like WordPress.com does, though it did sometimes make the server unresponsive.

I think there are a combinations of issues:

  • The client side code for the block editor fetches 100 patterns at a time, it also does so when the editor loads. Ideally the patterns would only be fetched from the server when needed.
  • The REST API seems slow (if you request all patterns at once in the admin view, it's considerably faster for some reason, though possibly it doesn't fetch all the content from the database since only an excerpt of the pattern is needed).
  • The user has lots of patterns.
  • The user has some very large patterns.

@supernovia
Copy link
Contributor

Did we change anything over the weekend, @talldan and @glendaviesnz ? The user says it's working fine now.

@talldan
Copy link

talldan commented Feb 21, 2024

I don't think so 😄

@annezazu
Copy link

Considering the user said it's working okay now and we haven't heard anything further, I'm going to close this out. Of note, there was some recent work to fix a performance problems with patterns either way after 6.6: WordPress/gutenberg#64219 & WordPress/gutenberg#64871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Feature] Post/Page Editor The editor for editing posts and pages. [Platform] Simple [Pri] Low Address when resources are available. [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

6 participants