FA icons are not displayed on styles whose names contain special characters.

Current Version: 2.3.0
Released: 2023-03-19
Forum rules
Before creating a new support thread, please take a look at the board3 Portal FAQ and use the search!
Many questions have already been answered.
Post Reply

Topic author
cabot
Active Member
Posts: 7
Joined: 21. March 2023 12:54
phpBB.com User: cabot

FA icons are not displayed on styles whose names contain special characters.

Post by cabot »

Hello,

The names of the styles selected to display Font Awesome icons are not encoded in UTF-8 in the board3_portal_fa_styles config. When they contain special characters, they are not recognised and continue to display image icons.

Proposed fix — apply the following minimal change in the store_fa_styles() method to accept special characters:

Code: Select all

	public function store_fa_styles(string $key): void
	{
		$style_array = $this->request->variable($key, [''], true);
		$this->config->set('board3_portal_fa_styles', json_encode($style_array));
	}
In the longer term, might it be preferable to store the style IDs rather than their names?
User avatar

Kirk
Dev
Posts: 1982
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: FA icons are not displayed on styles whose names contain special characters.

Post by Kirk »

Hi
Do you have an example of the special characters?
Gruß Udo

Topic author
cabot
Active Member
Posts: 7
Joined: 21. March 2023 12:54
phpBB.com User: cabot

Re: FA icons are not displayed on styles whose names contain special characters.

Post by cabot »

https://www.phpbb.com/customise/db/style/dama%C3%AFo/ :mrgreen:

I didn't understand why, even though I selected this style from the list, it didn't display the FA icons.
And I realised that it didn't appear as selected because it is stored as dama??o in the config.
User avatar

Kirk
Dev
Posts: 1982
Joined: 27. July 2010 18:02
phpBB.de User: Kirk
Contact:

Re: FA icons are not displayed on styles whose names contain special characters.

Post by Kirk »

You were right about special characters in a style.
The selection works with the changes you suggested in modules_helper.php.
Thank you for letting us know. :)
Gruß Udo
Post Reply

Return to “Board3 Portal 2.3.x - English Support”