I have a set of documents which appear to have no problems in the browser, but when I inspect the properties of the document in PowerShell, it reveals that it is actually a Draft document:

PS C:\Users\nacht> $listitem = $list.items[6]
PS C:\Users\nacht> $listitem.level
PS C:\Users\nacht> $listitem["Version"]
PS C:\Users\nacht> $listitem.versions.count
PS C:\Users\nacht> $listitem.versions[0]["Version"]
PS C:\Users\nacht> $listitem.versions[0].level

This was an issue for me as I had a script that finds the LatestPublishedVersion of documents, relying on the "Level" property. I have since fixed this issue simply by republishing these documents, but I am still curious how these documents got in this state. The library has versioning settings set to not require content approval, "Create major versions" only, "Any user who can read items" can see draft items, and don't require check out to edit.

Anyone know how these documents could have gotten into this state?

  • 1
    Couldn't this happen if, at some point, you switched from major/minor versioning to major-only versioning? Doc with minor version (i.e. with a draft level) would be promoted to a major version, but maybe the level is not updated...
    – Evariste
    Jan 6 '16 at 12:38
  • No, SharePoint seems to get this situation right - when I try this out, the documents are listed as Published.
    – Nacht
    Jan 7 '16 at 4:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.