Skip to content

Conversation

@Mamaduka
Copy link
Member

What?

This is a follow-up to #59983.
Noticed while testing the #71302.

PR updates getEntityRecordsTotalPages selector and avoids error when the optional query argument isn't provided.

Testing Instructions

  1. Open the block editor.
  2. Run the following selector in the console - wp.data.select( 'core' ).getEntityRecordsTotalPages( 'postType', 'post' ).
  3. It shouldn't trigger an error.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

CleanShot 2025-08-22 at 11 10 38

@Mamaduka Mamaduka self-assigned this Aug 22, 2025
@Mamaduka Mamaduka requested a review from nerrad as a code owner August 22, 2025 07:18
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Package] Core data /packages/core-data labels Aug 22, 2025
@Mamaduka Mamaduka requested a review from ramonjd August 22, 2025 07:19
@github-actions
Copy link

github-actions bot commented Aug 22, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ramonjd <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

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

LGTM

Good catch!

@github-actions
Copy link

Flaky tests detected in cd83db1.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17148867345
📝 Reported issues:

@Mamaduka Mamaduka merged commit 876e8cf into trunk Aug 22, 2025
76 checks passed
@Mamaduka Mamaduka deleted the fix/get-entity-records-total-pages-error branch August 22, 2025 07:58
@github-actions github-actions bot added this to the Gutenberg 21.6 milestone Aug 22, 2025
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 [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants