SharePoint 2010: Document Icons are not displayed in search results

Article ID: 2646696 - View products that this article applies to.
Expand all | Collapse all

Symptom

One may find that "Document Icons" are no longer displayed in search results after modifying the DOCICON.xml file. In this scenario an empty box will appear where the document icon should be displayed. The same document icons are displayed correctly while viewing the document libraries.

Cause

This issue can be caused by multiple file extension mappings in the DOCICON.xml file. To confirm this problem one can view the HTML source of the search results page and find the documents with the missing icons containing an empty source path for the “srch-Icon” class.


Working Example:
<div style="clear: both;"><div class="srch-Icon" id="SRB_g_585f1e93_957c_41d2_a7b2_05061bdfd925_1_Icon"><img align="absmiddle" src="/_layouts/images/icdocx.png" border="0" alt="Microsoft Word" />

Problem Example: 

<div style="clear: both;"><div class="srch-Icon" id="SRB_g_585f1e93_957c_41d2_a7b2_05061bdfd925_1_Icon"><img align="absmiddle" src="" border="0" alt="Item icon" />

The following is an example of a duplicate file extension mapping in the DOCICON.xml file found in path “%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\XML

<Mapping Key="pdf" Value="icpdf.gif" OpenControl=""/> 

<Mapping Key="pdf" Value="pdf_icon.gif" OpenControl=""/>
In this case although the values are different, all document icons will not be displayed in search results because there are two file extension mappings for “PDF” in DOCICON.xml.

Resolution

To resolve this issue simply remove the duplicate entry for the file extension mapping in DOCICON.xml. 


Important:
  • A modified DOCICON.XML file applies only to a single server, and must be copied to every server in a server farm for the icon to be displayed consistently. An IISReset command is required for the changes to the DOCICON.XML file to be reflected in a rendered page.
  • Service packs or hotfix patches can overwrite changes to the DOCICON.XML file. Therefore you should package the changes in a format that can be easily reapplied. This makes it less likely that your changes will be overlooked or applied incorrectly if they are manually updated later.

More Information

Understanding DocIcon.xml Files
http://msdn.microsoft.com/en-us/library/ms463701.aspx

Updating the docicon.xml File with a Feature
http://blogs.msdn.com/b/sgoodyear/archive/2008/06/14/updating-the-docicon-xml-file-with-a-feature.aspx


Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2646696 - Last Review: November 29, 2011 - Revision: 4.0
APPLIES TO
  • Microsoft FAST Search Server 2010 for SharePoint
  • Microsoft SharePoint Server 2010
  • Microsoft SharePoint Server 2010 Service Pack 1
Keywords: 
KB2646696

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com