[wp-trac] [WordPress Trac] #63284: _prime_post_caches is getting called unchunked
WordPress Trac
noreply at wordpress.org
Tue Apr 15 20:12:34 UTC 2025
#63284: _prime_post_caches is getting called unchunked
-------------------------------+------------------------------
Reporter: ckeeney | Owner: joemcgill
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.7.2
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by ckeeney):
I am able to reproduce this on a clean WordPress docker setup. I created
a new repository to demonstrate this issue, but you probably will have to
play with permissions on the volumes folder to make the docker containers
run properly, and it is probably easier to just start from my docker-
compose.yml and no data.
Here are the steps I used to reproduce this issue with a base WordPress
install:
1. Install 3 plugins: Query Monitor, Advanced Custom Fields (just to
create a CPT), and Redis Object Cache (maybe not required, but I have not
reproduced this bug without it yet).
2. Create a CPT and make sure to set both hierarchical and supports page
attributes to true.
3. In the container, install wp-cli and generate a bunch of posts for the
CPT you created:
{{{
wp --allow-root post generate --count=1000 --post_type=my-cpt
}}}
4. Go view those posts in the admin panel and open the query monitor panel
for database queries. If the cache was already warm, you will have to
click the Object Cache -> Flush Cache button at the top of the page and
reload.
5. Observe the big database query.
[[Image(https://i.imgur.com/QIQASIW.png)]]
The issue presents itself when viewing the WP Admin index for a custom
post type that was registered with both hierarchical=true AND supports
.page-attributes.
If I remove either one of these flags when registering the CPT, the issue
goes away.
Here is my repo.
https://github.com/ckeeney/blank-wordpress
The username and password I created in the included MySQL data is ckeeney
/ 987987
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63284#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list