You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a collection contains arrays or blocks with localized fields, copying one locale to another or simply saving the current locale causes other locales to lose their values. It seems that localized values are not merged but instead overwritten. I am using MongoDB, so I'm not sure if this behavior is different with relational databases
Create a new Page. Enter a title, add at least one item in an array or block with filled fields. In the Content tab, add any layout to avoid validation errors. Then, publish the page.
Click "Copy to locale" and select the "en" locale.
Switch back to the previous "lt" locale. You should see that the values in the array and block are lost.
Click "Copy to locale" and select the "lt" locale.
Switch back to the previous "en" locale. You should now see that the values are lost in that locale instead. Only the last saved locale retains its values.
Which area(s) are affected? (Select all that apply)
I also experienced this issue with postgresql in my local with payload version 3.39.1. I assume this bug appear in 3.36.0 because when i use 3.35.0 is work finely.
I dont know if this changed related but in 3.36.0 release have a change in copyToLocale to avoid duplicate 34ead72
I also experienced this issue with postgresql in my local with payload version 3.39.1. I assume this bug appear in 3.36.0 because when i use 3.35.0 is work finely.
I dont know if this changed related but in 3.36.0 release have a change in copyToLocale to avoid duplicate 34ead72
The change you mentioned doesn't seem able to cause the bug. I also found the bug only happens to Arrays or Blocks field that itself is not localized enabled, but it has localized nested field inside.
By the way, #4195 This 'Edit multiple locales at once' feature would be a game-changer for any multi-locale website. It can streamline the workflow and solve countless localization headaches. However, not many people aware of this discussion. If you’ve ever wished you could update all your site’s languages in one go, please join me in requesting this feature!
Describe the Bug
If a collection contains arrays or blocks with localized fields, copying one locale to another or simply saving the current locale causes other locales to lose their values. It seems that localized values are not merged but instead overwritten. I am using MongoDB, so I'm not sure if this behavior is different with relational databases
Link to the code that reproduces this issue
https://github.com/epranka/payload-locales-save-issue
Reproduction Steps
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: