Document Publication

The document publication lifecycle handles all steps for publishing a document.

Below is a diagram for the document publication lifecycle. You don’t need to fully understand everything going on right now, but as you learn and build more, it will be a useful reference.

Document Publication Lifecycle
  1. Start “Prepare Publish” phase where you still can modify the document, validate data and throw errors back to the callee
  2. Call metadata plugin hook onPreparePublish (modify metadata property, validation)
  3. Call server hook preparePublishHook (modify document, validation).
  4. Start “Publication” phase
  5. Save the publication on the database
  6. Call server event document.update
  7. Call server event document.publish
  8. Call server hook postPublishHook (notify other systems).