Question

Users in my organisation have been reporting issues accessing some of their document sets. After investigating the issues I've found that in each of them, the user has changed the content type of the document set over to folder - the URL still persists as:

<siteurl>/Documents/Forms/Folder/docsethomepage.aspx?ID=3&FolderCTID=<ID>&List=<ID>&RootFolder=<Path>

Which causes the problem. The URL being formatted for a document set that no longer exists.

Is this behavior not supported in SharePoint? Changing the content type back to document set resolves the issue, but I'd like a better way to manage this in the future. Disabling the folder content type in the library isn't possibly as we have legacy data there.

Was it helpful?

Solution

Well I've found that users who are working through Explorer instead of working in Sharepoint via the browser are often the culprits here. BTW - I use Sharepoint 2013 On Premises, I've not used SPO yet. My answer is based on my experience of 2013.

Short answer

Recreate their folder as a document set instead, move the files to the document set. Delete their folder.

Longer answer

Users sometimes work in Explorer instead, then they make new folders in Explorer (actually making it in the Sharepoint document library). While this behavior is annoying, there can sometimes be valid reasons for using Explorer over the browser such as moving files between locations.

  1. Switch off this option in the Document Library settings:

make folders

  1. If the above is already disabled, your pesky users might be making folders in Explorer. As you see in the Sharepoint window of the picture below, there are two existing documents sets (good), Explorer does not distinguish between documents sets and normal folders.

Open with Explorer

  1. When you look in the browser, Sharepoint does actually distinguish between a document set and an evil Explorer-made folder - see the new Test 3 folder lurking here.

Explorer-made folder, how it looks in the browser/Sharepoint

  1. You could try adding a note in authoritative RED TEXT (edit page > add a web part > type text) to try to catch people's attention. However, if they are working exclusively through Explorer they won't see this. Maybe over time you can modify their behaviour, otherwise you'll have to join the brotherhood of frustrated Sharepoint Admin!

stop adding folders here!  Use Document Sets!

To answer the final part of your question

Disabling the folder content type in the library isn't possibly as we have legacy data there.

You could create replacement document sets, move the files out of the legacy folders and in to the document set. Then you'd remove all legacy folders. Bit of a miserable solution if you have several hundred folders though!

OTHER TIPS

You could consider adding and Event Receiver to the list and in event ItemUpdating You could check if the user is changing the content type of the item from Document Set to Folder



    properties.BeforeProperties["ContentType"].ToString() //Original value
    properties.AfterProperties["ContentType"].ToString() // New value


if they do change the content type You may always cancel the update operation with



    properties.ErrorMessage = "Please do not change the Document Set Content type";
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.Cancel = true;


Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top