VP-79 Changed order of saving: first contents then document, to correctl...

...y

index status of contents (archived/published) with the document