Skip to content

22794 blocks in synced patterns with overrides enabled can no longer be hyperlinked as of wp 69#22924

Merged
JorPV merged 3 commits intotrunkfrom
22794-blocks-in-synced-patterns-with-overrides-enabled-can-no-longer-be-hyperlinked-as-of-wp-69
Jan 29, 2026
Merged

22794 blocks in synced patterns with overrides enabled can no longer be hyperlinked as of wp 69#22924
JorPV merged 3 commits intotrunkfrom
22794-blocks-in-synced-patterns-with-overrides-enabled-can-no-longer-be-hyperlinked-as-of-wp-69

Conversation

@vraja-pro
Copy link
Copy Markdown
Contributor

@vraja-pro vraja-pro commented Jan 29, 2026

Context

  • we want to restore inline link feature on synced patterns when using WordPress 6.9.

Summary

This PR can be summarized in the following changelog entry:

  • Fixes a bug where the inline link icon was missing when editing a synced pattern in the Block Editor on WordPress 6.9.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Using the Twenty Twenty Five theme, make sure you are using WordPress 6.9.
  • On a post, create a couple of blocks and convert them to synced patterns: one with a Heading block, one with a Paragraph block, and one with a Buttons block with one button. You can also combine more than one of these blocks in the same pattern.
  • Click each pattern and click Edit Original.
  • In the pattern editor, click on each block, then under the Advanced panel, click Enable Overrides, and give the block a name. Click Save.
  • Repeat the above for each of your patterns, then return to the original page.
  • Click on the Heading, Paragraph, and Button block in turn as if you're going to edit them; note the options you have in the block toolbar: Bold, Italic, and Link.
  • Smoke test the link options.

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.
  • This PR also affects Yoast SEO for Google Docs. I have added a changelog entry starting with [yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached the Google Docs Add-on label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.
  • I have run grunt build:images and commited the results, if my PR introduces new images or SVGs.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #22794

@vraja-pro vraja-pro added the changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog label Jan 29, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Jan 29, 2026

Pull Request Test Coverage Report for Build 3a5c5aca53f33b75c3ac3ea8db0d140a68bbf9a5

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.5%) to 53.46%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/initializers/block-editor-integration.js 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
packages/js/src/initializers/block-editor-integration.js 1 0.0%
Totals Coverage Status
Change from base Build a335bb11142c5493984a1579b75c2a8e18425d1a: 0.5%
Covered Lines: 33044
Relevant Lines: 61976

💛 - Coveralls

@JorPV JorPV requested a review from Copilot January 29, 2026 13:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores the inline link feature for synced patterns in WordPress 6.9 by preserving core WordPress link capabilities when registering custom format types.

Changes:

  • Modified format registration logic to merge core link settings with custom settings
  • Added logic to retrieve and preserve original core/link settings before replacing them
  • Reduced ESLint max-warnings count from 44 to 43

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/js/src/initializers/block-editor-integration.js Added logic to preserve core link settings when registering custom format types, ensuring WordPress 6.9 compatibility
packages/js/package.json Decreased ESLint max-warnings threshold by 1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Store the original core/link settings before removing it
// This ensures we preserve all internal WordPress capabilities and references
const coreLinkSettings = select( "core/rich-text" ).getFormatType( "core/link" );

Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The coreLinkSettings retrieval could return undefined if core/link hasn't been registered yet at this point in the execution. This would cause the merge logic on lines 58-60 to silently fail to preserve core capabilities. Consider adding a check to ensure coreLinkSettings exists before proceeding with format registration, or document why this timing is guaranteed to be safe.

Suggested change
// If the core/link format is not yet registered, do not proceed with
// modifying format types to avoid losing core capabilities.
if ( ! coreLinkSettings ) {
return;
}

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are checking if coreLinkSettings on line 58.

Comment thread packages/js/src/initializers/block-editor-integration.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JorPV
Copy link
Copy Markdown
Contributor

JorPV commented Jan 29, 2026

LGTM ✅

@JorPV JorPV merged commit decb667 into trunk Jan 29, 2026
19 checks passed
@JorPV JorPV deleted the 22794-blocks-in-synced-patterns-with-overrides-enabled-can-no-longer-be-hyperlinked-as-of-wp-69 branch January 29, 2026 15:32
@JorPV JorPV added this to the 27.0 milestone Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: bugfix Needs to be included in the 'Bugfixes' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocks in synced patterns with 'overrides enabled' can no longer be hyperlinked as of WP 6.9

4 participants