# Come debuggare un post su WP con il numero di commenti errato

**URL:** <https://meta.discourse.org/t/how-to-debug-a-post-on-wp-having-the-incorrect-comment-number/134453>\
**Category:** WordPress\
**Created:** [26 Novembre 2019, 4:35pm UTC](https://meta.discourse.org/t/how-to-debug-a-post-on-wp-having-the-incorrect-comment-number/134453 "2019-11-26T16:35:11Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jtbayly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jtbayly/32/119510_2.png) [@jtbayly](https://meta.discourse.org/u/jtbayly)\
**Post date:** [17 Dicembre 2019, 6:36pm UTC](https://meta.discourse.org/t/how-to-debug-a-post-on-wp-having-the-incorrect-comment-number/134453/8 "2019-12-17T18:36:16Z")

</div>

Qual è il valore corretto del campo “wpdc\_sync\_post\_comments”?

Sto ancora lottando con questo problema.

Sono appena andato su un argomento che aveva un solo post. Il conteggio dei commenti nel front-end di WP dovrebbe essere “1”, ma mostrava 0. wpdc\_sync\_post\_comments era impostato su “0”. Presumo che sia un flag V/F e che dovrebbe essere impostato su 1, quindi l’ho modificato e salvato il post. Aggiornando il front-end di WP non ho visto cambiamenti, quindi ho lasciato un nuovo post sull’argomento Discourse e ho aggiornato immediatamente la pagina WP. Il conteggio dei commenti è salito correttamente a “2”. Ho aggiornato immediatamente la pagina di nuovo ed è sceso di nuovo a “0”! Nella schermata di modifica, ho scoperto che wpdc\_sync\_post\_comments era stato reimpostato su 0 e

discourse\_comments\_count == 0  
discourse\_comments\_raw ===  
`{"id":1451,"posts_count":3,"filtered_posts_count":1,"posts":[],"participants":[` (trunc)

Un altro post ha quanto segue:  
discourse\_comments\_count == 3  
discourse\_comments\_raw ===  
`{"id":1447,"posts_count":17,"filtered_posts_count":4,"posts":[],"participants":` (trunc)

---

_[View the full topic](https://meta.discourse.org/t/how-to-debug-a-post-on-wp-having-the-incorrect-comment-number/134453)._
