Pesky Long URLs

In an SP2010 client environment, I have recently been encountering a slew of Check-In and Check-Out issues across separate libraries and site collections. The common scenario is a user checking out a file, then after working on the document and in the process of checking it back in, he/she would receive a SharePoint error. Discarding check out and going through the process again will yield the same result.

In my experience, a Check-In and Check-Out issue is typically a user error. So I would go through the normal verification process, i.e.:

  • Does the user have the right permission?
  • Is the user trying to check out a document that’s already checked out to another user?
  • If the file’s checked out to a local SharePoint Draft folder, is the user trying to re-open the file on a different computer?
  • Does this file have a previously checked-in version?
  • Is it the same user login for both the computer and SharePoint?
  • Etc. etc.

However, the troubleshooting sessions came to no avail.

Luck would have it though. With some persistence poking and prodding, the perpetrator is Long URL.

TechNet has notified us of the SharePoint limitation with long URL. As the article mentioned, Office Client can only consume a link with a max of 259 total characters. If you’re lucky, you might see this DDE error.

    A DDE error has occurred, and a description of the error cannot be displayed because it is too long. If the filename or path is long, try renaming the file or copying it to a different folder.

Sadly, the errors that my users were seeing had zero indication of long URL. So if you’re experiencing a similar issue with document collaboration, try putting URL length on your test radar. If that’s indeed your problem, you’ll need to cut down on the URL for your documents. Here’s a few things to minimize or preferably not have altogether in your SharePoint instance:

  1. Deep folder structure
    In general, a good SharePoint implementation should have little to no folder on document libraries. If you must, try not going too deep. Each folders and subfolders are included in the filepath/URL, which gets you closer to the 259 max.
  2. Long Site or Document Library URL
    Leave the descriptive context for the name/title. You want to be very careful at the time of creation, especially with Document Libraries, because you cannot change the URL to a library once it’s created. When you first create a document library, you want a short and concise name with no spaces (i.e.: “TeamDocuments”). Once it’s created, you can access Library Setting > Title, and change it something a bit more descriptive.
  3. Long naming convention
    Much like site and library, filename also counts towards the URL total count. Beware of long winded filename.
  4. Managed Path
    If you’re not familiar with Managed Path, it’s typically the “/sites/” after your sitename (i.e.: If you have a long Managed Path for your site collection, try working with your SharePoint administrators to create an Alternate Access Mapping, so you can start off with a shorter URL.

Of course there will always be another reason why Check-In/Check-Out isn’t working accordingly in your environment. But I hope that this scenario can help somebody out there, because it certainly got me scratching my head for a bit. Good luck!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s