Skip to content

Non-localized fields data loss when filling from another locale #18942

@rsandgarten

Description

@rsandgarten

Bug report

Required System information

  • Node.js version: v18.17.1
  • NPM version: 9.6.7 (not using npm)
  • Yarn version: 1.22.19 (using yarn)
  • Strapi version: 4.15.4 (but was also noted on my prod environment on 4.14.4)
  • Database: SQLite (also on prod environment with postgresql)
  • Operating system: Windows (also on prod environment linux dockerized)
  • Is your project Javascript or Typescript: Javascript

Describe the bug

When using internalization, the fields that are not localized (advanced setting configuration) get lost when using the "Fill in from another locale" button. This is very frustrating when we already filled up a list of images, we lose them, and we need to set those up again.
An additional note, and probably related, is that the "Fill in from another locale" button does not show up right after you switch the language.

UPDATE: This is only happening with media data type fields (images, documents, etc), not with other data types. Still, it's frustrating enough to lose plenty of selected images when setting up a new language.

Steps to reproduce the behavior

  1. yarn create strapi-app my-project --quickstart
  2. Add new language. In my case: Spanish (Argentina) (es-AR)
  3. Add new collection type. Example "Restaurant", and enable Internationalization.
  4. Add "name" text field, with "Enable localization on this field" enabled (checked)
  5. Add "photo" media field (single image), with "Enable localization on this field" DISABLED (unchecked).
  6. Create a dummy entry on default locale (en). Input name, and upload photo image. Save.
  7. Change language (es-AR) from selector. Note how "Fill in from another locale" button is missing.
  8. Hit Save on new locale
  9. Note "Fill in from another locale" button now shows up. Click it and choose English (or whatever default language)
  10. Confirm and save.
  11. Note only the "name" was filled, but "photo" is empty.
  12. Switch back to original language.
  13. Note photo is empty for all languages.

Expected behavior

I would expect not to loose data (images or whatever data type field) on non-localized fields, whenever I fill in from another locale. Also, I would expect the "Fill in from another locale" button to show up right after I switch language.

Screenshots

strapi_issue01

strapi_issue02

strapi_issue03

Code snippets

N/A

Additional context

N/A

Metadata

Metadata

Assignees

Labels

issue: bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: plugin:i18nSource is plugin/i18n packagestatus: can not reproduceNot enough information to reproduce

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions