Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict Error with API ID (Plural) When Enabling i18n on New Single Type or Collection #19750

Open
Eventyret opened this issue Mar 13, 2024 · 4 comments
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:content-type-builder Source is core/content-type-builder package source: plugin:i18n Source is plugin/i18n package status: confirmed Confirmed by a Strapi Team member or multiple community members version: 4 Issue related to v4

Comments

@Eventyret
Copy link
Contributor

Bug report

Required System information

  • Node.js version: 20.11.1
  • NPM version: 10.2.4
  • Strapi version: 4.20.4
  • Database: sqlite
  • Operating system: Mac
  • Is your project Javascript or Typescript: javascript

Describe the bug

When editing a single-type or collection in Strapi to enable i18n, an error is encountered. The API ID (plural) throws an error message indicating that the value is already in use by another content-type, even though this is not the case as it was newly created.

Steps to reproduce the behavior

  • Create a new single type or collection (without i18n)
  • Save the single type or collection.
  • Edit this single-type or collection by enabling i18n.
  • Save the changes.
  • An error is displayed in the Basic Settings regarding the API ID (plural) stating “this value is already in use by another content-type”.

Expected behavior

The expectation is that once i18n is enabled for a single type or collection, it should save without any errors regarding the API ID (plural), as it should not conflict with other content types if it is unique and newly created.

Screenshots

image

Code snippets

Additional context

@Eventyret Eventyret added issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around status: confirmed Confirmed by a Strapi Team member or multiple community members source: plugin:i18n Source is plugin/i18n package version: 4 Issue related to v4 labels Mar 13, 2024
@hanpaine hanpaine added the source: core:content-type-builder Source is core/content-type-builder package label Mar 26, 2024
@rGillyazanov
Copy link

If there is a hyphen in the API ID name, an error is displayed.

@AdityaBanik
Copy link

Facing the same bug

@zirho
Copy link

zirho commented Apr 11, 2024

You can edit schema.json as a workaround.

image

change displayName here.

it's possible that this has no relation with i18n

@Tsun4mii
Copy link

Tsun4mii commented Apr 20, 2024

Facing the same bug. It appears not only on single types but on some collection types in my case

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around source: core:content-type-builder Source is core/content-type-builder package source: plugin:i18n Source is plugin/i18n package status: confirmed Confirmed by a Strapi Team member or multiple community members version: 4 Issue related to v4
Projects
Status: To be reviewed (Open)
Status: To be reviewed (Open)
Status: Reproducible on v4
Development

No branches or pull requests

6 participants