Skip to content

Releases being affected by out of sync relations #25780

@OcneanuVlad

Description

@OcneanuVlad

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

  1. Create a Release.
  2. Add a parent entity and its related child entities to the Release while their relations are valid.
  3. Update the parent entity and move it through the workflow until it becomes modified.
  4. Add or re-add that parent entity to the Release.
  5. Update the related child entities and move them through the workflow until they become modified.
  6. In some cases, update relations between the parent and child entities during this process.
  7. Add those modified child entities to the Release.
  8. Try to publish the Release.
  9. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugscope:relationsIssue related to relationsseverity: highIf it breaks the basic use of the productsource: core:content-releasesSource is the Content Releases featurestatus: pending reproductionWaiting for free time to reproduce the issue, or more informationversion: 5Issue is present in Strapi 5

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions