Skip to main content

Components and dynamic zones should be populated using the detailed population strategy (on fragments)

In Strapi 5, components and dynamic zones should be populated using the detailed population strategy, with on fragments. The shared population strategy possible in Strapi v4 is no longer supported.

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.

🔌 Is this breaking change affecting plugins?Yes
🤖 Is this breaking change automatically handled by a codemod?No

Breaking change description

In Strapi v4

You could use either the shared or the detailed population strategy to populate components and dynamic zones in a REST API call.

In Strapi 5

You must use on fragments to explicitly detail which components and dynamic zones to populate.

Migration

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

Notes

Additional information on population is available in the REST API documentation.

Manual procedure

Users should ensure that components and dynamic zones are explicitly populated using on fragments, such as in the following example syntax and URL:

  • example generic syntax:

    populate[dynamic-zone-name][on][component-category.component-name]=true

  • example URL:

    /api/articles?populate[dynamic-zone-name][on][component-category.component-name]=true