The following code is causing the CSS aggregation to create 2 different files. In my case, one for the TinyMCE css file and another for the rest.

foreach ($files as $file) {
  drupal_add_css($editor['css path'] . '/' . $file, 'module', 'screen');
}

Seems like this should be changed to:

foreach ($files as $file) {
  drupal_add_css($editor['css path'] . '/' . $file, 'module');
}

Comments

sun’s picture

Status: Active » Postponed (maintainer needs more info)

What exactly do you mean with "In my case, one for the TinyMCE css file and another for the rest." ?

psynaptic’s picture

I mean: I have one aggregated file for all Drupal core plus contributed modules and another caused by WYSIWYG which only has TinyMCE stuff in. The CSS aggregator creates different files for different media. It's true that this CSS is just for screen but when other modules and core are doing one thing and this module is doing something else it seems like the "problem" needs to be fixed here. The "problem" is that this module forces an extra HTTP request when it need not. I have modified my installations to solve this problem in the time being while you decide if you will commit.

sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

I checked whether it makes a difference, since the original purpose was to hide the editor in the print output, but the print output seems to be bad either way.

Committed a patch that removes media="screen".

psynaptic’s picture

Thanks!

Status: Fixed » Closed (fixed)

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