No Code Attached Yet
avatar brianteeman
brianteeman
3 Oct 2022

Steps to reproduce the issue

I am trying to dsiable fontawesome in a child template of cassiopeia as I'm using a different set of fonts.

From what I read adding the following should work
$wa->disableStyle('fontawesome');

Expected result

joomla-fontawesome.min.css is not loaded

Actual result

still loaded - because its a dependency of template.cassiopeia.ltr in joomla.asset.json

Additional comments

  1. Why is it a dependency?
  2. If it needs to be a dependency is there a method in the web asset manager to disable it
avatar brianteeman brianteeman - open - 3 Oct 2022
avatar joomla-cms-bot joomla-cms-bot - change - 3 Oct 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Oct 2022
avatar brianteeman brianteeman - change - 3 Oct 2022
The description was changed
avatar brianteeman brianteeman - edited - 3 Oct 2022
avatar Fedik
Fedik - comment - 4 Oct 2022

You have 2 option:
Override 'fontawesome' to emptiness $wa->registerStyle('fontawesome', '')
Edit joomla.asset.json and remove 'fontawesome' dependnecy for template.cassiopeia style asset, and add 'fontawesome' dependnecy to template.cassiopeia preset (And make PR, if you want).

If it needs to be a dependency is there a method in the web asset manager to disable it

To keep track of correct dependency tree you have to override existing asset to asset with new dependencies.

* Changing an uri or a dependencies are not allowed, prefer to create a new asset instance.

avatar brianteeman brianteeman - change - 4 Oct 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-10-04 11:04:49
Closed_By brianteeman
avatar brianteeman brianteeman - close - 4 Oct 2022
avatar brianteeman
brianteeman - comment - 4 Oct 2022

Thank you - the override works and seems to be the best option

avatar Chacapamac
Chacapamac - comment - 4 Apr 2023

You should be able to unload fontawesome from Joomla by an available settings in Joomla interface.

Add a Comment

Login with GitHub to post a comment