Skip to content
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

Content of book lost, when switching to new WYSIWYG editor #5378

Open
miracuruzrh opened this issue Dec 31, 2024 · 1 comment
Open

Content of book lost, when switching to new WYSIWYG editor #5378

miracuruzrh opened this issue Dec 31, 2024 · 1 comment
Labels

Comments

@miracuruzrh
Copy link

Describe the Bug

Hi

I encountered a bug with a particular book.
When I switch from the old WYSIWYG editor to the new WYSIWYG editor, then the complete content is gone, and a blank page is presented. Fortunately, the content is not lost. I can click on "Delete draft", go back and then the content is available again.

This issue ocourred only in one particular book so far.

Here is the error, which is visible in devtools -> console:

wysiwyg.js?version=v24.12:12 Error: Internal Lexical error: invariant() is meant to be replaced at compile time. There is no runtime version. Error: Expected node %s to have a parent.
    at x (wysiwyg.js?version=v24.12:4:591)
    at Eo.getParentOrThrow (wysiwyg.js?version=v24.12:6:5367)
    at Eo.insertBefore (wysiwyg.js?version=v24.12:6:10148)
    at $N (wysiwyg.js?version=v24.12:12:54218)
    at Di (wysiwyg.js?version=v24.12:12:51994)
    at _o (wysiwyg.js?version=v24.12:14:11452)
    at wysiwyg.js?version=v24.12:16:65925
    at jd (wysiwyg.js?version=v24.12:12:24836)
    at xe (wysiwyg.js?version=v24.12:12:25794)
    at po.update (wysiwyg.js?version=v24.12:12:43951)
jd @ wysiwyg.js?version=v24.12:12
xe @ wysiwyg.js?version=v24.12:12
update @ wysiwyg.js?version=v24.12:12
Zn @ wysiwyg.js?version=v24.12:16
Z$ @ wysiwyg.js?version=v24.12:20
(anonymous) @ app.js?version=v24.12:22
Promise.then
setup @ app.js?version=v24.12:22
initComponent @ app.js?version=v24.12:22
init @ app.js?version=v24.12:22
(anonymous) @ app.js?version=v24.12:22

Steps to Reproduce

  1. Open a Book, which is in the old WYSIWYG format
  2. Click on "Edit" (or press 'e')
  3. Click on "Draft Options"
  4. Select "Switch to new WYSIWYG (in alpha testing)
  5. Confirm the Dialogue box with button Continue
    "Are you sure you want to change the editor for this page?
    Consider the following when changing editors:"
  6. Confirm Browser Message "Leave website?"
    image
  7. End -> Blank page visible and error message in "Devtools -> Console" is visible

Expected Behaviour

The content should not be lost when switching to the new editor.

Screenshots or Additional Context

Bookstack.mp4

Browser Details

Brave Browser

Exact BookStack Version

BookStack v24.12

@ssddanbrown
Copy link
Member

Thanks @miracuruzrh,
If you're also able to share the source of the page content (via old WYSIWYG editor, source button towards the top-right of the editor toolbar) that would also be very helpful for replicating the exact cause here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants