Tuesday, June 16, 2015

SharePoint 2010 "Add to My Links" error: Page not found

Today I came across an interesting issue where users from a certain remote location were reporting a 'Page not found' error when trying to use 'Add to My Links' for documents stored under mysites.

Interestingly, the URL was malformed each time they attempted to click on the function.
It would end up looking like http://_vti_bin/portalapi.aspx?cmd=PinToMyPage&IconUrl=/_layouts/images/null&ListViewURL=xxxxxxxx 

Problem cause:
The Portal Site Connection (under Site Settings) should have the portal URL ending with a slash (/). Setting this value incorrectly would result in errors when users attempt to use 'Add to My Links'!

Fix:
Since this is mysites where each site collection needs to be fixed, I run a PowerShell script like this:
Get-SPSite http:///sites/* | ForEach-Object { $_.PortalName ="Portal Site" ; $_.PortalUrl = "http:///" }
After that, go to the MySites root e.g. http:///_layouts/portal.aspx, and make sure the portal URL ends with a slash (/).

No comments:

Related Posts Plugin for WordPress, Blogger...