From 376b27a431933d73c80b1fe0fb81203925aa492b Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 1 Sep 2016 14:19:29 +0200 Subject: [PATCH 1/3] Go up 2 directory levels instead of 4 --- Classes/Parser/AbstractParser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Parser/AbstractParser.php b/Classes/Parser/AbstractParser.php index 50a7a04..d3fc708 100644 --- a/Classes/Parser/AbstractParser.php +++ b/Classes/Parser/AbstractParser.php @@ -181,7 +181,8 @@ public function resolveUrlInCss($url) { return $url; } // anything inside TYPO3 has to be adjusted - return '../../../../' . dirname($this->removePrefixFromString(PATH_site, $this->inputFilename)) . '/' . $url; + // the generated + return '../../' . dirname($this->removePrefixFromString(PATH_site, $this->inputFilename)) . '/' . $url; } /** From 6a4206cac841b410029d839321d9329114342ead Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 1 Sep 2016 17:21:46 +0200 Subject: [PATCH 2/3] Test changed to new path --- Tests/Unit/Parser/DummyParserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Unit/Parser/DummyParserTest.php b/Tests/Unit/Parser/DummyParserTest.php index 9daef95..1f8d40d 100644 --- a/Tests/Unit/Parser/DummyParserTest.php +++ b/Tests/Unit/Parser/DummyParserTest.php @@ -50,7 +50,7 @@ public function setUp() { 'https://typo3.org' => 'https://typo3.org', '/absPath' => '/absPath', 'data:suiehihsidgfiu' => 'data:suiehihsidgfiu', - '../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot' => '../../../../typo3conf/ext/dyncss/Resources/Public/Less/../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot', + '../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot' => '../../typo3conf/ext/dyncss/Resources/Public/Less/../../Public/Contrib/bootstrap/fonts/glyphicons-halflings-regular.eot', PATH_site . 'yeah' => '../../yeah' ); } From fd1d43eddd9c2f77de9131057f6755e76290fe05 Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 1 Sep 2016 17:30:40 +0200 Subject: [PATCH 3/3] Comment added --- Classes/Parser/AbstractParser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/Parser/AbstractParser.php b/Classes/Parser/AbstractParser.php index d3fc708..df3707a 100644 --- a/Classes/Parser/AbstractParser.php +++ b/Classes/Parser/AbstractParser.php @@ -181,7 +181,8 @@ public function resolveUrlInCss($url) { return $url; } // anything inside TYPO3 has to be adjusted - // the generated + // the generated css is assumed to be in typo3temp/DynCss, thus we read the typo3 + // install root by going up 2 levels return '../../' . dirname($this->removePrefixFromString(PATH_site, $this->inputFilename)) . '/' . $url; }