sabbelasichon / typo3_encore

Use Webpack Encore within TYPO3
Other
107 stars 19 forks source link

Wrong css and js path #138

Closed rorentz closed 2 years ago

rorentz commented 2 years ago

We are using your extension and navigation through a page results in a miss-behaviour. Our assets are located unter /build/

/build/manifest.json

{ "build/main.css": "/build/main.css", "build/main.js": "/build/main.js", "build/runtime.js": "/build/runtime.js" }

In the Fluid we integrate it the following: {namespace encore = Ssch\Typo3Encore\ViewHelpers}

It is a very random behaviour but the fact is, that the pagerender adds the the assets in 2 ways:

correct: /build/main.css?1649841458 wrong: build/main.css?1649841458

When the user on a subpage, the include path then ist : /subpage/build/main.css?1649841458 which results in a 404.

Can you imagine, how that can happen ?

kszymukowicz commented 2 years ago

Try to add in LocalConfiguration.php in section FE 'additionalAbsRefPrefixDirectories' => 'build/',

rorentz commented 2 years ago

Works like a charm ! Thank you @kszymukowicz .

sabbelasichon commented 2 years ago

That's open source. I am on vacation and a competent other developer just gives the right hint. Thank you @kszymukowicz