When enabling 'Bandwidth Optimisation' for 'Aggregate and compress CSS files' it fails to style the editor.

'Aggregate JavaScript files' works fine.

Comments

bachomp’s picture

solution: set the type to external rather than module. This will ensure that the css files are not included in the aggregation

change from (line 127 ... elfinder.module)

drupal_add_css($libpath . '/js/ui-themes/base/ui.all.css', 'module', 'screen');
drupal_add_css($libpath . '/css/elfinder.css', 'module', 'screen');
drupal_add_css($path . '/css/elfinder.css', 'module', 'screen');

if (VERSION == 7) {
drupal_add_css($path . '/css/elfinder.d7.css', 'module', 'screen');
}

to

$options = array('type' => 'external', 'media' => 'screen');
drupal_add_css($libpath . '/js/ui-themes/base/ui.all.css', $options);
drupal_add_css($libpath . '/css/elfinder.css', $options);
drupal_add_css($path . '/css/elfinder.css', $options);

if (VERSION == 7) {
drupal_add_css($path . '/css/elfinder.d7.css', $options);
}

ph0enix’s picture

Version: 7.x-1.x-dev » 7.x-0.6
Status: Active » Fixed

Thank You for patch. Implemented in dev version and in 0.6 release.

gargsuchi’s picture

In case you are using D6 and facing the same issue, please change the same lines as follows:

    drupal_add_css($libpath . '/js/ui-themes/base/ui.all.css', 'module', 'screen', FALSE);
    drupal_add_css($libpath . '/css/elfinder.css', 'module', 'screen', FALSE);
    drupal_add_css($path . '/css/elfinder.css', 'module', 'screen', FALSE);

Hope this helps somebody.

Thanks
Suchi

ph0enix’s picture

Thank You! Added to dev branch.

ph0enix’s picture

Fix available in Mar 13 dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bbbo’s picture

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

with the latest dev on D7 I still had to change

line 110 of elfinder.module from

$options = array('type' => 'module', 'media' => 'screen');

to

$options = array('type' => 'external', 'media' => 'screen');

to get things working with CSS aggregation.

Jean Gionet’s picture

I can confirm this as well! #7 fixed it for me! thxs

merro’s picture

Status: Closed (fixed) » Needs review

#7 - same here - latest dev

ph0enix’s picture

As I know if change type to external, it will cause this issue #1087220: Latest DEV version breaks elFinder. I need to find way how to fix both issues.

gold’s picture

Have just tested this #7 on 7.x-1.x-dev as of this date and it worked fine for me. If we could get this checked in and perhaps a 0.7 release? This is about to be deployed on a production server.

If there's any other patches that need testing to get to 1.0 I'd be happy to test them out (now that I have a -dev version running)

Update: Works in standards compliant browsers. Not in lte IE8. :/

gold’s picture

removing the +1 tag. (thought they were related to the comments, not the issue.)

ph0enix’s picture

Per http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad... 'module' is no longer used as type (I still can't reproduce this issue). So #7 fix is correct in this case. But we still have #1087220: Latest DEV version breaks elFinder. I think I have found solution for both issues, please test it (backup existing site/database first - this version have some core functions rewritten).

It will be great if you can help with testing of following:

1. Test image insertion in few wysiwyg editor profiles - wysiwyg integration procedures was rewritten
2. Test attached upcoming elFinder 1.2 library (backup previous library, unpack attached elfinder-lib-1.2-dev.tar_.gz to sites/all/libraries)
3. Test Use system jQuery option (admin/config/media/elfinder)

ph0enix’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.