La colonna delle risposte non corrisponde

Ho bisogno di aiuto, sto cercando di accedere all’API /latest.json ma la colonna delle risposte non corrisponde, perché? Puoi vederlo negli screenshot, le risposte sono 1 e nell’API JSON sono 0, mi manca qualcosa?


Potresti inviare uno screenshot dei post nell’argomento?
Grazie.

1 Mi Piace

Il parametro reply_count si riferisce alle risposte dirette al post.

Il reply_count di un topic è il numero totale di risposte dirette ai post in quel topic. Non è il numero totale di post nel topic.

4 Mi Piace

Ciao @NateDhaliwal ecco il post…


ha solo una risposta

1 Mi Piace

@Lilly grazie Lily ma nel json come faccio ad ottenere il numero totale di risposte come puoi vedere nel mio forum? se il file json come puoi vedere nessuno di quei campi appartiene alla risposta?

Le risposte all’argomento sarebbero post_count - 1

Per trovare il numero totale di commenti in un argomento, guarda il valore posts_count dell’argomento.

3 Mi Piace

A quale versione dell’app sei? Abbiamo aggiornato la nostra mappa degli argomenti:

Ti consiglio vivamente di aggiornare il tuo sito.

3 Mi Piace

Separately for your question:

reply_count in json refers to a specific reply to a post, e.g. clicking on this particular reply button below the post:

whereas replies is essentially a count of every reply from the OP (topic / first post).


Using this meta topic’s json as an example:

https://meta.discourse.org/t/why-isnt-discourse-more-frequently-recommended-as-a-community-platform/221040.json

if you notice, post number 1 has 3 direct replies even though the topic has many replies.

The gist of it is a “reply_count” is the number of replies to a post, and it doesn’t indicate how many replies a topic has.

4 Mi Piace

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.