dokuwiki-plugin-prosemirror icon indicating copy to clipboard operation
dokuwiki-plugin-prosemirror copied to clipboard

Better loading failure mode

Open solarkraft opened this issue 4 years ago • 1 comments

Discovered while working on my DokuWiki distribution:

When an error occurs, the promised redirection never happens and, due to the cookie, it will always attempt and fail to open the visual editor.

In the video you see it switching back to the text editor once, I am not sure why.

https://user-images.githubusercontent.com/1337470/130485752-1bb72fcf-9173-4fec-8d2a-d1366596b215.mov

Suggested solutions to avoid bricking the editor:

  • Only set the cookie after the editor has successfully loaded
  • Reset the cookie on error
  • Instruct the user to clear cookies (and avoid the visual editor)

The actual error is likely in the way I install the plugin, so I track it in my repo.

solarkraft avatar Aug 23 '21 16:08 solarkraft

The TL;DR solution/workaround for the most common version of this problem is install from the release, not the source (as there is javascript that needs to be compiled).

Maybe the error message should point to an internal error with the possible cause of a wrong installation. It can also be an error in some other plugin's script though, since due to the bundling a single one will take down the JS of the whole page.

The suggestions above still apply, which is why I'm keeping this issue open.

solarkraft avatar Oct 12 '21 16:10 solarkraft