views:

114

answers:

1

Ok SharePoint is driving me crazy and I need to see if anyone has encountered a similar problem or knows of a solution:

I have a content editor webpart with some HTML including links to PDF files that I've modified slightly to append an employee number querystring ie:

<a href="http://moss.company.com/group/home/EPermits
    /Blank%20Form%20Templates/_blank_breach_permit.pdf?empNum=">New Breach Permit</a>

And SharePoint seems to randomly replace the filename with aab04168 or some other similar characters:

<a href="http://moss.company.com/group/home/EPermits
    /Blank%20Form%20Templates/aab04168?empNum=">New Breach Permit</a>

After this happened a few times with no explanation I tried changing the content editor webpart to look directly at a documentLinks.html file located in the Shared Documents folder of the SharePoint site and guess what... SharePoint edited that document and replaced my filenames with random characters in there too!

Figuring that filenames beginning with an underscore could be triggering some internal SharePoint procedures I've renamed all the files to remove the starting underscore--unfortunately the problem isn't immediately reproducible and I'm waiting right now to see if I run into any more trouble.

edit: the underscore in the filename didn't help... my documentLinks.html wound up getting modified and all the hrefs were replaced with random characters again. Now I'm setting the hrefs in javascript with the filename text concatenated together from multiple strings.

linkEle.href = ".../EPermits/Blank%20Form%20Templates/blank" + "_Chemical_Usage.pdf?empNum=" + empNumber;
A: 

Sharepoint uses the 'Title' field of the Document Library as the file's name. If the PDF file name is not stored in the Title field then Sharepoint might be creating a unique 'Title' for you. Check the column structure of your Document Library and ensure that you are storing the PDF filename in the 'Title' field.

Ray Sutton
I checked the library and all of my title fields are blank--I haven't had any trouble addressing the pdf documents by http://moss.contoso.com/blah/myfile.pdf or \\moss.contoso.com\blah\myfile.pdf without anything changing except the hrefs in my links.
nvuono