Skip to content

Commit 4e74619

Browse files
committed
Merge remote-tracking branch 'ogresCE/MAGETWO-31688-error-application-assets-broken-link' into PR_Branch
2 parents 4c051b5 + 0aa38b0 commit 4e74619

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

pub/errors/processor.php

+7-16
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,13 @@ public function processReport()
225225
*/
226226
public function getViewFileUrl()
227227
{
228-
return $this->getBaseUrl() . self::ERROR_DIR . '/' . $this->_config->skin . '/';
228+
//The url needs to be updated base on Document root path.
229+
return $this->getBaseUrl() .
230+
str_replace(
231+
str_replace('\\', '/', $this->_indexDir),
232+
'',
233+
str_replace('\\', '/', $this->_errorDir)
234+
) . $this->_config->skin . '/';
229235
}
230236

231237
/**
@@ -385,11 +391,6 @@ protected function _renderPage($template)
385391
protected function _getFilePath($file, $directories = null)
386392
{
387393
if (is_null($directories)) {
388-
$directories = [];
389-
390-
if (!$this->_root) {
391-
$directories[] = $this->_indexDir . self::ERROR_DIR . '/';
392-
}
393394
$directories[] = $this->_errorDir;
394395
}
395396

@@ -408,16 +409,6 @@ protected function _getFilePath($file, $directories = null)
408409
*/
409410
protected function _getTemplatePath($template)
410411
{
411-
$directories = [];
412-
413-
if (!$this->_root) {
414-
$directories[] = $this->_indexDir . self::ERROR_DIR . '/' . $this->_config->skin . '/';
415-
416-
if ($this->_config->skin != self::DEFAULT_SKIN) {
417-
$directories[] = $this->_indexDir . self::ERROR_DIR . '/' . self::DEFAULT_SKIN . '/';
418-
}
419-
}
420-
421412
$directories[] = $this->_errorDir . $this->_config->skin . '/';
422413

423414
if ($this->_config->skin != self::DEFAULT_SKIN) {

0 commit comments

Comments
 (0)