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

Pattern Placeholder blocking editing of template parts in site editor #79145

Closed
2 of 3 tasks
davipontesblog opened this issue Jul 7, 2023 · 23 comments · Fixed by WordPress/gutenberg#52503
Closed
2 of 3 tasks
Assignees
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report

Comments

@davipontesblog
Copy link
Contributor

davipontesblog commented Jul 7, 2023

Quick summary

Status: Work around in place, issue is being left open while root cause is addressed

There seems to be a bug in the site editor when editing a Header or Footer template part where you see Pattern Placeholder block, and you can’t edit.

This has been reported so far on simple sites, and on a range of themes.

Workaround: editing the template from the Page Editor works as expected.

Pattern Placeholder

Tasks

Steps to reproduce

  1. Pick one of these themes: Appleton, jinjang, Barnett
  2. Click to go to Site Editor
  3. Go to template parts
  4. Click to edit Header or Footer template parts

What you expected to happen

To edit the blocks that are part of the template part

What actually happened

Can't see blocks, so can't edit.

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Platform (Simple and/or Atomic)

Simple

Logs or notes

No response

@davipontesblog davipontesblog added [Type] Bug User Report This issue was created following a WordPress customer report Needs triage Ticket needs to be triaged [Feature] Full Site Editor The site editor. labels Jul 7, 2023
@cuemarie
Copy link

cuemarie commented Jul 8, 2023

FYI this was escalated internally by OP here: p1688757944597679-slack-C02FMH4G8

📌 Message to Author

  • Hey @davipontesblog , you mentioned this is noted on a range of themes, but could you let us know any of the themes that should be used when testing to replicate this? Your steps to replicate doesn't currently include that info. Thanks!

@liviopv
Copy link

liviopv commented Jul 8, 2023

More info:

  • Only affecting Simple Sites. I couldn't repro in Atomic of self-hosted.
  • It seems to happen on theme switches, affecting only WordPress.com themes.
  • It seems to be affecting themes set to display the latest post on the front page (those using Front Page, Home or Index template to load front page content). When I switched to Meraki, which uses a page assigned as front page on Reading Settings, I cannot reproduce it.
  • TT2 and TT3 are not affected either.

Tested the following theme switches:
TT3 (no issue) > Tenaz (issue) > Archivo (issue) > Kigen (issue) > TT3 (no issue) > TT2 (no issue) > Geologist (issue) > Meraki (no issue)

  • Yesterday, I ran into this on 6511093-zd-woothemes and I thought the issue was being caused by attempts to headstart a FSE theme, so I tried to recreate the header by copying the blocks from the theme demo, which worked.

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

Support References

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

@davipontesblog
Copy link
Contributor Author

Themes where we saw this:

Appleton, jinjang, Barnett

Hey @davipontesblog , you mentioned this is noted on a range of themes, but could you let us know any of the themes that should be used when testing to replicate this? Your steps to replicate doesn't currently include that info. Thanks!

cc @cuemarie 👍

@khristiansnyder
Copy link

Noting this is happening on an AT site with Barnett active: #6517506-zen

Site Editor:
Markup 2023-07-09 at 16 16 44

Template editor accessed from the regular page editor:
Screenshot on 2023-07-09 at 16:17:22

@sophiegyo
Copy link

I also could not reproduce this on a jurassic ninja selfhosted instance with WP 6.2.2 and NO plugins (or just Gutenberg 16.1.2).

Ran into a thread of reports:
https://wordpress.com/forums/topic/editing-header-footer-not-displaying/

@aleone89
Copy link

aleone89 commented Jul 10, 2023

I've ran into this here: https://wordpress.com/forums/topic/editor-not-showing-section-on-index-page/

Theme: Bitácora

On this theme, the workaround of editing the footer and header in the page editor doesn't seem to work.

@wiesenhauss
Copy link

6520328-zen - Issue appeared for after switching from Boutique to Yuga on an Atomic site.

@metabreakr
Copy link

pdEkSe-3PS-p2 using the Russell theme.

@dsas
Copy link
Contributor

dsas commented Jul 10, 2023

This only seems to happen when a template-part contains a pattern which includes postTypes in its metadata. On dotcom we add this header to patterns which include a core/template-part blockType if it doesn't already have a postType set.

The intention of us adding that header is to hide patterns that aren't relevant to the post editor from the post editor. I think we could just temporarily remove that while we investigate.

The issue can also be reproduced on a dotorg site using the latest GB release if you change a dotorg theme like TT3 to make one of the patterns include a Post Types header like this one.

@Greatdane
Copy link

6522285-zd-woothemes

Theme is Tenaz Simple site, switched from a classic them to FSE.

@liviopv
Copy link

liviopv commented Jul 11, 2023

@dsas It definitely seems related to ETK.

When I activate it on an Atomic Site (GB 16.1.2), this is what I get:

CleanShot 2023-07-11 at 09 29 06@2x

The block that isn't rendering is not on the Header, ignore it.

And this is without ETK:

CleanShot 2023-07-11 at 09 31 54@2x

@liviopv
Copy link

liviopv commented Jul 11, 2023

Bumping the priority to high, since it's affecting both types of WordPress.com sites and the workaround at difficult to implement. cc @cuemarie

@github-actions github-actions bot added the [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts label Jul 11, 2023
dsas added a commit that referenced this issue Jul 11, 2023
We were adding post types to all registered patterns based upon their
block type, however this is causing issues when trying to edit template
parts which include those patterns.

This change stops doing that while we investigate the issue.

See #79145
@arthur791004
Copy link
Contributor

The root cause is the site editor only allows the pattern with the specific post types but it doesn’t pass the current template type to the hook. Hence, the pattern with the post types will be filtered out and becomes placeholder pattern.

dsas added a commit that referenced this issue Jul 11, 2023
We were adding post types to all registered patterns based upon their
block type, however this is causing issues when trying to edit template
parts which include those patterns.

This change stops doing that while we investigate the issue.

See #79145
@dsas
Copy link
Contributor

dsas commented Jul 11, 2023

I deployed a change to stop triggering this issue a while ago and have deployed a new ETK version to dotorg. It'll be picked up on atomic sites within the hour.

@karenroldan karenroldan removed the Needs triage Ticket needs to be triaged label Jul 11, 2023
@cuemarie
Copy link

@dsas Thank you for that update! Checking in - looks like #79238 is merged, but WordPress/gutenberg#52503 is not yet, so I don't want to jump to conclusions.

@dsas
Copy link
Contributor

dsas commented Jul 13, 2023

Yeah it's not a problem on dotcom right now because I disabled something obscure. I would like to keep this issue open so I remember to re-enable it when the GB PR makes its way back to dotcom.

@metabreakr
Copy link

For pdEkSe-40P-p2 I'm encountering an issue where the "pattern placeholder" exists for the comments template part — comments are not rendering on Atomic, however just using the Comments block works fine.

Caveat: I am using a child theme of TT3, however this was not an issue earlier.

@dsas
Copy link
Contributor

dsas commented Jul 19, 2023

@metabreakr I doubt it's the same bug. I think it sounds like create-block-theme isn't exporting the pattern/template-part correctly.

Are you comfortable checking that on a wporg site and raising a bug on https://github.com/WordPress/create-block-theme if so? if not I can do it.

@metabreakr
Copy link

@dsas I was discussing this with a colleague and will see if I can reproduce this further with the parent TT3 active. For what its worth, with the child theme active, the Comments template part when removed/re-added renders blank. Editing it shows only the pattern placeholder. On the other hand, just using the Comments block renders correctly.

@cuemarie
Copy link

cuemarie commented Oct 10, 2023

📌 ACTIONS

  • Due to the status of this issue, I've downgraded the priority from High to Normal to better reflect its status in the larger context of open bugs in this repo.

I would like to keep this issue open so I remember to re-enable it when the GB PR makes its way back to dotcom.

@dsas WordPress/gutenberg#52503 should now be in Dotcom, so just pinging you in case you'd like to revert #79238 next. 👍 When that's all squared away, I think we should be able to close this out again

@cuemarie cuemarie added [Pri] Normal [Feature] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Product] WordPress.com All features accessible on and related to WordPress.com. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. Triaged To be used when issues have been triaged. and removed [Pri] High [Status] Priority Review Triggered Quality squad has been notified of this issue in #dotcom-triage-alerts labels Oct 10, 2023
@cuemarie cuemarie moved this from Needs Triage to Triaged in Automattic Prioritization: The One Board ™ Oct 10, 2023
@github-actions github-actions bot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Oct 10, 2023
@iamtakashi
Copy link
Contributor

I'm unsure if this is the same, but I'm experiencing something similar—some patterns in a theme don't appear in the editor. (they appear as pattern placeholders in the list view) It's only happening on simple sites, not atomic sites, not self-hosted sites.

@annezazu
Copy link

Hey folks. I just tried to replicate this on a simple site using the jinjang theme and wasn't able to replicate:

can.t.replicate.editing.header.mov

Instead, I was able to edit the header in isolation without a problem. Further, from what I can see above, the Gutenberg PR to fix this was merged a long time ago: WordPress/gutenberg#52503

I think it's safe to say that without the ability to replicate nor any recent reports that we can close this out. Let me know if that was incorrect.

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] Block Patterns Pattern content itself, and the functionality that lets you create patterns. [Feature] Full Site Editor The site editor. [Feature Group] Editor Experience Features related to Gutenberg integration on WordPress.com. [Platform] Simple [Pri] Normal [Product] WordPress.com All features accessible on and related to WordPress.com. Triaged To be used when issues have been triaged. [Type] Bug User Report This issue was created following a WordPress customer report