No Code Attached Yet bug
avatar trananhmanh89
trananhmanh89
5 Jan 2024

Steps to reproduce the issue

I can't tell, because it happens randomly, and it's gone after several refreshes.

Expected result

Fontawesome should show fine.

Actual result

Check the image

image

System information (as much as possible)

chrome browser
windows 11
cpu intel i5-8400
nvidia card 1050ti
php82
mysql 80
apache 2.4.52

Additional comments

Does anyone have this issue?

avatar trananhmanh89 trananhmanh89 - open - 5 Jan 2024
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jan 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Jan 2024
avatar trananhmanh89 trananhmanh89 - change - 5 Jan 2024
The description was changed
avatar trananhmanh89 trananhmanh89 - edited - 5 Jan 2024
avatar joeforjoomla
joeforjoomla - comment - 5 Jan 2024

Confirmed. It happens to me too. After clearing the browser cache and reloading the page, everything is back to normal.

avatar trananhmanh89 trananhmanh89 - change - 5 Jan 2024
The description was changed
avatar trananhmanh89 trananhmanh89 - edited - 5 Jan 2024
avatar fgsw
fgsw - comment - 5 Jan 2024

Does anyone have this issue?

Using Joomla5 since 2 month never happened.

System information

PHP Built On Linux lamp302.cloudaccess.net 3.10.0-962.3.2.lve1.5.81.el6h.x86_64 #1 SMP Wed May 31 12:07:35 UTC 2023 x86_64
Database Type mysql
Database Version 8.0.34-cll-lve
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_0900_ai_ci
Database Connection Encryption None
Database Server Supports Connection Encryption Yes
PHP Version 8.1.26
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 5.0.1 Stable [ Kuboresha ] 28-November-2023 16:00 GMT
Joomla Backward Compatibility Plugin Enabled (classes_aliases:"1", es5_assets:"1")
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0

avatar brianteeman
brianteeman - comment - 5 Jan 2024

It happens to me quite often as well. Thought it was just me but obviously not

avatar richard67 richard67 - change - 5 Jan 2024
Labels Added: bug
avatar richard67 richard67 - labeled - 5 Jan 2024
avatar richard67
richard67 - comment - 5 Jan 2024

Does the network tab of the browser's developer tools show something when this happens, or does the browser's error console?

avatar richard67
richard67 - comment - 5 Jan 2024

@brianteeman Is it also with the Chrome browser in your case? Or also with other browsers?

avatar trananhmanh89
trananhmanh89 - comment - 5 Jan 2024

@brianteeman Is it also with the Chrome browser in your case? Or also with other browsers?

My colleagues are using firefox and do not face this issue till j5 update. Thought might because chrome and nvidia graphic card.

avatar brianteeman
brianteeman - comment - 5 Jan 2024

@brianteeman Is it also with the Chrome browser in your case? Or also with other browsers?

I only use Chrome on Windows

avatar richard67
richard67 - comment - 5 Jan 2024

Does it also happen with Joomla 4.4.x? Or only with 5?

avatar brianteeman
brianteeman - comment - 5 Jan 2024

Does it also happen with Joomla 4.4.x? Or only with 5?

For me just in j5

avatar joeforjoomla
joeforjoomla - comment - 5 Jan 2024

It seems just in J5

avatar joeforjoomla
joeforjoomla - comment - 6 Jan 2024

UPDATE: it also happens on J4

avatar ssnobben
ssnobben - comment - 6 Jan 2024

Do you have any conflicting Fontawesome installed before updating?

avatar chmst
chmst - comment - 6 Jan 2024

I cannot replicate - win11 with different browsers but always correct icons. A conflict with former versions could explain the effect

avatar brianteeman
brianteeman - comment - 6 Jan 2024

Completely clean install just now on localhost of current 5.1git.

No console errors and as soon as you hit refresh it works

image

avatar richard67
richard67 - comment - 7 Jan 2024

Maybe the issue is somehow related to the font-display CSS property? Maybe it has something to do with optimizations with Chrome version 83 for handling "font-display: optional" which are mentioned on this page https://web.dev/articles/preload-optional-fonts?hl=en and more detailed handled here: https://bugs.chromium.org/p/chromium/issues/detail?id=1040632 ?

avatar richard67
richard67 - comment - 7 Jan 2024

Unfortunately I can't reproduce it here.

avatar brianteeman
brianteeman - comment - 7 Jan 2024

I can't reproduce it on demand either. Although lats night I did see it twice on a site that was not one of my own. The link you shared about font-display does sound similar

avatar Fedik
Fedik - comment - 7 Jan 2024

I cannot reproduce it,
However I suspect it may also be related to file loading or server response. Because of:

... and as soon as you hit refresh it works

That sounds like the initial load went wrong, and cached version works.

Try disable cache:

  • Open Dev Tools Network tab
  • Check "Disable cache" checkbox
  • Reload the page. Now every reload will be without cache while Dev Tools is opened.

Do you able to reproduce it every time now?
Addittinaly try "Network throttling".

If you able to reproduce then also please look for a response headers for fa-solid-900.woff2 does it font/woff2 or something else?

avatar brianteeman
brianteeman - comment - 10 Jan 2024

I just observed this on a developers website
image

When I checked with chrome inspector it did show the woff2 files as loaded
It did NOT show joomla-fontawesome.min.css as loaded
It did not show any errors

avatar trananhmanh89
trananhmanh89 - comment - 11 Jan 2024

when the icon get error, chrome didn't load any css from joomla

image

And this is when no icon issue

image

fact: open new tab with same url, the issue will gone
fact2: i even faced this issue when using a site that behind cloudflare cdn

avatar brianteeman
brianteeman - comment - 13 Jan 2024

I strongly suspect that this is caused by something related to #32141

// Defer fontawesome for increased performance. Once the page is loaded javascript changes it to a stylesheet.

avatar richard67
richard67 - comment - 13 Jan 2024

I strongly suspect that this is caused by something related to #32141

// Defer fontawesome for increased performance. Once the page is loaded javascript changes it to a stylesheet.

@brianteeman Yes, I have the same thing in mind. On my private website I have disabled that lazy loading of the fonteawesome fonts in my child template.

avatar Fedik
Fedik - comment - 13 Jan 2024

Nope, that PR affecting only frontend, and the issue about admin side.

avatar trananhmanh89
trananhmanh89 - comment - 15 Jan 2024

Update: chrome on ubuntu also got this issue.

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

It’s either:

  • the server (mime types, etc)
  • Some plugin doing something stupid
  • Wrong CSP configuration
avatar Fedik
Fedik - comment - 18 Jan 2024

Another thing I would probably try is to use the preload header for the fonts for admin.
In j4 FA font files size ~160kb
in j5 FA font files size ~260kb

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

At the time we were doing those optimizations preload wasn’t supported across the board but now should be done, no questions asked

avatar brianteeman
brianteeman - comment - 18 Jan 2024

It’s either:

  • the server (mime types, etc)
  • Some plugin doing something stupid
  • Wrong CSP configuration

At least in my case I have observed this with clean joomla installs so that would rule out the plugin or csp and if it works on reload it cant be the mime types

avatar Fedik
Fedik - comment - 18 Jan 2024

@brianteeman can you please try to test following code? it adds a font 'preload' header. Place it somewhere in index.php of the admin template.

$pm = $this->getPreloadManager();
$pm->preload(Uri::root(true) . '/media/vendor/fontawesome-free/webfonts/fa-brands-400.woff2', ['as' => 'font', 'type' => 'font/woff2', 'crossorigin' => 'anonymous']);
$pm->preload(Uri::root(true) . '/media/vendor/fontawesome-free/webfonts/fa-solid-900.woff2', ['as' => 'font', 'type' => 'font/woff2', 'crossorigin' => 'anonymous']);
avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

@Fedik this Uri::root(true) . '/media/vendor/fontawesome-free/webfonts/fa-brands-400.woff2' won't actually work as expected because the URL of the font is versioned in J5 (ends with something like ?954876) which means that the preloaded font will not be the same as the one specified in the css, basically the browser will download the fonts twice (there will be a warning also in the console). The actual URL could be picked in the build time of the packages before the release (doing it at run time is not a good idea)

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

@brianteeman do you get this if your browser has disabled all the extensions (or in incognito mode). There a very good chance that some of your chrome extensions is misbehaving...

avatar brianteeman
brianteeman - comment - 18 Jan 2024

@dgrammatiko its random and not reproducable unfortunately but clearly effecting multiple people

avatar Fedik
Fedik - comment - 18 Jan 2024

@dgrammatiko it will work, because its is not versioned, I have tested on my test server, and the font loaded only once with preload tag.
But I do not have the reported issue, so can't say if it fix anything. Someone who have this issue should do testing.

avatar brianteeman
brianteeman - comment - 18 Jan 2024

@Fedik loading the font is not the problem #42611 (comment)

avatar Fedik
Fedik - comment - 18 Jan 2024

it is diferent, it about pre-loading not just loading

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

it is diferent, it about pre-loading not just loading

@Fedik this guy in this comment did NOT had the (or any) css file loaded, so the problem is probably different (ie browser extension/server problem)

avatar brianteeman
brianteeman - comment - 18 Jan 2024

s

it is diferent, it about pre-loading not just loading

That will still be nothing to do with the css which is where the problem is

avatar Fedik
Fedik - comment - 18 Jan 2024

did NOT had the (or any) css file loaded

the css which is where the problem is

There no problem with CSS, I suspect it is a misuse of dev tools,
it does not show anything useful when you open it after page is loaded

avatar dgrammatiko
dgrammatiko - comment - 18 Jan 2024

FWIW the installable package for 5.0.2 for both the fontawesome.[min.]css files doesn't have any entry for the path of the font. That combined with other css related breaks I think point out that switching postcss to lightningcss probably was not tested enough. Someone needs to confirm that the font url() is actually missing and then someone needs to figure out why, etc Scrap that looking at the wrong file

avatar brianteeman
brianteeman - comment - 18 Jan 2024

it does not show anything useful when you open it after page is loaded

Who said it was opened after page load

avatar Fedik
Fedik - comment - 18 Jan 2024

Who said it was opened after page load

Me. Look at the screenshots, also without any css whole site would be broken.

avatar trananhmanh89
trananhmanh89 - comment - 26 Jan 2024

When an icon error occurs, the fontawesome.css is loaded from the template "atum," not from Joomla media. Additionally, the icon content appears abnormal.

image

Upon examining the original fontawesome.css from the "atum" template, it is evident that the icon content is also irregular.

image

This differs significantly from the fontawesome.css found in Joomla media or the FontAwesome GitHub repository.

image

avatar Fedik
Fedik - comment - 28 Jan 2024

Can someone please test, if update Fontawesome to newest version helps #42721
Thanks.

avatar Fedik
Fedik - comment - 22 Feb 2024

Please try following, edit Fontawesome css, manualy and place:

@charset "utf-8";

at top of each file .css and .min.css:

media/templates/administrator/atum/css/vendor/fontawesome-free/fontawesome.css
media/templates/administrator/atum/css/vendor/fontawesome-free/fontawesome.min.css

it looks like Browser get confused with content encoding, randomly.

avatar dgrammatiko
dgrammatiko - comment - 22 Feb 2024

@Fedik what's unfortunate here is that when we had Postcss, the @charset was always appended...

Basically if it's a lightningcss issue (ie: parcel-bundler/lightningcss#310) someone could enable debug and check if the problem occurs there as well (the non minified css file is not passed through lightningcss iirc)

avatar brianteeman
brianteeman - comment - 22 Feb 2024

The description in this comment exactly matches my own observations FortAwesome/Font-Awesome#10842 (comment)

avatar Fedik
Fedik - comment - 23 Feb 2024

@dgrammatiko it more about sass compiler (or probably both sass and lightning css), this potato removes @charset when detect UTF8, even with charset: true.
Only way I see is to prepend it manualy

avatar trananhmanh89
trananhmanh89 - comment - 23 Feb 2024

@dgrammatiko it more about sass compiler (or probably both sass and lightning css), this potato removes @charset when detect UTF8, even with charset: true. Only way I see is to prepend it manualy

Hi,
I've compiled font awesome of atum template by using dart-sass, and the result is very different. Could you check?
The left is mine, the right is from joomla atum
image

avatar Fedik
Fedik - comment - 23 Feb 2024

Your with escaped symbols, and joomla with non-escaped.
Techicaly both should work the same, but somehow non-escaped seems not always as good as should.

avatar dgrammatiko
dgrammatiko - comment - 23 Feb 2024

Isn’t sass and dart-sass the same package?

avatar trananhmanh89
trananhmanh89 - comment - 23 Feb 2024

Isn’t sass and dart-sass the same package?

If you use this command to install sass

npm install -g sass

so it's dart-sass.

https://www.npmjs.com/package/sass

avatar Fedik
Fedik - comment - 23 Feb 2024

Btw, we use sass-embedded wich is dart-sass, version 1.67

avatar trananhmanh89
trananhmanh89 - comment - 23 Feb 2024

Btw, we use sass-embedded wich is dart-sass, version 1.67

I noticed that in the package.json file, but I'm not sure why my compiled CSS is significantly different from Joomla's.

avatar Fedik
Fedik - comment - 23 Feb 2024

Okay, it clearly sass LightningCSS and browser issue.
Sass (dart-sass) stopped escaping non ASCII symbols, and the Browser may interpret the file with this symbols incorrectly (randomly, due to network or enabled gzip/deflate on server), unlles the file have defined @charset 'utf-8' (which sass also deleting successfully)

Another links:

@trananhmanh89 what version of sass did you use?

avatar trananhmanh89
trananhmanh89 - comment - 23 Feb 2024

@Fedik I'm using Dart Sass 1.71.1 on my windows.

avatar Fedik
Fedik - comment - 27 Feb 2024

Sorry, it is not Scss (it works fine, and keep the icons escaped) (I have edited my previous comment)
It is LightningCSS which is transforming escaped UTF8 to raw :)

avatar dgrammatiko
dgrammatiko - comment - 2 Mar 2024

Possible fix: #42938

Please test it

avatar Quy Quy - close - 3 Apr 2024
avatar Quy
Quy - comment - 3 Apr 2024

I am going to assume this is fixed with #42938. If not, this can be reopened. Thanks for the report.

avatar Quy Quy - change - 3 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-03 11:18:48
Closed_By Quy
avatar trananhmanh89
trananhmanh89 - comment - 3 Apr 2024

I am going to assume this is fixed with #42938. If not, this can be reopened. Thanks for the report.

No, it's not resolved yet. Please do not use raw utf8 for fontawesome. This causes font issue on chrome.

image

avatar Quy Quy - change - 3 Apr 2024
Status Closed New
Closed_Date 2024-04-03 11:18:48
Closed_By Quy
avatar Quy Quy - reopen - 3 Apr 2024
avatar Fedik
Fedik - comment - 3 Apr 2024

No, it's not resolved yet.

@trananhmanh89 how did you tested it? (recent changes)
The fix only will be in upcoming 4.4.4 and 5.1 release.

Also, do not trust what browser dev tool shows you, it is not able to render every simbol in dev console.

avatar trananhmanh89
trananhmanh89 - comment - 3 Apr 2024

@trananhmanh89 how did you tested it? (recent changes) The fix only will be in upcoming 4.4.4 and 5.1 release.

Also, do not trust what browser dev tool shows you, it is not able to render every simbol in dev console.

Hi,
This issue happens randomly, and only on chrome. How can I make sure that this won't happend again?

I thought the solution would be using escaped utf8 string instead of raw utf8 to avoid browser issue...

avatar Fedik
Fedik - comment - 3 Apr 2024

I just wanted to be sure whether you tested on dev branch of 5.1-dev or not.

I thought the solution would be using escaped utf8

It one of possible solutions.
Another one is to prepend encoding to the CSS file, that what was done in #42938

So if you able to test on latest 5.1 RC, that would be nice.
https://github.com/joomla/joomla-cms/releases/tag/5.1.0-rc1

avatar trananhmanh89
trananhmanh89 - comment - 3 Apr 2024

Ok, I asume that adding @charset rule could fix the icon error. But why don't I see @charset rule in file fontawesome.css of atum template?

Checked on package Joomla_5.1.0-rc1-Release_Candidate-Full_Package.zip

avatar dgrammatiko
dgrammatiko - comment - 3 Apr 2024

But why don't I see @charset rule in file fontawesome.css of atum template?

Confirmed. Someone needs to check why (caching, something else?) The npm tools code seems to have the required changes...

FWIW J4 is correct:
Screenshot 2024-04-03 at 7 31 19 PM

So maybe the release leader didn't start on a lean branch and didn't run npm install

avatar bembelimen
bembelimen - comment - 3 Apr 2024

This is an issue of the build script, three persons tested now with a clean and fresh checkout. If we run normal npm install, it's included, if we do a php build/build.php the charset is not included.

So the build script is broken and the mentioned fix did not fix it.

avatar dgrammatiko
dgrammatiko - comment - 6 Apr 2024

This can be close since #43207 is merged

avatar alikon alikon - change - 6 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-06 17:03:41
Closed_By alikon
avatar alikon alikon - close - 6 Apr 2024

Add a Comment

Login with GitHub to post a comment