Since update to V. 14.4, when images are inserted in edit mode via drag & drop or from the clipboard, they are uploaded as attachments but are no longer displayed after the page is saved. The reason is an incorrect URL to the image source: the entire path is appended to the path in URL-coded form, which leads to the error.
Example: The path for an image added via drag&drop is
Hi, we changed the way the attachments are uploaded since 14.4 (see https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/14.3RC1/#HMiscellaneous).
Now I never reproduced such problem, could you give some more details about your configuration: which servlet engine are you using? Do you use a specific URL configuration? Are you using XWiki behind a proxy that could rewrite URLs?
Could you open the Network tab from the browserâs developer tools and filter by âFileUploaderâ. Then drop a file and check the JSON response. Is the value of the url field right?
We use tomcat-9.0.63, we have set âxwiki.webapppath=ikmz/xwikiâ and deployed to ikmz#xwiki, the installation is behind a reverse proxy without url rewriting ( Apache: RewriteRule ^/ikmz/xwiki/(.*) ajp://xwiki-ikmz.b-tu.de:8009/ikmz/xwiki/$1 [NC,P].
Thanks, Iâll try to check a bit more with your options. Can you confirm the following:
The image appears properly in the editor after the drag&drop
Youâre getting same behaviour with the in-place editor (when you click on edit and it shows the editor immediately without loading a page) and in the standard WYSIWYG editor (displayed when you create a new page)
When you save, the attachment is properly added, itâs just the src of the image which is wrong
Can you try disabling the new temporary attachment feature by performing the following: you go in Administration > Editing > WYSIWYG Editor, and in Advanced configuration you put: config['xwiki-upload'].isTemporaryAttachmentSupported = false;
Then try again to drag&drop a picture in a page (maybe perform a force reload of the editor to be sure the config is taken into account). Let me know if itâs working better or not.
I can confirm this now, too.For this to work, I have to re-enable the plugin wiki-upload again, which I had disabled because it causes an upload error ckeditor.upload.error.emptyreturn.
So my setup is now:
Hi @surli, since the upgrade to 14.9 we have had no problems any longer uploading images via drag and drop, even if the configuration option in WYSIWYG âconfig[âxwiki-uploadâ].isTemporaryAttachmentSupported = false;â is disabled.
But further exploration has shown that there is a problem with multilanguage support and the new image editor xwiki-image. Image editing only works correctly in monolingual wikis with English as defalult language. When I switch to mulitilingual and define another language as default (e.g. German), inserting images via the image edit dialog results in broken source links in view mode. (Dragging and dropping images in the editor works, though, even on translated pages.)
I followed what you describe, and noticed that images upload during the creation of non-english pages produce images with a bad name (i.e., __fileCreatedFromDataURI__.png).
Is it what you experienced as well?
No, that is not what happens. The uploaded image file is correctly attached to the page using the correct file name (or a generated one if the image editor is not used and the image is uploaded by drag & drop or pasted from the clipboard). Rather, the file path that is written is bad. In source code an image added via the image editor in a non-English page looks like that:
Thanks @jmiba. May I ask you to create an issue on jira.xwiki.org with as much information as you can?
I couldnât reproduce your issue for now but having it documented in Jira will greatly increase the chances that I (or somebody else) work on fixing it.