diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php index c6b5037d9c3a3cb9100821e0d6a20565689fb9ee..72ef3705df495bbc1ef2abcd7d1de7a5484883e7 100644 --- a/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php +++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/ConcatTrait.php @@ -230,7 +230,10 @@ trait ConcatTrait } // Locate/create concatenated asset file $filename = md5($group['key']) . '.min.' . $this->getFileType(); - $concatPath = $this->getResourceCacheDir() . $filename; + // Minifier uses realpath, so do that here too to make sure we're not + // pointing to a symlink. Otherwise the path converter won't find the correct + // shared directory part. + $concatPath = realpath($this->getResourceCacheDir()) . '/' . $filename; if (!file_exists($concatPath)) { $lockfile = "$concatPath.lock"; $handle = fopen($lockfile, 'c+'); @@ -276,6 +279,7 @@ trait ConcatTrait . $this->getResourceFilePath($item), ThemeInfo::RETURN_ALL_DETAILS ); + $details['path'] = realpath($details['path']); $data[] = $this->getMinifiedData($details, $concatPath); } // Separate each file's data with a new line so that e.g. a file