Project

General

Profile

Actions

Bug #91263

open

disableCompression is not respected when CSS are concatenated

Added by Xavier Perseguers almost 4 years ago. Updated over 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-05-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I am using this:

page.includeCSS {
    // some CSS

    ekkoLightbox = path/to/ekko-lightbox.css
    ekkoLightbox.disableCompression = 1
}

As such I expect this CSS to be concatenated with any other CSS but not compressed at all, thus simply concatenated.

I am not using any 3rd-party compression tool, Core one.

This CSS (see attachment) is already compressed and contains some comments which are actually needed for embedded resources to be taken into account, this is the reason why I don't want any further compression on it.

Problem is that disableCompression is only taken into account when CSS (possibly JS?) are NOT concatenated. This originates from \TYPO3\CMS\Core\Resource\ResourceCompressor::concatenateCssFiles:135 where we read

            $targetFile = $this->createMergedCssFile($filesToInclude);
            $concatenatedOptions = [
                'file' => $targetFile,
                'rel' => 'stylesheet',
                'media' => $mediaOption,
                'compress' => true,
                'excludeFromConcatenation' => true,
                'forceOnTop' => false,
                'allWrap' => ''
            ];

Thus the files to be concatenated are concatenated and afterwards the file is marked as to be compressed.

I would expect each file to be compressed (or not) and then concatenated. Possibly the file would be very slightly less-well compressed, but this would respect the intent of the integrator.


Files

ekko-lightbox.css (6.98 KB) ekko-lightbox.css Xavier Perseguers, 2020-05-02 11:06
Actions

Also available in: Atom PDF