notum-cz / strapi-plugin-content-versioning

This plugin enables content versioning in Strapi
129 stars 46 forks source link

Strapi Localization Error: 'The related entity doesn't exist or the entity already exists in this locale' When Saving Localized Content #156

Open mohammed7aafar opened 11 months ago

mohammed7aafar commented 11 months ago

Bug Report: Strapi Localization Error on Saving Localized Content

Describe the Bug

When attempting to save a localized version of content in Strapi, an error message is encountered stating, "The related entity doesn't exist or the entity already exists in this locale." This issue occurs despite the primary entity existing in the default locale, and it appears when trying to add or update localized content in the any additional locale.

Steps to Reproduce the Behavior

  1. Ensure the primary entity exists in the default locale in Strapi.
  2. Switch to the any locale in the Strapi admin panel.
  3. Try to create or update an entity in this locale.
  4. Encounter the error message: "The related entity doesn't exist or the entity already exists in this locale."

Expected Behavior

The expected behavior is the successful creation or updating of the localized content in any locale without encountering any errors, assuming the primary entity in the default locale exists.

Screenshots

Screenshot 2023-12-06 at 10 09 33 PM Screenshot 2023-12-06 at 10 10 14 PM

System

omikulcik commented 11 months ago

Hey @mohammed7aafar, thank you for reporting this issue. I have never seen such error. Will try to replicate it.

omikulcik commented 11 months ago

I was unfortunately unable to reproduce this bug. I did the following:

  1. Updated to strapi 4.15.4 (tested also 4.15.5 and Postgres x sqlite)
  2. I have a content type with just 1 string field so I created an entity in the primary language
  3. Switched to secondary language (Czech) and saved another entity

Everything works as expected. Have I followed the steps correctly please?