![]() Therefore, creating an entity with the draft workflow state will create a default revision, but with an unpublished publishing status, if the entity type supports publishing. ![]() The first revision of an entity always has to be a default revision. Therefore, if the current state of a revision is published or archived, moving the content to draft would create a pending revision. The draft revision doesn’t have this setting set, meaning it won’t create a forward revision. The published and archived states both are set to create a default revision. The editorial workflow, which ships with Content Moderation, has three states: draft, published, and archived. However, it had not been possible via the UI in core until Content Moderation arrived. Creating a pending revisionĪ pending revision has always been possible in Drupal, and was sometimes called a forward revision or draft revision. Recently, this has been focused on translations to allow each translation of an entity to maintain a rigid revision structure. There is a lot of continuing work within Drupal Core to better define and handle what is and what isn't a past revision. You can think of past revisions as representing a previous state of the content, while a pending revision represents a possible future state. Once a new default revision is created, the old revision then become a past revision. When saving a new content revision without such a module, each revision is saved as a default revision. However, they are now more visible with modules such as Content Moderation exposing them.īefore Content Moderation was added to Drupal core a module such as Workbench Moderation was needed to create a pending revision. Pending revisions are not a new concept to Drupal. Using modules like Content Moderation it is possible to create a revision that is newer than the currently published revision. Content Moderation is one such module that can apply a series of criteria to decide whether the content should be saved as a default revision or a pending revision. This is also commonly referred to as the published revision.ĭrupal's default behavior when saving content is to create a new revision that contains any updates, and then make that new revision the default revision, unless something steps in to change that. Therefore, a revision is singled out as the default revision, indicating that without any other context this is the one that should be used. When visiting a page of content, or when a custom block is loaded on a page, Drupal needs to decide which revision to load. This is similar to tracking changes in a Word document, or being able to review the history of a file in a version control system like Git. While all of these different copies are stored in the database, only one of them is the one that's used when you navigate to the blog post in your browser. Over time, you might end up with many different versions of the same blog post, each reflecting a previous variant. ![]() When content like a blog post is edited, Drupal can be configured to retain a copy of the current version, and create a new version alongside it. Adding Basic Fields to a Content Type (Drupal User Guide) Adding a Content Type (Drupal User Guide) Overview of Workflows and Content Moderation.Goalĭefine what pending, default, and past revisions are, and when they are used, so that when you create a custom editorial workflow you'll have a better understanding of how revisions are used. Understand when, and how, revisions are createdīy the end of this tutorial you should have an understanding of what each type of revision is, how they're created, and how to work with them.Explain what the different types of revisions are.Understanding how revisions work and how the Content Moderation module works with them is important to for being able to take full advantage of the systems features. However, they have often been under-utilized. Drupal has had revisions for a long, long time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |