Automattic / Automattic/jetpack

Site Editor: category term bindings fail with 428 when blocks module is active on Atomic

Open
#50,298 0 comments 0 reactions 1 assignee Assigned to @enejb View on GitHub
[Focus] Blocks [Platform] Atomic Bug
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

## Summary

Category Link blocks in the Navigation block show "Missing Category" in the Site Editor on WP.com Atomic sites when the Jetpack blocks module is active and the navigation contains multiple category links. The front end renders correctly.

Image

## Root cause

The Site Editor resolves `core/term-data` block bindings by firing individual `/wp/v2/categories/?context=edit` REST API calls for each bound term. When the Jetpack blocks module is active, the editor JS stack loads differently, and the concurrent authenticated REST requests fail with HTTP 428 (Precondition Required) and `rest_forbidden_context` on WP.com Atomic.

The issue scales with the number of category links. A small number of categories may work fine, but as more are added, the concurrent REST calls begin failing.

## Steps to reproduce

1. WP.com Atomic site with Jetpack blocks module enabled
2. Create a Navigation block with multiple Category Link blocks (these use `core/term-data` block bindings)
3. Open the Site Editor
4. Category links show "Missing Category" in the sidebar/editor

Disabling the Jetpack blocks module resolves the issue.

## Expected behavior

Category Link blocks should display correctly in the Site Editor regardless of how many categories are in the navigation.

## Evidence

- Console log shows all `/wp/v2/categories/?context=edit` requests returning 428
- `wp_pattern_category` and `help-center` endpoints also fail with 428 (broad auth failure)
- Server-side capabilities are correct (`edit_term: true`, `manage_categories: true`)
- `core/post-data` bindings (e.g. post date) work fine since they don't make separate REST calls
- Jetpack connection is healthy
- Reproduced on multiple sites

## Where the fix likely belongs

This sits at the intersection of three layers:

1. **WP.com Atomic**: nonce/auth rate limiting may be too aggressive for concurrent REST calls from the editor
2. **WordPress core / Gutenberg**: `core/term-data` block binding source fires individual REST calls per term instead of batching them
3. **Jetpack blocks module**: loading the full block editor JS stack changes how REST requests are authenticated, triggering the failure

## Workaround

Disabling the Jetpack blocks module resolves the display issue without modifying site content.

## Related

- Linear: [TSCODE-592](https://linear.app/a8c/issue/TSCODE-592/site-specific-category-link-blocks-show-missing-category-in-site)
- Zendesk: #11397183-zen

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.