CKEditor: Attachments Dissapearing

Hello,

Getting some strange behaviour when editing a page in WYSIWYG mode on XWiki 9.5.1.

Steps to reproduce:

  1. Create new page
  2. Select a word and click on link button
  3. Upload PDF file from Upload tab, click OK.
  4. Save the page
  5. Note: Attachment has disappeared but link still present
  6. Edit page
  7. Upload new PDF with via link button as stated above.
  8. Save the page
  9. Both PDF links and attachments now as expected!

Note that if I save the page first before uploading anything it all works fine.

Can anyone confirm whether this is just happening to me?

Thanks,
Ben

I think reporting an issues is better suited for this kind of problem than the forum.

Sounds like Loading... . In the first step “Create new page” you’re creating a page from a template (e.g. Blog Post) and not a blank page, right?

Hope this helps,
Marius

Marius,

Yes, that’s the one. Thanks.

Don’t suppose there is a quick way for me to patch this without upgrading my entire Xwiki instance is there?

Regards,
Ben

I’m afraid not. The fix is in the xwiki-platform-legacy-oldcore jar. I don’t think you can take the 9.6-rc-1 version of this jar because it may contain other changes that are not compatible with your version. The only option is to do a git cherry-pick and to build the jar yourself, but it’s not a quick solution.

No worries. I’ve found a temporary way around this by setting the “action on create” field in the template providers to “save and edit” rather than just “edit”. Seems to have done the job!

Thanks again,
Ben

Indeed, that’s a nice workaround.