[wp-trac] [WordPress Trac] #36409: Comments number is wrong
WordPress Trac
noreply at wordpress.org
Thu Feb 19 10:31:24 UTC 2026
#36409: Comments number is wrong
-------------------------------------------------+-------------------------
Reporter: sidati | Owner: pbearne
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 7.0
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests has- | Focuses: template
screenshots |
-------------------------------------------------+-------------------------
Comment (by hbhalodia):
Hi @wildworks, The tests were failing because, I had one feedback here --
https://github.com/WordPress/wordpress-
develop/pull/9277#discussion_r2824097168, to use get_comments function
instead of using direct DB query. When I changed that, it looks perfect,
but get_comments, egarly loads the comment meta which fails the
`metaCache` test as we see which needs to be lazily loaded.
For now, I have updated the get_comments call to use
`'update_comment_meta_cache' => false,`, which prevents preload the
comment meta and use lazyload mechanism (wp_lazyload_comment_meta) to work
properly just like direct SQL query call.
Thanks,
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36409#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list