Ghost/ghost/core/test
Chris Raible a10b13916a
🐛 Fixed admin error when deleting an unsaved or imported post (#20053)
ref
https://linear.app/tryghost/issue/ENG-845/error-attempted-to-set-lexical-on-the-deleted-record
ref
[https://linear.app/tryghost/issue/ENG-854/🐛-deleting-imported-posts-makes-ghost-unresponsive](https://linear.app/tryghost/issue/ENG-854/%F0%9F%90%9B-deleting-imported-posts-makes-ghost-unresponsive)

- When deleting a post in the editor's Post Settings Menu, if the post
has unsaved changes (indicated by the hasDirtyAttributes property in the
editor), Admin will crash because it tries to save a post revision
before leaving the editor, but the post has already been deleted so
saving fails.
- This can occur when editing a post and quickly deleting it from the
Post Settings Menu before saving is completed.
- It can also occur when attempting to delete an imported post, as the
editor will parse the lexical from the server and may make some minor,
invisible-to-the-user changes to the lexical string locally (e.g. JSON
formatting, or updating the JSON to use extended version of base lexical
nodes), which triggers the same error.
- This fix bypasses the attempt to save a post revision when leaving the
editor if the post is already deleted, which allows the transition back
to the Posts route to succeed.
2024-04-18 10:02:02 -07:00
..
e2e-api Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
e2e-browser 🐛 Fixed admin error when deleting an unsaved or imported post (#20053) 2024-04-18 10:02:02 -07:00
e2e-frontend Added new member signup flow behind labs flag (#19986) 2024-04-04 15:25:41 -07:00
e2e-server Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
e2e-webhooks Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607) 2023-10-23 17:51:34 +01:00
integration 🐛 Fixed file card button not being linked in emails (#20023) 2024-04-16 10:37:28 +00:00
regression Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00
unit Fixed test on Node 20 2024-04-18 13:17:16 +02:00
utils Optimised email stats aggregation query for typical column usage 2024-04-03 16:27:23 +01:00
.eslintignore Added Source as the new default theme 2023-10-03 14:02:08 +02:00
.eslintrc.js Enforced more Mocha lint rules (#19720) 2024-04-16 09:37:06 +02:00