-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getEntityRecords returns null after requesting an "invalid" page #38823
Comments
cc @kevin940726 curious for your thoughts here based on the PR that seems to have made this change: #36984 |
I have run into a smiliar issue where
|
There hasn't been much activity on this issue in a while, are you able to take a look at this @kevin940726 |
The issue was reviewed in today's Editor Bug Scrub and has been confirmed. |
Hi there! Sorry for the late reply! I was busy with other things and forgot about the pings 🙇 (Thanks for re-pinging me though!) I'm not sure if this bug is related to #36984 though. I'm able to reproduce this bug even after reverting that commit. I don't have the time to investigate this at the time, unfortunately. Maybe |
I have run into a similar issue where I am using jQuery. |
Description
getEntityRecords
should return an array of entities (assuming the resolution is finished) that match the queried criteria. However, it sometimes returnsnull
incorrectly.As far as I can tell, it returns
null
when:taxonomy
(I've only testedcategory
andpost_tag
)[]
)null
)Note. This does not occur with
postType post
.Step-by-step reproduction instructions
At first, it returns
null
. After a couple of seconds, when the resolver has finished, it returns a list of two elements: the two categories we created/had in (1).We know there's only two categories, so the second page eventually results in the empty array
[]
.It should return the list of categories we saw in (2), but the snippet now returns
null
.This also occurs if we skip step 2.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: