AlessioGr / payload-plugin-lexical

Extends payload CMS with Meta's lexical RichText editor - a much more advanced and customizable richtext editor
MIT License
149 stars 6 forks source link

Doesn't save #19

Closed johannesschaffer closed 1 year ago

johannesschaffer commented 1 year ago

No matter whether I save it via "Save Draft" or "Publish changes" -> After reload everything is gone. It works in some collections, in others it doesn't. I'll hopefully have more information soon... Sometimes it works, sometimes not, in the same collection (actually global). Weird... I will close this for now since it currently works (I tried it multiple times without changing anything, at some point it suddenly worked) & will reopen it if I have more information. As a note for others: The indicator was, that both buttons immediately turned back "on" (instead of staying grayed out) & when wanting to leave the site, payload warned me I had unsaved changes.

AlessioGr commented 1 year ago

No matter whether I save it via "Save Draft" or "Publish changes" -> After reload everything is gone

Is this related to #1 by any chance?

johannesschaffer commented 1 year ago

Is this related to #1 by any chance?

No, I have drafts but not autosave

AlessioGr commented 1 year ago

did you fix this? @johannesschaffer

johannesschaffer commented 1 year ago

Read the updated initial comment. Not really... It however works now (tried it in multiple collections)

AlessioGr commented 1 year ago

Hmmm weird. Looking into the issue with payload saying it's unsaved content now. I think currently, it thinks it's updated when you just click in the richtext editor text. Which shouldn't cause any issues though, it's just a bit annoying

johannesschaffer commented 1 year ago

I already raised an issue for that a few days ago. That's a different bug. I specifically clicked on save & it immediatly unsaved (like descriped in the original comment).

johannesschaffer commented 1 year ago

Ok, just had the some bug again. Restarting the dev server solves it. I have however no idea what exactly causes it. It's probably a bug with payload (which is in genreal quite buggy:() The cause seems to be renaming the field (changing the "name" prop).

AlessioGr commented 1 year ago

Ok, just had the some bug again. Restarting the dev server solves it. I have however no idea what exactly causes it. It's probably a bug with payload (which is in genreal quite buggy:() Some cause seems to be renaming the field (changing the "name" prop).

That's really strange. I'm personally using the richtext editor a lot, and other than when autosave is enabled, I've never had this issue. Does it only happen if you have multiple editors on one single page by any chance?