Project

General

Profile

Actions

Bug #82149

closed

\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix is missing a leading / in directory search patterns

Added by Wolfgang Klinger over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Category:
Frontend
Target version:
-
Start date:
2017-08-21
Due date:
% Done:

0%

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

Description

All the frontend classes use PathUtility::getAbsoluteWebPath now, that generates absolute paths with a leading /,
so setAbsRefPrefix fails to replace the paths.

Actions #1

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #2

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #3

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #4

Updated by Gerrit Code Review over 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #5

Updated by Gerrit Code Review over 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #6

Updated by Gerrit Code Review over 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #7

Updated by Gerrit Code Review over 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #8

Updated by David Gurk over 6 years ago

Hi, is there any chance to push this bugfix?

Actions #9

Updated by Gerrit Code Review over 6 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #10

Updated by David Gurk over 6 years ago

Just for documentation. This issue results from a question/conversation of Wolfgang and me in Slack.
https://typo3.slack.com/archives/C025BQLFA/p1503327454000727

Me
Where does TYPO3 7.6 include the absRefPrefix for CSS files?
In the return of TYPO3\CMS\Core\Page\PageRenderer::renderCssFiles() the prefix is missing, but in the final input, I get complete URLs

return:
<link rel="stylesheet" type="text/css" href="typo3conf/ext/project/Resources
/Public/Css/Master.min.1495457195.css" media="screen"

final output
<link rel="stylesheet" type="text/css" href="//webdev.example.de/typo3conf/ext/project/Resources/Public/Css/Master.min.1495457195.css" media="screen">

In TYPO3 8.7 with a similar configuration.
return:
<link rel="stylesheet" type="text/css" href="/typo3conf/ext/project/Resources/Public/Css/Master.min.1502887324.css" media="screen">
final output:
<link rel="stylesheet" type="text/css" href="/typo3conf/ext/project/Resources/Public/Css/Master.min.1502887324.css" media="screen">

Wolfgang Klinger
this is done in `\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix`

Me
I debugged the problem further:

In TYPO3 8.7 in \TYPO3\CMS\Core\Page\PageRenderer::renderCssFiles the / in front of typo3conf/ext/project..." is set with $this->getStreamlinedFileName()
This causes, that \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix can't set the absRefPrefix, since it search for typo3conf/ext/ without leading slash.

In \TYPO3\CMS\Core\Page\PageRenderer::getStreamlinedFileName there is the clause

if ($prepareForOutput) {
$file = GeneralUtility::createVersionNumberedFilename($file);
$file = PathUtility::getAbsoluteWebPath($file);
}

... where PathUtility::getAbsoluteWebPath($file) adds the trailing slash

Actions #11

Updated by Gerrit Code Review over 6 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #12

Updated by Gerrit Code Review about 6 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #13

Updated by Gerrit Code Review about 6 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #14

Updated by Gerrit Code Review about 6 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #15

Updated by Gerrit Code Review about 6 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #16

Updated by Gerrit Code Review about 6 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #17

Updated by Gerrit Code Review about 6 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #18

Updated by Gerrit Code Review about 6 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #19

Updated by Gerrit Code Review about 6 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #20

Updated by Gerrit Code Review about 6 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #21

Updated by Gerrit Code Review about 6 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53759

Actions #22

Updated by Susanne Moog about 5 years ago

  • Status changed from Under Review to Needs Feedback

Patch has been abandoned. If this issue still exists, can you add a longer description of what exactly is going wrong / which bugs appear?

Actions #23

Updated by Susanne Moog about 4 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over a year, closing the issue now.

Actions

Also available in: Atom PDF