elfinder don't show image thumbnails in multilingual sites
I try to use elfinder inside ckeditor (wysiwyg module) in a multilingual site. when I am in default language everything works fine, but when I go to my language http://example.com/fa/node/add/page and try elfinder I see filemanager without image thumbnails. I find It's because elfinder get wrong filebrowserBrowseUrl parameter during initiation.
"filebrowserBrowseUrl": "/fa/elfinder?app=ckeditor"
and I think it's wrong and should be:
"filebrowserBrowseUrl": "/elfinder?app=ckeditor"
because elfinder uses this URI as its base url for display thumbnail.
I try this change on code and its seems it can solve problem. but I afraid use it in production unless someone expert approve it.
line 398 inside elfinder_wysiwyg_plugin function:
$language_default = variable_get('language_default', 'en');
$elfinder_url = url('elfinder', array('language'=>$language_default->language,'query' => array('app' => $editor )));
matulis commented 7 years ago
elfinder-6.x-1.x-dev_No-thumbs-in-multilingual-site_1205400.patch
You're right, language prefix added to elfinder URL in multilingual site. look at http://api.drupal.org/api/drupal/includes--common.inc/function/url/6#comment-6004
I added patch that solves it for both wysiwyg plugin and filefield sources.
Jean Gionet commented 7 years ago
this seems to be an issue for Drupal 7 as well. Could a patch be created as well?
thanks
d.novikov commented 7 years ago
Temporarily it can be fixed by setting explicit "/%files" URL on admin/config/media/elfinder page.