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

matulis’s picture

Assigned: mohamadaliakbari » Unassigned
StatusFileSize
new1.33 KB

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#com....

I added patch that solves it for both wysiwyg plugin and filefield sources.

Jean Gionet’s picture

Version: 6.x-1.x-dev » 7.x-0.6

this seems to be an issue for Drupal 7 as well. Could a patch be created as well?

thanks

d.novikov’s picture

Temporarily it can be fixed by setting explicit "/%files" URL on admin/config/media/elfinder page.

ph0enix’s picture

Version: 7.x-0.6 » 7.x-2.x-dev
Issue summary: View changes
ph0enix’s picture

Status: Active » Patch (to be ported)
ph0enix’s picture

Status: Patch (to be ported) » Closed (duplicate)

Moved #28