Comments (5)
Does this hash change or is it basically an md5 hash of the path pointing to?
Yes, i think so. The path is always the same id in my tests.
The hash is derived from the relative composer path of the extension:
https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/Utility/PathUtility.php#L65-L70
So, it may be, for example: /vendor/typo3/cms-core/
for $relativePrefix
which is then hashed.
But beware: The vendor folder can be configured in a Project's composer.json: https://getcomposer.org/doc/06-config.md#vendor-dir
So one should not really rely on the hash in general. For one project (where this configuration is under control) it may be okay when you're knowing what you're doing.
from min.
From the README of composer-installer-v4:
The public resource URL can not be derived any more from the absolute path to the file by stripping off some path part, but only by
passing the absolute path to \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath
Example:
use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;PathUtility::getAbsoluteWebPath(GeneralUtility::getFileAbsFileName('EXT:ext_key/Resources/Public/Icons/Extension.svg'));
Currerently I'm using substr to make the absolute server path relative. That's probably the issue.
from min.
The problem with the new assets of composer-installer v4 is, that somehow you need to resolve the hash of the asset/symlink pointing to EXT:my_ext/Resources/Public/
.
In SCSS, to address font files, I need to prepend this to every font file:
$fontPath: '../../../_assets/1031f6efa8587629b685351ed90c99bf/Fonts';
Some questions I have:
- Does this hash change or is it basically an md5 hash of the path pointing to?
- Is there an API existing, to resolve the path to the asset?
from min.
Does this hash change or is it basically an md5 hash of the path pointing to?
Yes, i think so. The path is always the same id in my tests.
Is there an API existing, to resolve the path to the asset?
TYPO3's internal resource resolver. EXT: ....
from min.
Related to #18
from min.
Related Issues (15)
- Relative CSS paths are wrong HOT 7
- Option to disable compression for single asset HOT 3
- Undefined array key "priority"
- Do not override global `config.compress*` and `config.concatenate*` HOT 4
- Use Middleware instead of hooks to make the tiny HOT 1
- TYPO3 12 HOT 5
- AssetCollector compression not working anymore HOT 4
- Compression of AssetCollector Assets HOT 3
- Loading error by using email mailto HOT 16
- #!#protected_XXX#!# HOT 9
- Old versions no longer downloadable HOT 5
- PHP Warning: Undefined array key "debug"
- why use ext_typoscript_setup.txt for enable = 1 HOT 2
- Possible error in ext_localconf.php? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from min.