Skip to content

Commit 7ea0987

Browse files
MAGETWO-99616: Magento font icons are not loading when deployment optimization is implemented
1 parent 43fd747 commit 7ea0987

File tree

1 file changed

+6
-9
lines changed
  • app/code/Magento/Deploy/Package/Processor/PostProcessor

1 file changed

+6
-9
lines changed

app/code/Magento/Deploy/Package/Processor/PostProcessor/CssUrls.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,19 @@ private function parseCss(array $urlMap, $cssFilePath, $packagePath, $cssContent
128128
];
129129
} else {
130130
$filePathInBase = $package->getArea() .
131-
'/' .
132-
Package::BASE_THEME .
133-
'/' .
134-
$package->getLocale() .
135-
'/' .
136-
$lookupFileId;
131+
'/' . Package::BASE_THEME .
132+
'/' . $package->getLocale() .
133+
'/' . $lookupFileId;
137134
if ($this->staticDir->isReadable($this->minification->addMinifiedSign($filePathInBase))) {
138135
$urlMap[$url][] = [
139136
'filePath' => $this->minification->addMinifiedSign($packagePath . '/' . $cssFilePath),
140-
'replace' => '../../../../' // base path is always of four chunks size
141-
. str_repeat('../', count(explode('/', $cssFileBasePath)))
142-
. $this->minification->addMinifiedSign($filePathInBase)
137+
'replace' => str_repeat('../', count(explode('/', $cssFileBasePath)) + 4)
138+
. $this->minification->addMinifiedSign($filePathInBase),
143139
];
144140
}
145141
}
146142
}
143+
147144
return $urlMap;
148145
}
149146

0 commit comments

Comments
 (0)