-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Localized text is not saving with lexical rich text editor and Postgres (payload and @payloadcms/* beta 10, next 14.2.0 stable) #6454
Comments
P.S.: Sorry for different ids on the screenshot from admin/API and db. Just dropped and seeded db to make sure it's not my local issue Not sure if the issue present with mongo |
Reproduction vid (test with group, as you can see, it's not an issue with tabs structure): Screencast.from.2024-04-13.13-03-01.webm |
Assigning to @AlessioGr but let me know if this is purely a postgres issue instead |
Good chance this is a lexical issue, yep! Lexical currently does not handle localization nicely, will work on that tomorrow |
Thanks! |
Hi, @AlessioGr! |
Hey @BohdanK-W32 So Lexical does have issues with localized SUB-Fields. E.g. if you have a lexical blocks feature with localized fields, those are currently treated as if they are unlocalizd. However, If the entire lexical editor is localized, that should work as expected! And I was not able to recreate your issue on either postgres or mongodb with a lexical field within a group within a tabs field. Could you share a minimal reproduction repository with beta.14 of payload? |
Well, really interesting, I'll try to reproduce it today. Maybe it's fixed with beta.14 |
@AlessioGr, sent you invite to the project repo with beta 14 setup. It has a The easiest way to reproduce is to use the P.S.: Admin panel save a seed script feature. Just click the link/button "Seed your database" on the dashboard ( |
Hey, |
@BohdanK-W32 the issue was that your richText editor did not have If you add |
As for the issue showcased in your video, it also works as expected for me: CleanShot.2024-04-28.at.16.26.35.mp4 |
Hey @giltine if there is a localized block in a localized richtext editor, the block should always disappear when you switch locales, as the entire parent is localized. If you have a localized block within an unlocalized richText editor though, I agree that should be localizable. I'm working on that right now, alongside full hooks support for lexical blocks |
@AlessioGr, ok, let's give it another try. Here is the reproduction vid: Commit on
Payload version: We removed Also, we checked Here are the hooks tested with: P.S.: the last you tested was without localized because we commented it, so you checked the up-to-date commit, not the commit on the video. |
Fixed in #6489. Fields no longer get omitted from the API response. Proper localization support will be worked on soon |
This issue has been automatically locked. |
Text is not being saved when
localized
set totrue
.Here you can see that richText without localization (hero.richText) and it's html field has data. But no data in localized (
content
field).Update/create is successful, however (obviously) after page reload there is no data (as you can see above in the db tables)
The text was updated successfully, but these errors were encountered: