Strapi Not Saving Order of Components in Dynamic Zone When Published

System Information
  • Strapi Version: 5.4.0
  • Operating System: MacOS Sonoma
  • Database: MySQL 8.3
  • Node Version: 18.20.4
  • NPM Version: N/A
  • Yarn Version: 1.22.22

Hello Strapi Community,

I am experiencing an issue with the order of components in a dynamic zone not being saved when I publish my content.
When I add components to the dynamic zone and arrange them in a specific order, the order is not preserved after I publish the content. This issue is causing significant problems as the order of components is crucial for the content display.

Steps to Reproduce:

  1. Create a content type with a dynamic zone.
  2. Add multiple components to the dynamic zone.
  3. Arrange the components in a specific order.
  4. Save and publish the content.
  5. Check the order of components after publishing.

Expected Behavior:

The order of components in the dynamic zone should be preserved after publishing the content.

Actual Behavior:

The order of components is not preserved, and they appear in a different order after publishing.

Additional Information:

  • I have ensured that the dynamic zone is correctly configured in the Content-Type Builder.
  • I am using the latest version of Strapi.
  • I have not implemented any custom save logic for the dynamic zone.

Any help or guidance on how to resolve this issue would be greatly appreciated. Thank you!

i have same problem.

I am experiencing the same with Strapi 5.5.0.

  • Published dynamic zone is sorted by its component ID.
  • Strapi is creating new entries in the database for all components even though not a few components were changed. this means new IDs are being assigned every time you publish.
  • however, one component does not create a new entry therefore the ids remains the same.

Thanks for sharing informative content.