WordPress / WordPress/create-block-theme

Suggest a Warning notice is produced if Save Synced Patterns would break existing content

Open
#757 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Patterns
Dominant language
JavaScript
Stars
417
Forks
66
PR merge metrics
No merged PRs in 30d

Description

The Save Synced Patterns checkbox is not checked by default.
There is a note saying:

Any synced patterns created in the Editor will be moved to the theme. Note that this will delete all synced patterns from the Editor and any references in templates will be made relative to the theme.

What it doesn’t tell you is that any use of the patterns as reusable blocks in posts, pages or other content will not be changed to refer to the theme’s pattern, and will therefore no longer work.

While developing a replacement theme for WP-Pompey I inadvertently selected the Save Synced Patterns checkbox.
4 patterns were generated, but in the process, the removal of the wp_blocks posts meant that several posts were broken.

Fortunately I was working on a local copy of the site.
I did however investigate and document the steps that might be needed in order to recover a live site. It wasn't an easy process. I can add this information in a later comment if necessary.

My requirement is for a better warning system when CBT could possibly destroy existing content.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Save Synced Patterns checkbox and its existing explanatory note. Trace the flow that moves synced patterns to the theme, then verify the warning explains that reusable-block references in posts, pages, and other content may stop working. Done means users are clearly warned before selecting the option.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
content
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.