Quantcast
Channel: SharePoint 2010 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 12728

SharePoint 2010 upgrade UNC paths in document library are not hyperlinks anymore

$
0
0

Hello,

I recently upgraded my SharePoint server from 2007 to 2010 version using the database attach method. One difference that I cannot fix is in document libraries where there are plain text fields that have a UNC path they are not hyperlinks anymore. With the 2007 version of SharePoint all of these UNC paths are hyperlinks to the documents there. After upgrading only some of them are still hyperlinks and it depends on which view I am using to look at the files, some views still have the links and others do not. We are still using the old look of SharePoint and have not done the visual upgrade, I am not sure if that is related to this problem. When I create a view exactly the same as a view that does have working hyperlinks, none of the entries are hyperlinks in the copy of the view. The views are all based off of forms and adding different content types does not make a difference in the way this works, neither does following these steps:

Following are the steps to achieve this.

1) Create a site content type of type "link to a document" with "Document" as a parent content type. 
2) Add the same to the document library. 
3) Go in the layouts folder open newlink.aspx in Visual Studio IDE 
4) add the following function to the script tag 

Code Snippet
function HasValidUrlPrefix_Override(url) 
        { 
            var urlLower=url.toLowerCase(); 
            if (-1==urlLower.search("^http://") && 
            -1==urlLower.search("^https://") && -1==urlLower.search("^file://")) 
            return false; 
            return true; 
        } 
5) Replace "HasValidUrlPrefix" to "HasValidUrlPrefix_Override" in the newlink.aspx 
6) IISReset and when adding a link to a file share. It shoudl be done in the following format "file://\\{ComputerName}\\}FileName}" it should work 
7) Change the wss resource file present in app_globalresources to show the following message "Enter a valid document name and URL.  Valid URLs must begin with 'http:' or 'https:' or 'file://'"

From: http://social.technet.microsoft.com/Forums/sharepoint/en-US/3f2c34cc-5686-4e03-ba26-092aaa29ff33/link-from-document-library-to-unc-path 

Is there some site setting or something in Central Administration I can change to get this working?


Viewing all articles
Browse latest Browse all 12728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>