Closed (fixed)
Project:
Link Icon
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
17 Mar 2015 at 15:35 UTC
Updated:
15 Jan 2026 at 13:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedThis is the code I think. The first class is coming through as is aria-hidden and the drupal attributes, its just not bringing through the second icon class for some reason.
Comment #2
Anonymous (not verified) commentedIf I add this array
'attributes' => array('class' => array('icon')),to
Then it works. Im not sure if its broken something else though.
Comment #3
gausarts commentedSorry, it is not clear what you did, and how can I reproduce it.
Is the issue about "CSS icon not being rendered", or the "Linkicon module CSS" not picked up?
Please help me re-produce it by providing more info:
1. Please provide screenshot of your Formatter settings when it failed.
2. Are you using it with "icon" module? Or "fontawesome" module? Sounds you are using "icon" module?
3. What did you put in "Icon prefix class" text field option?
Normally fontello archive adds "icon-" prefixes even with fontawesome.
And fontawesome archive itself adds "fa-" prefixes. So you may have to add proper prefixes accordingly.
You can view the source of the font CSS file to determine actual prefixes.
In the "Icon prefix class" text field option, you will input either "fa" or "icon" without hyphen ("-").
Adding "icon fa" will obviously fail ;)
if you meant Linkicon stylings, you have to check "Allow linkicon to provide CSS assets" option. And it should just work, unless I missed your point, and there is an actual bug I am not aware of.
At all cases, your info to re-produce it will be quite helpful.
Comment #4
Anonymous (not verified) commentedOK, so i installed the module, have bootstraph glyphicon and fontawesome icon libraries. So I go into the field display on the content type and add the appropriate icon prefix, to keep it simple I used fontawesome, so according to the instructions I added 'fa', and then the required size of icon and colour. I added a node of that content type and included the required icon, for example 'facebook'. So in theory that should be 'icon fa-facebook' in the css. When I looked at the node it was just a small blue icon that comes out of the box with fontawesome - no colour or size stylings. When I went to see what was going on using Firebug it was missing the icon class, so if i manually entered the icon class into the html, something like icon fa fa-facebook', in Firebug then my icon rendered as expected. I thought maybe I could fix it by adding 'icon' alongside 'fa' in the display settings for the field but it obviously doesn't pick up multiple classes for the field, as you say in your reply.
So i added this array to your module
'attributes' => array('class' => array('icon')),And then i could see the different sizes and colours in the display settings as per the images on the module project page and then the icon showed up as expected on the node.
I have attached the settings I have used on the display.
Comment #5
gausarts commentedThank you.
That "icon" class was not needed, because them_icon has already provided it.
However I am not sure about the latest change at icon.module.
In such cases, it sounds like was-working-before-then-not thing ;)
You can try adding the classes if you want to see the styling intact before removing "linkicon_icon" class as you said:
'attributes' => array('class' => array('linkicon_icon', 'icon')),Once it is confirmed okay, and I may integrate it if the icon module has removed it.
I also found recent issue with icon module:
https://www.drupal.org/node/2434441
I haven't got a chance to investigate more, but sounds something broken recently.
In the meantime, I can only recommend putting the path to CSS file directly via your theme, or the linkicon module textfield option till we figure out the actual issue. And disable icon.module integration for now.
Feel free to update if you find anything.
Comment #6
gausarts commentedIt should work fine for linkicon and fontawesome alone if you disable icon module integration.
However I did check that the class icon is not being passed anymore from theme_icon module. Perhaps the removal of html_tag from the latest Fontawesome module in the above mentioned issue has disabled theme_icon preprocess, and uses the new theme_icon_sprite which doesn't pass the "icon" class.
Feel free to provide a patch with your mentioned solution for your credit. Thanks.
Comment #8
gausarts commentedIt is in DEV. Feel free to re-open if still an issue. Thanks.