Hello, Strapi Community!
I’m facing an issue with content creation and publishing in Strapi. When I create a new wine product and publish it, two entries appear in the database:
Draft Entry: publishedAt is null.
Published Entry: publishedAt has a valid timestamp.
Workflow:
Creating a New Wine: I create a product in the Strapi admin panel.
Publishing the Wine: I publish the product after saving.
Checking the database (data.db), I find both entries, leading to confusion.
Example GraphQL Query:
query Query($status: PublicationStatus) { wines(status: $status) { documentId title createdAt updatedAt publishedAt } }
Variables:
For drafts: { “status”: “DRAFT” }
For published: { “status”: “PUBLISHED” }
Observed Behavior:
Querying drafts returns both draft and published entries.
Multiple entries for the same wine product complicate data management.
Questions:
- Is this expected behavior in Strapi?
- How can I retrieve only published entries without duplicates?
- What are the best practices for managing content lifecycle to avoid duplicates?
Thank you for your help!
This topic has been created from a Discord post (1300096076610801694) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord