After updating to WordPress 6.9, I’m seeing this PHP warning in my error logs on all single post pages:
PHP Warning: Attempt to read property “ID” on null in /wp-includes/comment-template.php on line 1791
Environment:
WordPress 6.9
Newspaper theme (latest version)
PHP 8.4
To reproduce:
Any page load on a single post triggers the warning. Visible in nginx/PHP error logs only—doesn’t affect front-end display.
Also seeing the error triggered on direct requests to:
/tdb_templates/single-post-template-urban-observer/
Notes:
Error did not occur on WordPress 6.8
No theme or plugin changes made before/after update
Happens with legitimate traffic (Googlebot, Bingbot, real visitors)
Hi,
We ran several tests but couldn’t reproduce the issue on our side it may be related to a specific configuration. Could you please contact us via email at contact@tagdiv.com and provide temporary wp-admin access so we can investigate and fix the problem?
Also, if you prefer not to use the comments section, you can remove the Comments element from the single post template.
Thank you!
example from ngnix
2025/12/13 13:13:53 [error] 1428#1428: *356575 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/otakupt.com/wp-includes/comment-template.php on line 1791; PHP message: PHP Warning: Attempt to read property "ID" on null in /var/www/otakupt.com/wp-includes/comment-template.php on line 1791" while reading response header from upstream, client: ****, server: otakupt.com, request: "GET /anime/episodio-19-de-uma-musume-cinderella-gray-foi-adiado/ HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.3-fpm.sock:", host: "www.otakupt.com"
Hi, I use wpDiscus, but even after removing the plugin, the problem persists, so it’s not related to it. I removed Jetpack and the problem also remains. It doesn’t seem to be related to any plugin.
The errors don’t appear when I disable “tagDiv Composer”, but I’m getting a new error, see the screenshot below.

