I am using script to load files "Link to a document" type. The following works in Dev and link items has pdf icon with iconoverly on it. but in production pdf icon is blank with overlay on it. What is missing in production? (Yes, docicon.xml is configured, pdf file is present in the images folder and regular pdf files shows pdf icon). Please suggest. Both web servers (2 wfe) and and app server has the pdf file in the 14 hive images folder. In dev I can put docx or xls instead of pdf on the following code and correspondence file icon shows up for link to a document item. in prod no matter what extension i put in it always show blank file type. see below for prod and dev print shot of the document library.

  • ...and also docicon.xml is configured on all servers in the farm? – Marius Constantinescu - MVP Jul 12 '12 at 19:57
  • yes docicon.xml is configured on all servers in the farm. Matter of fact, it's been there since 2011. I can change pdf to docx or xls nothing is working. see attached pic in the main post. I updated it. – Maria Burton Jul 12 '12 at 20:09
  • when you make the change do you do an IISReset on each server? I seem to remember that was a minimum requirement and in some cases a reboot was necessary. – Mauro Jul 13 '12 at 9:44
  • @Mauro: the pdf icon setup was done years ago so I dont need to configure pdf. – Maria Burton Jul 13 '12 at 12:36
  • Have you recently installed SharePoint updates such as service packs?

    If yes, make sure the customization done in the DocIcon.xml are not overwritten.

  • Is the DocIcon.xml identical on all WFE servers?

    If no, make sure they are identical.

  • Compare the DocIcon.xml from the Development to the Production environment.

|improve this answer|||||
  • I verified all the servers in the production and they all have valid entry in the docicon.xml file. But it's happening with every type of icon. So i dev if i change the icon from pdf to docx (in my code) it works. meaning the link to document records shows with docx icon with overlay icon. So that makes me believe it's not icon related. what else could it be? – Maria Burton Jul 12 '12 at 20:29
  • You always had this issue in production? – H A Jul 12 '12 at 23:19
  • Not sure because this is the first time I am trying to upload documents and link to a document via powershell. I would like link to a document to be what ever file type is linking same so user can relate the link to file type is so and so. – Maria Burton Jul 13 '12 at 14:43

If you are using Blob Caching, then you might need to clear the local cache folder on each of the affected servers.

|improve this answer|||||
  • We are not using Blob caching (web.config setup) – Maria Burton Jul 13 '12 at 12:37

Can you post the rendered html from the list?

<tr class="ms-alternating ms-itmhover" iid="0,3,0">
        <td class="ms-vb-itmcbx ms-vb-firstCell">
            <input type="checkbox" class="s4-itm-cbx" />
        <td class="ms-vb-icon">
            <img border="0" alt="fred2.aspx" title="fred2.aspx" src="/_layouts/images/pdf16.gif" /><img src="/_layouts/images/linkoverlay.gif" class="ms-vb-icon-overlay" alt="" title="" />
        <td height="100%" onmouseover="OnChildItem(this)" class="ms-vb-title">
            <div class="ms-vb itx" onmouseover="OnItem(this)" ctxname="ctx0" id="3" field="LinkFilename" perm="0x7fffffffffffffff" eventtype="">
                <a onfocus="OnLink(this)" href="/Shared Documents/fred2.aspx" onmousedown="return VerifyHref(this,event,'1','SharePoint.OpenDocuments','')" onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','','1','SharePoint.OpenDocuments','SharePoint.Link','','','1','0','0','0x7fffffffffffffff','pdf16.gif','linkoverlay.gif')">fred2</a><img src="/_layouts/1033/images/new.gif" alt="New" title="New" class="ms-newgif" /></div>
            <div class="s4-ctx" onmouseover="OnChildItem(this.parentNode); return false;">
                <span></span><a onfocus="OnChildItem(this.parentNode.parentNode); return false;" onclick="PopMenuFromChevron(event); return false;" href="javascript:;" title="Open Menu"></a><span></span>
        <td class="ms-vb2">
            <nobr>7/13/2012 9:35 AM</nobr>
        <td class="ms-vb-user">
            <span class="ms-imnSpan"><a href='javascript:;' onclick='IMNImageOnClick(event);return false;' class='ms-imnlink'>
                <img name='imnmark' class='ms-imnImg' title='' border='0' height='12' width='12' src='/_layouts/images/blank.gif' alt='No presence information' sip='Administrator@spdev.com' id='imn_2,type=smtp' /></a><a onclick="GoToLink(this);return false;" href="/_layouts/userdisp.aspx?ID=1">Administrator</a></span>

when working it looks like above, taken from a document library default view.

|improve this answer|||||

OMA. Earlier answer was not the solution. I had to do a small upload. Then I had to manually upload a file with Link To Document content type thru UI. and manually uploaded file had the correct file icon. Then I deleted the file and re ran the script. and Now the link to a document type items have the correct file type icon.

Thanks everyone for your help.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.