PHP Warning in comment-template.php after WordPress 6.9 update

Posted in: Newspaper
Post count: 5

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)

Post count: 35449

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!

Post count: 81

we have the same problem since the update

error

  • This reply was modified 7 months by Archerix.
Post count: 81

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"

Post count: 35449

Hi,

The code error lines are all related to the comments. Are there any extra plugins for comments that are used? Do you have a specific setting set on the comments (maybe in wordpress or individual articles?)

Thank you!

Post count: 81

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.

error

Post count: 35449

Hi,
I believe this issue is related to the comment element in the theme, as well as in the tagDiv Cloud Library.
I’ve notified our developer about this, and they will investigate it as soon as possible.
Thank you!

Post count: 5

Thank you, Calin & Archerix

Post count: 29

Same here, happens only at sites with newspaper theme and wp 6.9

Please release an update

Post count: 35449

Hi,
This has been fixed for the upcoming theme update, which we expect to release in January. Unfortunately, I don’t have an exact date yet.
Thank you!

Post count: 5

Thank you, @Calin

Post count: 81

Problem solved with the update, thanks @calin

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.