Adding an image in the WYSIWYG editor and previewing it without saving the page first makes the XWiki page corrupt.
How to reproduce:
- Create a new page (it opens in the WYSIWYG-Editor)
- Insert an image via the "Image" -> "Insert Image" dialog.
- Click the Preview button.
- Click "Back to edit"
- Add another image via "Image" -> "Insert Image"
--> Fails with the error message: "An error occured while uploading your file."
After that, the page is corrupt:
- The History starts by 2.1 instead of 1.1
- The page contains one attachment (the first uploaded image), but this cannot be removed anymore (via the attachment tab). When deleting it, it is gone, but after refreshing the page it is there again.
This is 100% reproducible on our system and also with the jetty/HSQLDB.
- is duplicated by
XWIKI-4495 Can't delete page with attached image