Asgaros v1.14 and font awesome v5 issue with theme
Quote from goldstrikn on April 18, 2019, 2:11 pmHi,
I encounted an issue with the latest font awesome. You use version 5, but my theme still uses v4. The problem is that your plugin has it hardcoded the classes, such as:
‘fas’, or ‘far’, or ‘fal’, etc. where in v4 of font awesome, it goes by ‘fa’
This makes the icons not appear, even though I unchecked to no load font awesome, since my theme loads it.
Is there a way to place a condition, or place code in my themes function?
Thanks.
Hi,
I encounted an issue with the latest font awesome. You use version 5, but my theme still uses v4. The problem is that your plugin has it hardcoded the classes, such as:
‘fas’, or ‘far’, or ‘fal’, etc. where in v4 of font awesome, it goes by ‘fa’
This makes the icons not appear, even though I unchecked to no load font awesome, since my theme loads it.
Is there a way to place a condition, or place code in my themes function?
Thanks.
Quote from Asgaros on April 18, 2019, 2:31 pmHello @goldstrikn
Can you please check if your theme offers an update for Font Awesome v5 icons? Maybe the theme-support has an idea for it.
The Font Awesome-documentation says the following when mixing versions:
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
After conferring with Dr. Spengler, we don’t recommend using Font Awesome 4 and 5 side-by-side on a project. It will cause huge CSS and path collisions and we can’t promise icons will render as you or we expect. Its the equivalent of dogs and cats living together – total chaos.
This is a big problem because it doesnt matter if I add FA v4 or v5: In both cases it will break something if another component uses the other version. I will check if there is a workaround possible for it but returning back to dashicons is currently not an alternative because of the lack of icons and the huge amount of required compatibility-code which breaks a lot of other stylings in certain themes.
Hello @goldstrikn
Can you please check if your theme offers an update for Font Awesome v5 icons? Maybe the theme-support has an idea for it.
The Font Awesome-documentation says the following when mixing versions:
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
After conferring with Dr. Spengler, we don’t recommend using Font Awesome 4 and 5 side-by-side on a project. It will cause huge CSS and path collisions and we can’t promise icons will render as you or we expect. Its the equivalent of dogs and cats living together – total chaos.
This is a big problem because it doesnt matter if I add FA v4 or v5: In both cases it will break something if another component uses the other version. I will check if there is a workaround possible for it but returning back to dashicons is currently not an alternative because of the lack of icons and the huge amount of required compatibility-code which breaks a lot of other stylings in certain themes.
Quote from Asgaros on April 18, 2019, 8:55 pmHello again @goldstrikn
Can you please try if the following can fix the issue:
- Edit the header.php-file of your theme with the theme-editor (Appearance -> Theme Editor) or manually
- Before the closing </head> tag add the following line of code:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/v4-shims.css">After saving the changes and clearing the browser cache, please let me know if the icons work again (the “Load Font Awesome icon library”-option must be activated for this).
If this fix the issue, I can include it in a new Asgaros Forum-update.
Hello again @goldstrikn
Can you please try if the following can fix the issue:
- Edit the header.php-file of your theme with the theme-editor (Appearance -> Theme Editor) or manually
- Before the closing </head> tag add the following line of code:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/v4-shims.css">
After saving the changes and clearing the browser cache, please let me know if the icons work again (the “Load Font Awesome icon library”-option must be activated for this).
If this fix the issue, I can include it in a new Asgaros Forum-update.
Quote from goldstrikn on April 19, 2019, 4:42 pmThank you @Asgaros. That fixed the issue. Also, I noticed that you just released an update in this regard. Great to see your plugin, become what it is now, a polished and functional forum.
Thank you @Asgaros. That fixed the issue. Also, I noticed that you just released an update in this regard. Great to see your plugin, become what it is now, a polished and functional forum.
Quote from Asgaros on April 19, 2019, 6:01 pmHello @goldstrikn
I am happy to hear that the issue could get fixed with the latest bugfix-release!
Hello @goldstrikn
I am happy to hear that the issue could get fixed with the latest bugfix-release!
