Skip to content

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

@miracuruzrh

Description

@miracuruzrh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions