# Les données de Post\_created ne correspondent pas aux publications réelles

**URL:** <https://meta.discourse.org/t/post-created-data-not-matching-actual-posts/415542>\
**Category:** Product Support\
**Tags:** rest-api\
**Created:** [Octobre 23, 2026, 8:36 UTC](https://meta.discourse.org/t/post-created-data-not-matching-actual-posts/415542 "2026-10-23T08:36:00Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [Novembre 4, 2026, 4:19 UTC](https://meta.discourse.org/t/post-created-data-not-matching-actual-posts/415542/19 "2026-11-04T16:19:11Z")

</div>

Le problème ici était que les sujets créés via l’API acceptaient des valeurs `archetype` arbitraires, et que ces sujets n’étaient pas pris en compte dans les valeurs `user_stats`. Nous avons renforcé cette partie afin que les valeurs `archetype` arbitraires soient correctement gérées dans le code. Voici la PR qui résout le problème :

> <https://github.com/discourse/discourse/pull/45364>
>
> Previously, \`Guardian#can\_change\_archetype?\` only special-cased the banner and p…rivate message archetypes, so any other string sent as \`archetype\` when creating or updating a topic was saved as-is. Topics with an unregistered archetype are silently left out of everything that filters on \`regular\` (user stats, the directory, reports, hot topics) and skip the category requirement.
> 
> This change only allows archetypes registered through \`Archetype.register\`. Unknown values are ignored when creating a topic (it's created as \`regular\`, matching how a denied archetype is already handled), rejected when updating one, and \`Topic\` now validates the archetype whenever it changes.

---

_[View the full topic](https://meta.discourse.org/t/post-created-data-not-matching-actual-posts/415542)._
