Project

General

Profile

Actions

Bug #22591

closed

JS and CSS merger don't work in BE

Added by Christian Leicht over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-05-05
Due date:
% Done:

0%

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

Description

After activate FE-compression and BE-compression at the Installer, the FE Works fine. The BE dount work. No CSS File can read.

In BE:

<link rel="stylesheet" type="text/css" href="../typo3temp/compressor/ext-all-notheme-b6c6e6aeafbd762fe76348fe10df8add.css.gzip?1272914439" media="all" />
<link rel="stylesheet" type="text/css" href="../typo3temp/compressor/xtheme-t3skin-e1fc60ee0adbb7fbf7aa707e2684c406.css.gzip?1272914439" media="all" />

<link rel="stylesheet" type="text/css" href="../typo3temp/compressor/merged-beb93ddc36a5a327a06ba99fa0b06f84-04c7698886384e4e002faecde88eb3b1.css.gzip?1272914416" media="all" />
<link rel="stylesheet" type="text/css" href="../typo3temp/compressor/opendocs-c46e938514542ed3ce565e38eb8e6559.css.gzip?1272914439" media="all" />
<style type="text/css">
/*<![CDATA[*/

/*]]>*/
</style>

<script src="../typo3temp/compressor/prototype-c5d2c89fd65c61d2e760fb692f6b36e2.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/effects-8de1688ef9c40f439491789a4bd0e101.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/builder-e53f9438cd8b4b09b93ada10715be4be.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/effects-8de1688ef9c40f439491789a4bd0e101.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/dragdrop-a1aceafe4baad8ec27b12013ff7c77b6.js.gzip" type="text/javascript"></script>

<script src="../typo3temp/compressor/controls-524b02dbb0f9dc9393bf7f455c22ff14.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/scriptaculous-1571a1f334913b40e68be86ea98db0b1.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/ext-base-42c81d0d026713f9740240954c9ca4a9.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/ext-all-ea2d1fdaf391d47f9b61c8d237e9af5d.js.gzip" type="text/javascript"></script>
<script src="../typo3temp/compressor/ext-lang-de-e455f650bf9fe31d83c57ea161f45d75.js.gzip" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

There is no mergin, and the .gzip do not work

In FE:

<link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_00f8951780.css?1273057423" media="all">

<script src="typo3temp/javascript_93077bb238.js?1244666259" type="text/javascript"></script>
<script type="text/javascript">
/*<![CDATA[*/

/*]]>*/
</script>

(issue imported from #M14310)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #22546: Add a compressor/concatenator for CSS and JS to TYPO3ClosedSusanne Moog2010-04-29

Actions
Actions #1

Updated by Steffen Ritter over 14 years ago

Did you change the .htaccess according to news.txt and enshured that your webserver will process the entries?

Actions #2

Updated by Christian Leicht over 14 years ago

Yes,

my localconf.php is now:

$TYPO3_CONF_VARS['FE']['compressionLevel'] = '5';
$TYPO3_CONF_VARS['BE']['compressionLevel'] = '5';
$TYPO3_CONF_VARS['BE']['versionNumberInFilename'] = '1';

and the .htaccess

  1. Begin: Rewrite stuff ###
  1. Enable URL rewriting
    RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]

  1. If you use the RealUrl extension, then you'll have to enable the next line.
  2. You will have to change this path if your TYPO3 installation is located
  3. in a subdirectory of the website root. #
  4. If you place this in httpd.conf, you cannot use this directive in any case!
    #RewriteBase /
  1. Stop rewrite processing if we are in the typo3/ directory
  2. For httpd.conf, use this line instead of the next one:
  3. RewriteRule ^/TYPO3root/(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
    RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
  1. Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
  2. and stop the rewrite processing
  3. For httpd.conf, use this line instead of the next one:
  4. RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
    RewriteRule ^typo3$ typo3/index_re.php [L]

In FE the merging works fine.

Actions #3

Updated by Lars Houmark over 14 years ago

You seem to be missing the .htaccess for the compression. Please read the NEWS.txt file regarding the needed FilesMatch rules, which also needs to be in the top of the .htaccess file.

And be sure that your server is capable of running compressed files, meaning mod_deflate and mod_mime needs to be installed.

Actions #4

Updated by Steffen Gebert over 14 years ago

Hi Christian

this is the important part, you are missing:

<FilesMatch "\.js\.gzip$">
  AddType "text/javascript" .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
  AddType "text/css" .gzip
</FilesMatch>
AddEncoding gzip .gzip

This can be seen in misc/advanced.htaccess and is mentioned in NEWS.txt (as already said...)

Actions #5

Updated by Christian Leicht over 14 years ago

Sorry, i have only 5 Lines in my .htaccess file in the root of the Website.

###
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L] ###

Mode mod_deflate and mod_mime are installed.
(look at http://typo34.leicht.info/info.php)

In the FE css of csc and tt_news were added together.
(look at http://typo34.leicht.info)

in BE css is not merged but compressed an .gzip is added
(look at http://typo34.leicht.info/typo3)

Actions #6

Updated by Christian Leicht over 14 years ago

Hello Steffen,

this prevent the gzip errors, but do not merge the css an js in BE

Test the Backend :
http://typo34.leicht.info/typo3
user:test
passwd:test

Actions #7

Updated by Steffen Gebert over 14 years ago

Hi Christian,

you should think about consulting mailinglists, when having such problems. It's easier, to find a solution there (especially when notification mails in the BT don't work, like these days) :-(
... and you should post (admin!) credentials to your installation in public!

I will have a look at your installation right now.

Steffen

Actions #8

Updated by Steffen Gebert over 14 years ago

Hi Christian,

the CSS, which can be merged, is merged (the 3rd CSS file). JS is currently not merged at all, because of time limits on the one hand and a bit more risk than with CSS. Maybe this comes with beta3, maybe not..

The problem is that you can't always merge all currently needed CSS/JS files together, as they differ between the different frames and modules. Doing so would result in numerous (big) merged files, one for each module of the backend. So don't expect to have one CSS and one JS file.

Steffen

Actions #9

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF