Skip to main content

Content types with Draft & Publish disabled always have the publishedAt value set to a date

In Strapi 5, content-types with Draft & Publish disabled always have the publishedAt value set to a date.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

Breaking change description

In Strapi v4

In Strapi v4, a content-type with Draft & Publish disabled does not even have a publishedAt attribute.

In Strapi 5

In Strapi 5, the publishedAt attribute always exist even if Draft & Publish is disabled for a content-types.

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

  • If Draft & Publish is enabled, publishedAt is:
    • null for drafts versions of documents
    • and set to the publication date for published versions of documents.
  • If Draft & Publish is disabled, publishedAt is set to the latest creation or edition date of the document.