-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Description
Node Version
20.17
Package Manager
yarn
Package Manager Version
Classic, lockfile v1
Strapi Version
5.30.1
Operating System
Strapi Cloud
Database
Strapi Cloud
Javascript or Typescript
Typescript
Reproduction URL
No response
Bug Description
When publishing a Release, Strapi may fail with a relation validation error if entities or their relations were modified after those entities were added to the Release.
In the reported case, the Release appeared valid when the entities were first added. However, after later modifying parent and child entities and updating some relations, publishing the Release failed with the following error:
ValidationError: 1 relation(s) of type api::chapter.chapter associated with this entity do not exist
Based on the observed behavior, it appears that the Release stores the entity state from the moment the entity is added and does not automatically refresh later changes, especially relation updates. As a result, when publishing, Strapi re-validates relations against outdated Release data and fails.
A workaround was found by removing the modified entities from the Release and adding them again. After re-adding them, the Release published successfully.
Steps to Reproduce
- Create a Release.
- Add a parent entity and its related child entities to the Release while their relations are valid.
- Update the parent entity and move it through the workflow until it becomes modified.
- Add or re-add that parent entity to the Release.
- Update the related child entities and move them through the workflow until they become modified.
- In some cases, update relations between the parent and child entities during this process.
- Add those modified child entities to the Release.
- Try to publish the Release.
- Observe that publishing fails with a relation validation
Expected Behavior
One of the following behaviors would be expected:
- The Release automatically reflects the latest entity state, including updated relations, before publishing, or
- The UI clearly indicates that entities added earlier may now be outdated and need to be refreshed or re-added,
- There is a built-in way to refresh or sync entity state inside a Release before publishing.
Logs
Code Snippets
No response
Media
No response
Additional information
No response
Confirmation Checklist
- I have checked the existing issues for duplicates.
- I agree to follow this project's Code of Conduct.