Closed sdelcroix closed 1 year ago
Got the same Issue. TYPO3: 11.5.25 VHS: 6.1.3
As workaround i changed to fluid viewhelper asset.css. https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/typo3/fluid/latest/Asset/Css.html
@mogensf
Yep, I've tried this workaround too ;) But I kinda dislike that we cannot combine/compress files using TYPO3 AssetCollector :/ We deliver with HTTP/2 but I like the VHS behaviour : assets by components + concatenation into one file.
Changing the regex to if (0 < preg_match('/([^\?#]+)(#.+)/', $match, $items)) {
does not work like expected => https://regex101.com/r/QPcgwO/1
The correct way to fix this, imho, is to remove the usage if the "list" method and instead directly access the values and check if they exist.
$path = $items[1];
$suffix = $items[2] ?? '';
Yep, you're right, I've proposed this regexp too quickly without further tests. 'wanted to dive more into this but lack of time :(
Another valid workaround is to set rewrite="0"
on the asset that contains the problematic code.
Hi,
In the CSS file that I'm including with v:asset.style, there are paths for fonts files as follow :
A PHP Warning is raised in AssertService when there's no suffix in the path. The "Undefined array key 2" error occurs with the "list" function at FluidTYPO3\Vhs\Service\AssetService->copyReferencedFilesAndReplacePaths() :
The test for the regexp shouldn't be inverted ? Like this
Or the regexp may be changed like this :
Because in the actual state, it captures only paths without prefix.