joomla_extensions_development
joomla_extensions_development copied to clipboard
In joomla.asset.json the URI requires the prefix of the extension.
In the section on Web Assets, https://www.dionysopoulos.me/book/concepts-webassetmanager.html, the examples provided show a uri of the file name only, e.g.
"uri": "backend.min.css",
however I was not able to get my implementation to work using just the file name, I had to add the extension or directory name as such
"uri": "com_emporium/trolleyFunctions.js",
I found that solution in the joomla.asset.json for Akeeba Backup;
"name": "com_akeebabackup.akeebaui",
"description": "Common user interface CSS, light mode",
"type": "style",
"uri": "com_akeebabackup/akeebaui.css"
I couldn't see anything in the documentation explaining Web Assets that mentioned the prefix is required therefore I am not sure if it is an instance of the examples need updating or an explanation is required in the text body.
Yes, the URI is wrong. It should be something like com_foobar/backend.min.css
. Joomla expands it to media/com_foobar/css/backend.min.css
, the same it's been doing with HTMLHelper::('style', …)
since Joomla 1.5.
Resolved in commit caa00b2a