Bug #48213

compressJs wrong filenames

Added by Philipp Müller about 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Content Rendering
Target version:
Start date:
2013-05-15
Due date:
% Done:

100%

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

Description

Hello

If the Javascript-Compression is active (config.compressJs=1), the wrong file will be linked in frontend.

Example 1 (okay):

We activate the concatenation without compression, this will be rendered correctly.

Configuration:

config.concatenateJs = 1
config.compressJs = 0

Current output (okay):

<script src="/typo3temp/compressor/merged-095e3e9d46fe1467bd0fcc810eecfebc.1368606638.js" type="text/javascript"></script>

Example 2 (not okay):

We activate the concatenation and the compression, now we get the same output (what's wrong).

Configuration:

config.concatenateJs = 1
config.compressJs = 1

Current output (wrong):

<script src="/typo3temp/compressor/merged-095e3e9d46fe1467bd0fcc810eecfebc.1368606638.js" type="text/javascript"></script>

Correct output:

<script src="/typo3temp/compressor/merged-095e3e9d46fe1467bd0fcc810eecfebc-2e491ef033fef81687e5e020c7445d74.js.1368606673.gzip" type="text/javascript"></script>

The error occurs in the function compressJsFiles in TYPO3\CMS\Core\Resource\ResourceCompressor. There the new filename will not be set as array-key (the array-key will be used as filename in output). In compressCssFiles this error is already fixed.

I've added a patch to fix this issue.

Best regards
Philipp


Files

compressJsIssue.diff (993 Bytes) compressJsIssue.diff Philipp Müller, 2013-05-15 12:03

Related issues

Related to TYPO3 Core - Feature #27694: Speedup backend and allow compression in frontend ClosedKai Vogel2011-06-25

Actions
#1

Updated by Philipp Gampe about 8 years ago

  • Status changed from New to Accepted
  • Assignee set to Philipp Gampe
#2

Updated by Philipp Gampe about 8 years ago

You can always push a change yourself: http://wiki.typo3.org/Contribution_Walkthrough_Tutorials

I will do this for you now.

#3

Updated by Philipp Gampe about 8 years ago

#4

Updated by Philipp Gampe about 8 years ago

  • Target version changed from 6.1.1 to 4.7.11
  • TYPO3 Version changed from 6.1 to 4.6

Was merged to 4.6 which is out of support, lowest support, effected version is 4.7.

#5

Updated by Gerrit Code Review about 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20845

#6

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20845

#7

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/21409

#8

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/21410

#9

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/21411

#10

Updated by Philipp Gampe about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 90 to 100
#11

Updated by Riccardo De Contardi over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF