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 )));
Comments
Comment #1
matulis commentedYou'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#com....
I added patch that solves it for both wysiwyg plugin and filefield sources.
Comment #2
Jean Gionet commentedthis seems to be an issue for Drupal 7 as well. Could a patch be created as well?
thanks
Comment #3
d.novikov commentedTemporarily it can be fixed by setting explicit "/%files" URL on admin/config/media/elfinder page.
Comment #4
ph0enix commentedComment #5
ph0enix commentedComment #6
ph0enix commentedMoved #28