Joomla-cms: [4.0] Update fontawesome 4- to fontawesome 5 classes

Created on 26 Jan 2020  路  11Comments  路  Source: joomla/joomla-cms

Steps to reproduce the issue

fontawesome 4 and below used .fa fa- with fontawesome 5 that is no longer the case.

Expected result

fontawesome 5 native classes used

Actual result

fontawesome 4 classes used.

System information (as much as possible)

Additional comments

I have a pr ready to go but I'm waiting on clarification on how to write up the testing instructions.
https://github.com/N6REJ/joomla-cms/tree/fa-5

No Code Attached Yet

Most helpful comment

@N6REJ Your sql changes are ok because as long as we have not beta yet we don't promise updateability and so still can modify existing old 4.0*.sql update scripts. As far as I could see you only modified those statements where new data is inserted for J4, you did not try to modify any already existing data (which would be dangerous), and so I think they are correct. But I see no way to test them except to build an own update package and update a J3, and this result in a mess currently for other reasons. So your sql changes can be only tested by code review.

All 11 comments

@HLeithner here you go.

Are you looking for the following instructions?

Apply PR
Runnpm run i
Browse frontend and backend to make sure no visible changes with the icons.

@Quy what about the changes to the .sql file(s)

Hint - your code is not correct.Global search and replace will not be enough

Changed the above instructions.

@richard67 please advise on the sql. I think apply the PR. Delete configuration file and reinstall.

@N6REJ Your sql changes are ok because as long as we have not beta yet we don't promise updateability and so still can modify existing old 4.0*.sql update scripts. As far as I could see you only modified those statements where new data is inserted for J4, you did not try to modify any already existing data (which would be dangerous), and so I think they are correct. But I see no way to test them except to build an own update package and update a J3, and this result in a mess currently for other reasons. So your sql changes can be only tested by code review.

Of course it needs to check for each of the icons to which package they belong, fas (standard) or e.g. fab (brands). As far as I know almost all belong to fas, but I remember there were a few exceptions.

@richard67 that is one of the reasons why the code is wrong but you will see that in 2 seconds when you test it as it is so obvious

@brianteeman to be honest: up to now it looks all correct to me. we are already using the 3 letter class for the package when it is not "fas", like e.g. "fab", and the 2 letter "fa" is a synonym for "fas" as far as i could see here: https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#changes. So either their page is wrong, or the code provided by Troy is right. Question: Have you tested that yourself?

closed since we have pr #27657

@richard67 of course I tested it. I wrote the original PR to update from fa 4 so I know what is involved and this is not correct

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brianteeman picture brianteeman  路  6Comments

B3nito picture B3nito  路  5Comments

wilsonge picture wilsonge  路  4Comments

brianteeman picture brianteeman  路  5Comments

Hils picture Hils  路  5Comments