EasyCorp / EasyAdminBundle

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
MIT License
4.09k stars 1.03k forks source link

Incompatiblity with Font Awesome Pro? #6582

Open jmariller opened 19 hours ago

jmariller commented 19 hours ago

Describe the bug I have a project based on EasyAdmin in which I am using Font Awesome Pro icons, however this does not seem to work in the current version of EasyAdmin as I get this error:

The icon "fal fa-solid fa-island-tropical" does not exist. After processing by EasyAdmin, this icon corresponds to the file "island-tropical.svg", which could not be found in any of the FontAwesome directories within the "assets/icons/" directory of EasyAdmin.

To Reproduce I believe the problem was introduced with version 4.16.0 and the feature "Allow to use different icon sets in the backend". In order to reproduce you should have a Font Awesome Pro account, import the various CSS files and use one of the pro icons (for example "island-tropical" as mentioned above).

Imagica commented 11 hours ago

I have the same issue, I had setup a font awesome kit in order to load the icons using in configureAssets:

->addHtmlContentToHead(
                '<script src="https://kit.fontawesome.com/***.js" crossorigin="anonymous"></script>
'
            )

I get the same error as above, I've had to roll back to 4.15.1 to get it working again.

javiereguiluz commented 8 hours ago

I don't use FontAwesome Pro 😐 so please, tell me how it works. Do you have the icons as SVG files somewhere? Do you have a special web font? Please, explain the technical details to see if we can fix somehow. Thanks!

Imagica commented 8 hours ago

In Font Awesome Pro you can create a "kit" where you can select the icons you want to add (which keeps the file size down). It generates a JS file and I attach it as above using addHtmlContentToHead in configureAssets in the DashboardController.

As part of the Pro package I do have the SVGs and can add them if that is required but it would require updating code that is currently working perfectly. Hard to justify to a client.

Is there documentation somewhere on how to do this?