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

Non-localizable fields don't keep their value after locale switch and no "fill in from another locale" button in collection types #17700

Closed
drazik opened this issue Aug 18, 2023 · 21 comments · Fixed by #18773
Assignees
Labels
flag: EE Issues correlates to internal EE ticket issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: plugin:i18n Source is plugin/i18n package status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@drazik
Copy link

drazik commented Aug 18, 2023

Bug report

Required System information

  • Node.js version: 18.12.1
  • NPM version: 8.19.2
  • Strapi version: 4.12.5
  • Database: MySQL 5.7
  • Operating system: Ubuntu 22.04.3
  • Is your project Javascript or Typescript: Typescript

Describe the bug

I have two locales in my application: fr (default) and en. I have a team-member collection type with 3 non-localizable fields and 1 localizable field. When I fill the FR locale data and save it, then switch to English locale, I don't see the "Fill in from another locale" button and all the fields are empty, forcing me to re-type all the non-localizable fields data.

After filling the EN data and saving, the "Fill in from another locale" button appears.

The problem also exist on edit.

Steps to reproduce the behavior

  1. Create an item in a collection type with localizable fields
  2. Fill all fields of the default locale
  3. Save it
  4. Switch to another locale
  5. Non-localizable fields are empty and "Fill in from another locale" button is absent

Expected behavior

The non-localizable fields should keep the value entered for the default locale, and the "Fill in from another locale" button should be visible.

Screenshots

Default locale (FR) data entered and saved:

image

After switch to other locale (EN):

image

Code snippets

N/A

Additional context

N/A

@drazik drazik changed the title Non-localizable fields don't keep their value after locale switch and no "fill in from another locale" button Non-localizable fields don't keep their value after locale switch and no "fill in from another locale" button in collection types Aug 18, 2023
@bennyhoyer
Copy link

i have the same issue as described by @drazik after updating from 4.10.5 to 4.12.5. (node 18.17.1)

reloading the page loads the "Fill from another locale" button, but it would be helpful to have the old behavior back.

@lukesmmr
Copy link

We have the same issue after updating from 4.10.5 to 4.12.5. As @BennyMoser points out, reloading the page fixes it and allows our editors to populate from the other locale. This is particularly important if you have non-localized fields that you don't want to type in again. Having to reload the page is not an ideal flow.

Interesting enough, I cannot reproduce this locally with 4.12.5 with a sqlite database on Mac OS.
We are running on:

  • Node.js version: 18
  • Strapi version: 4.12.5
  • Database: Postgres
  • Operating system: Ubuntu
  • Is your project Javascript or Typescript: JavaScript

@rktyt
Copy link

rktyt commented Aug 24, 2023

Same issue.
strapi v4.12.6

We have upgraded from 4.11.3 to 4.12.1 and then to 4.12.6.
However, we are not upgrading the production environment because of a critical bug for us.
This is one of them.

@joshuaellis joshuaellis added issue: bug Issue reporting a bug severity: medium If it breaks the basic use of the product but can be worked around status: pending reproduction Waiting for free time to reproduce the issue, or more information source: plugin:i18n Source is plugin/i18n package labels Aug 31, 2023
@derrickmehaffy derrickmehaffy added status: confirmed Confirmed by a Strapi Team member or multiple community members and removed status: pending reproduction Waiting for free time to reproduce the issue, or more information labels Sep 5, 2023
@web-admin

This comment was marked as spam.

@derrickmehaffy
Copy link
Member

Might be related to (or duplicate of #17860)

@Eventyret Eventyret added severity: high If it breaks the basic use of the product flag: EE Issues correlates to internal EE ticket and removed severity: medium If it breaks the basic use of the product but can be worked around labels Sep 15, 2023
@Eventyret
Copy link
Contributor

Escalated due to confirmation from TID 4804

@MAxiaq
Copy link

MAxiaq commented Oct 6, 2023

Any update on this, I ran into the same problem after updating to 4.14.0. Is this being looked into?

@Boegie19
Copy link
Collaborator

Boegie19 commented Oct 6, 2023

I am 99% sure it does since they escalated it due to an internal ticket of an enterprise user.
And if not they will look at it shortly.

@lukesmmr
Copy link

Any update on this issue? We can still verify this behaviour in 4.14.3.

@derrickmehaffy
Copy link
Member

I've mentioned it to our engineers in a call yesterday (specifically to an engineering manager) and they will take a look.

However it looks like a community member has made a PR that might also resolve it.

@joshuaellis
Copy link
Member

I've just taken a look at this issue using our latest main version and i've not been able to reproduce (see video attached) have you upgraded and rechecked the issue is still happening?

CleanShot.2023-10-19.at.10.25.46.mp4

@joshuaellis joshuaellis added status: can not reproduce Not enough information to reproduce and removed status: confirmed Confirmed by a Strapi Team member or multiple community members labels Oct 19, 2023
@github-actions
Copy link
Contributor

This is a templated message

Hello @drazik,

Thank you for reporting this bug, however we are unable to reproduce the issue you described given the information we have on hand. Can you please create a fresh project that you are able to reproduce the issue in, provide clear steps to reproduce this issue, and either upload this fresh project to a new GitHub repo or compress it into a .zip and upload it on this issue?

We would greatly appreciate your assistance with this, by working in a fresh project it will cut out any possible variables that might be unrelated.
Please note that issues labeled with status: can not reproduce will be closed in 14 days if there is no activity.

Thank you!

@JustTB
Copy link

JustTB commented Oct 23, 2023

I can still reproduce it after update to current version v4.14.5
Since this is a race condition (looking at the fix above) you might try more complex types with relations.
v4.14.5 did not solve that for us.

@derrickmehaffy derrickmehaffy added status: pending reproduction Waiting for free time to reproduce the issue, or more information and removed status: can not reproduce Not enough information to reproduce labels Oct 23, 2023
@bennyhoyer
Copy link

I can confirm that this problem occurs in the latest version 4.14.5.

It took me 5 minutes to reproduce this error with the normal strapi create cli. All I did was add a localizable collection type and even with just one field the error is reproducible.
Here is the link for my project, hoping someone can fix this problem:
https://github.com/BennyMoser/strapi-localization-bug

strapi-bug.mp4

@Boegie19 Boegie19 added status: confirmed Confirmed by a Strapi Team member or multiple community members and removed status: pending reproduction Waiting for free time to reproduce the issue, or more information labels Oct 24, 2023
@derrickmehaffy
Copy link
Member

I'm also able to reproduce the issue but the "fill in button" doesn't even exist anymore for me either:

https://www.loom.com/share/9c0393ec505b4f1aab724e7719089eed?sid=27ca6f0e-7a46-40fb-8fe8-cdc853990c41

@JustTB

This comment was marked as spam.

@akerd

This comment has been minimized.

@sam-gre
Copy link

sam-gre commented Nov 24, 2023

I can confirm the same. I have upgraded to the latest stable version of strapi (4.15.4) and have the exact same issues. Something i noticed is that if the locale already has content, the "fill from another localed" appears. If no content, then it requires the reload for it to appear.

@JustTB
Copy link

JustTB commented Mar 1, 2024

It would be really nice if this issue gets some attention. Since the PR is open with a comment from January that it will be fixed in the afternoon. Please, please fix. 🙏🏽 🥺

@hanpaine
Copy link

Thanks for your patience folks - we're hoping to get the fix merged this week and deployed next 🤞🏻

@derrickmehaffy
Copy link
Member

It would be really nice if this issue gets some attention. Since the PR is open with a comment from January that it will be fixed in the afternoon. Please, please fix. 🙏🏽 🥺

Sorry about that, fell off my radar. PR updated and hopefully should be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: EE Issues correlates to internal EE ticket issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: plugin:i18n Source is plugin/i18n package status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
Status: Fixed/Shipped
Status: Fixed/Shipped
Status: Done