close
Skip to content

Fix: Visual Revisions: Experience seems broken for templates#75825

Closed
prasadkarmalkar wants to merge 1 commit intoWordPress:trunkfrom
prasadkarmalkar:fix/template-revisions-wp-id-normalization
Closed

Fix: Visual Revisions: Experience seems broken for templates#75825
prasadkarmalkar wants to merge 1 commit intoWordPress:trunkfrom
prasadkarmalkar:fix/template-revisions-wp-id-normalization

Conversation

@prasadkarmalkar
Copy link
Copy Markdown
Contributor

What?

Closes #75642

Fixes the visual revisions panel for the wp_template and wp_template_part post types, where the revision content was not showing and loading infinitely.

Why?

To fix the issue of visual revisions not showing for the templates and template parts.

How?

While fetching the revisions, setting the id to the revisionKey instead of having different wp_id and id via normalizing the fetch revisions.

Testing Instructions

  1. Open site editor
  2. Go to patterns > Header
  3. Open a header template part
  4. Click on revision in the sidebar

Testing Instructions for Keyboard

Screenshots or screencast

Before After
Screenshot 2026-02-23 at 6 41 18 PM Screenshot 2026-02-23 at 6 41 38 PM

id: record[ revKey ],
} ) );
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should map the records to use id, we should use the correct revision key elsewhere correctly. Changed in #75953

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Core data /packages/core-data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visual Revisions: Experience seems broken for templates

2 participants