Open rica-carv opened 5 months ago
Well, ended up forcing it on the theme code, for now... So now i have a theme with bootstrap 3 & 5 loaded and fontawesome 4 & 6 loaded.... What a mess... :grin: :sweat_smile:
Because I don't know how (where) you are using those constants, you could look at a new way to load libraries via theme.xml
https://github.com/e107inc/e107/issues/4832
I am not saying that this works correctly (I have some issues with this topic too), but standard loading of libraries should be working.
@Jimmi08 If you're talking about this:
define("BOOTSTRAP", 5);
define("FONTAWESOME", 6);
e107::library('load', 'bootstrap');
e107::library('load', 'fontawesome');
it also doesn't work. I even upgraded the theme to v2.3 standards (ie: with layouts and templates mixed....), but no go.
So i ended up loading them like this, the hard way:
e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css');
e107::css('url', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/fontawesome.min.css');
e107::js("footer", "https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.min.js", 'jquery', 2);
@rica-carv no, I am talking about theme.xml and library definition there. This shouldn't be used anymore:
define("BOOTSTRAP", 5);
define("FONTAWESOME", 6);
e107::library('load', 'bootstrap');
e107::library('load', 'fontawesome');
@rica-carv no, I am talking about theme.xml and library definition there. This shouldn't be used anymore:
define("BOOTSTRAP", 5); define("FONTAWESOME", 6); e107::library('load', 'bootstrap'); e107::library('load', 'fontawesome');
@Jimmi08 Indeed, i learned the hard way you shouldn't mix both things. For note, event this code only loads BS3, not 5....
So i aknowledge thath the xml way works, but only after a long strugle. Even without cache on, it keep creating cache, so i deleted it several times, no go. So i had to change theme severeal ways, with cache deleting by the midle, and finally it worked! It's weird to not have the xml read every time it's changed. It is only read at theme instalation, so it was a hard time. It should be a developer mode for preventing these issues....
Anyway, thanks for the help....
@rica-carv I reported this many times. Or complained about this. The best way is to delete the cache folder manually. Yeah, I learned that hard way too. You will find that it is always cached (regardless your settings) and it always reads from cached file.
And be sure you have hash tag in your config file - new installations have it. And wait until your preferences will start to behave weird way. Long story.
Reopening, after all fontawesome 6 is not loaded, only bootstrap 5....
Furthermore, all icons are rendered as SVG tag's, not fa- classes tags.....
What e107 version are you using?
v2.3.3
Bug description
I'm trying to use BS5 and FA6 on a theme, with these code:
But when theme loads, icons and some text are not shown or bad rendered, and the bootsrtap libary that is loaded is BS3 and FA4....
What i'm doing wrong here?
How to reproduce
use
inside theme.php, and use fa icons on the HTML
Expected behavior
I expected to render as usual, with BS3 and FA4
What browser(s) are you seeing the problem on?
Firefox
PHP Version
7.4