-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Default values has some weird behaviours with translations #23416
Comments
Just to shed some light on this I will try to explain why the two behaviors are happening and would love your input on what to improve. No new entries with default values created automatically
New default values don't update existing items
With this in mind, I would say that the second observation is very much how it is handled with all other default value and is intended to stay that way. |
On the first observation. I'd expect when the default values are shown on the application and I'm saving that Item that the values are also set on the database. I can imagine that the first approach you are describing could cause issues, but a field that has a default value and it doesn't change (because it doesn't have to be) feels a bit broken. In this situation the default values is only being set on only one language (possible default language). I believe this should be the case for default values as well when you have multiple languages. The default language needs to be set before you can set the default values? If this would make sense? (what do you think?). Would that be a more clear solution? As the situation I have described in the issue above it is mostly prominent when you have only one language available (which was the default). The last solution could be a cleaner solution for sure. I do believe we would want to make this clear for the person who is setting this up what the behaviour/expectation will be. Regarding the second observation.
|
Describe the Bug
If you have a translations which you want to set just for one language. Default values kind of work differently than said "normal" relationships. When having a translation and you are leaving it default the relationship doesn't populate the default values.
You would have to "edit" or remove and add a letter and then the value will be set for your translations.
If you just immediately save or don't change the default values, nothing happens.
Also when adding a new field with a default value. Old entries are not updated as you would expect in other relationships or collections.
To Reproduce
Or if you have already set some items
Added a postgresdb to test it's on 10.13.1 (sorry for the bad fake data, I was very uninspired)
base-test.zip
Directus Version
v10.13.1 and v11.0.2
Hosting Strategy
Self-Hosted (Docker Image)
Database
postgresql 13
The text was updated successfully, but these errors were encountered: