ProcessWire 2.6.13 and a preview of ProDrafts

ProcessWire 2.6.13

The new version of ProcessWire this week includes some useful improvements, as well as bug fixes and tweaks. More about that below. The biggest update this week is actually with regard to the upcoming ProDrafts module. It's not ready for release just yet, but it's getting close to being ready for beta testing, and scheduled for public release in September. Since I've been working on it a lot this week, I wanted to include a sneak peek at a few things coming with ProDrafts.

ProcessWire 2.6.13 core updates

Pages “Add New” menu now sortable

Last week we expanded upon the "Add New" button that you see on the PageList, and made it available as a menu item under "Pages" that you can access from anywhere in your site. Over the last week, there have been a couple of requests to make it possible to control the order that those shortcuts appear in (they sort alphabetically by default). This week we added the ability to control the sort order manually by drag and drop. See the ProcessPageAdd module settings:

Dynamic loading for page editor “Children” tab

Over the last few weeks, we introduced dynamic loading AJAX Inputfields. Now we're starting to expand usage of them in the core. This week we made the "Children" tab that you see in the page editor dynamic, so that it doesn't load unless you click on it.

The benefits here are improved performance in the page editor. The "Children" tab contains a separate PageList, which fired off a separate AJAX request every time the page editor was loaded. Likewise for the "Parent" field, editable on the settings tab (parent was converted to dynamic loading a couple of weeks ago). So in past versions of PW, every time you opened the page editor, it fired off at least two other AJAX requests to load page lists. Now it doesn't fire off any additional requests, unless you specifically need to view or edit something on the Children tab or Parent field. We think you'll notice that the page editor loads faster now.

If for some reason you don't want these dynamically loaded fields by default, you can easily convert them to non-dynamic with the $config->pageEdit array settings (which you can override in your /site/config.php file). For more details see ProcessWire's main /wire/config.php file.

Updated to CKEditor 4.5.2

Our previous upgrade to CKEditor 4.5.1 on the dev branch introduced an issue where inserting an image into an inline CKEditor field, and then clicking the "Save" button, would prevent the contents of the of the CKEditor field from getting saved. We updated to CKEditor 4.5.2, hoping that would fix the problem, but it didn't. It turns out there is a bug in 4.5.1/4.5.2 (and perhaps some previous versions) that they have a fix coming for in 4.5.3. However, we figured out a workaround so that you don't need to be affected by this particular bug, and that workaround is included in ProcessWire 2.6.13. We will upgrade to CKEditor 4.5.3 as soon as it is released on their stable branch, though 4.5.2 with the workaround seems to be working quite well now.

A preview of ProDrafts

I've been busy at work on ProDrafts and am hoping to have a beta ready within the next 1-2 weeks, and public release ready in September. Since it's been my biggest focus this week, I thought it would be a good time to tell you a little about it and include some screenshots. Likewise, if you have any questions about it, please respond in the comments below and I'd be happy to discuss it more.

About ProDrafts

ProDrafts is ProcessWire's newest "Pro" (commercial) module that manages separate draft versions of live pages and introduces more workflow possibilities to ProcessWire.

ProcessWire already enables you to maintain drafts of pages that aren't yet published. But as soon as they are published, any changes you make are likewise published. ProDrafts gives you the option of changing that behavior. When ProDrafts is installed, you can save changes to a draft version of the page without affecting the live published version.

While this in itself is a useful convenience, it also enables the potential for more advanced workflow, should you want it. For instance, you can have users that are allowed to make edits, but not publish those edits. A separate user can then approve or abandon edits as a whole, or individually on a field-by-field basis.

ProDrafts provides the tools for reviewing and comparing live versus draft data, side-by-side. Of course, you can also preview your drafts on the front-end of your site, just as if they were published.

ProDrafts also enables you to assign statuses to your drafts, for more advanced workflow possibilities. For instance, if a user doesn't have publish permission, they can assign a "publish requested" status to the draft, indicating that they are submitting the draft for approval and publishing by the appropriate person. We'll cover this and more statuses in the near future.

ProDrafts Screenshots

When ProDrafts is installed, the usual "Save" button in the page editor instead becomes separate "Publish" and "Save Draft" buttons. The "Publish" button works the same as the "Save" button you are used to. While the "Save Draft" button saves changes without committing them to the Page.

Whenever a field has pending draft changes, it is accompanied by a paperclip icon at the top, and a note at the bottom. Clicking the paperclip or the note opens a modal window showing both the live and draft versions of the field, along with a diff comparison, when applicable.

ProDrafts also comes with a Drafts manager, accessible from Pages > Drafts. This shows you all pending drafts and a summary of what's contained in each. From here you can view, compare, publish or abandon pending drafts. The ability to publish or abandon drafts is reserved for users with page-publish permission.

A minor point, but pages that have a draft version available also appear with the paperclip icon in page lists.

That's it for this week. If you'd like to keep in touch, please subscribe to our newsletter here. Also be sure to check out the ProcessWire weekly at it's awesome new site ( on Saturday!


  • apeisa


    ProDrafts looks amazing! Will there be possibility to create and publish drafts through API?

    • ryan


      Thanks! Yes, it includes a full API. It adds a $drafts API variable to ProcessWire with various methods (not unlike $pages), and it also adds a $page->draft(); method to every page, that includes various arguments and commands that can be driven from it, for the current page.

  • Nikolaus Rademacher

    Looking forward to it :) – and of course I've seen the great working existing versioning module by Teppo!

    Having drafts/versions in the core or at least developped by the core team is a big argument for using ProcessWire as an enterprise cms!

  • Nikolaus Rademacher

    Wow, this looks great! Will it be possible to use the new drafts module for page versions too? So that you are able to go back to an older version of the page?

    This is great work!

    • ryan


      • 9 years ago
      • 31

      The structure is setup for multiple versions of a page, but initially (version 1 at least) will focus on maintaining separate draft and live versions of a page. However, the plan is to support multiple versions sometime after version 1, though in a manner that is different from the already excellent versioning module from Teppo. I felt there was a stronger short term need to get the drafts aspect as solid as possible, since we already have a great versioning module.

    • ryan


      • 9 years ago
      • 92

      We want the core to stay as simple and accessible as possible. Maintaining multiple versions of the same page (and doing it reliably) is admittedly a complex thing, and one that is needed by relatively few in the bigger picture. It's the sort of complexity we want to keep out of the core, so that it stays as easy to work with as possible (both on the API side and the UI side). Not many know this, but PW1 had drafts in the core. It occupied roughly half of the core code base (with regard to page handling), yet received very little use. In the end, it didn't make sense for this feature to carry on into PW2, at least not in the core. I would rather develop and support this feature for the few that need it, rather than increasing the complexity of every PW installation out there.

      We've made it nearly 5 years with there being relatively little demand for such a feature. One of PW's biggest differentiators (and reason people are attracted to it) is that it's not following the same bloat path as most other CMSs out there. There have been a couple of requests for what ProDrafts brings to the table, in larger publishing environments. So I'm trying to answer to that need. I feel that having the answer for these needs, even if not in the core, helps ProcessWire grow and be accessible to larger and larger projects. We already have draft support in the core as a page status (i.e. unpublished pages are considered drafts). What ProDrafts provides is maintaining a separate version of an already published page, and the necessary workflow and permission models around that.

      In terms of pricing, it'll follow the same path as the other modules, which is to have low cost single versions for those that just need it for one thing, or developer versions that cost a little more, but can be used on any sites you develop. Or we might possibly take the ProFields approach of having just a developer version that is somewhere in between in terms of cost, but can be used anywhere.

      Keep in mind the purpose of the Pro modules is to help fund ProcessWire by making and supporting these extra/pro tools that we otherwise wouldn't have the budget to build. They are what is sustaining it. I do not have the resources to self fund development and support of these modules. I saved money for many years to develop ProcessWire and then make it free. But that savings was spent long ago, and I think used well. I would be no good to the community if I went back to full-time client work. But I have a family and fixed costs like anyone else, so I can't decide to neglect that. The Pro modules are what enables ProcessWire to be sustainable. Income from the Pro modules has offset roughly 1/4 of my previous client work income, and I've reduced my client work by more than half to instead put that time towards development of ProcessWire, these modules, weekly PW core versions and blog posts. I am incredibly grateful to the community for supporting ProcessWire in this way, it's what enables me to work for you. And I will continue to focus on making PW and the modules the best tools available.

      • er314


        • 9 years ago
        • 22

        Thanks for your detailed reply.
        Regarding sustainability, the pace of your improvements to PW is incredible, I surely hope PW development model is more than sustainable for you.

    • er314


      • 9 years ago
      • 12

      Hello, it was a few months without news about the "drafts" feature, good to know that it's close to release, but too bad it seems it's only for professionals.
      I have 2 distinct questions related to this :

      1. Do you intend to make a basic version into the core ? (like having "live draft" feature where one can save a draft of a live page for later working on it, without the various additional workflow/validation features). This would seem reasonable to me, as such feature in my view is in the "core" of what a CMS may provide to the backend users.

      2. More generally, my view about the "Pro" tools is that they fall in the following categories :
      a- Performance enabler tools : these tools allow to enhance the frontend users and/or backend users productivity/user-experience
      -> ProCache, ListerPro
      b- Productivity enabler tools : these tools allow to enhance the developers productivity when building their project
      -> Form Builder, Likes Fieldtype
      c- Added core features & API tools : these tools provide new features for the developer and/or backend users
      -> ProFields, ProDrafts
      While I agree that categories a- and b- are fully meant for "Pros" (as a non-professional does not seek ultimate performance, nor ultimate productivity), things are different for c- : there's projects where some of the added features of Profields and ProDrafts would be extremely useful for non professional developers / not for profit websites.
      Hence the question : Do you intend to set a licencing & pricing plan for non professional developers / not for profit websites ?


      • Pete


        • 9 years ago
        • 21

        Great work as always!

        Quick question - I'm guessing at the moment that anyone would technically be able to edit the draft page if they have permission and not just the first person creating the draft?

        I think it would be unlikely that people would want to maintain their own separate drafts of the same, live page (merging would be a nightmare) but in larger organisations you might want the ability to have a "currently being edited by " option so that only the person working on the draft can edit it to avoid confusion.

        Of course you may already have thought of that or want to wait and see how it is used and what feedback is like before adding to it too much more which is also fine. I think as it's used there will be plenty of suggestions for additional functionality certainly!

      • Neeks


        • 9 years ago
        • 23

        "Yes, it includes a full API. It adds a $drafts API variable to ProcessWire"...Awesome!

      • Neeks


        • 9 years ago
        • 34

        So glad this has finally come around. I have been createded my own draft system but am looking forward to trying your system out. I do have a big appreciation for how complex it is to create full drafting workflows. I was on my way to slowly make my system generic enough to be usable by the community, but I'm glad you beat me to it.

        Some thoughts:

        Page table support? Option to share page table reasouces between draft and live page. My system was designed off the clone command which duplicated page table resources attached to page...this did not seem ideal, drafting inside page table seemed way more sensable to me than copying big sets of data.

        Lister and find support?...results returned from these should clearly show what is a draft and what is not. Or at least what has a draft.

        Ability to query all drafts from api?

        Rollback support? If draft or series of drafts went live, but something went wrong, can it be rolled back? What happens to the live page when the draft is made live? (helpful if your doing big content launches with lots of moving parts) but maybe outside the scope of your module.

        Anyway, big thanks for getting drafts up and running. Really looking forward to reading the code and seeing the appouch you look. Congrats.

        • Nikolaus Rademacher

          Nikolaus Rademacher

          • 8 years ago
          • 10

          Hi Ryan,

          just came across this blog entry while searching for approval features for users with edit but without publishing rights. As you've written here that this is a planned feature for ProDrafts: Can you tell, when this will be released?

          Thanks a lot!


        Latest news

        • ProcessWire Weekly #532
          In the 532nd issue of ProcessWire Weekly we'll cover the latest core updates, check out a couple of brand-new third party modules, and more. Read on!
 / 20 July 2024
        • Page List Custom Children module
          This simple module gives you the ability to customize the parent/child relationship as it appears in the admin page list, enabling child pages to appear under more than one parent.
          Blog / 28 June 2024
        • Subscribe to weekly ProcessWire news

        “We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH