ProcessWire Weekly #502

In the 502nd issue of ProcessWire Weekly we'll check out what's new in the core this week, take a closer look at a very interesting database migrations module, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. In this issue, which coincidentally ended up being released on the Christmas Eve, we'll check out the latest core updates, along with a few notes about the latest iteration of the PagesVersionsPro module.

In other news we'll take a closer look at a very interesting third party module — Process DbMigrate from Mark Evens. And, as always, we'll also check out a new site of the week; one that belongs to an established wholesaler of beauty and cosmetic accessories from Germany, Fantasia Beauty.

Thanks to all of our readers for being here with us again, and as always, any feedback is most welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!

Latest core updates: ProcessWire 3.0.233

This week the core version (in the dev branch at GitHub) was bumped to 3.0.233. Most of the updates in this release are directly related to adding support for versioning of page content.

What's new in ProcessWire 3.0.233?

Here's a brief summary of what's new in this week's release:

  • The ability to save and restore partial versions, e.g. only specific fields instead of the entire contents of the page.
  • Partial version support for the core PageTable field and the Table field from the ProFields module bundle. Support is considered partial due to it not handling added or deleted items yet.
  • Update for Pagefile, Pagefiles, Pageimage, FieldtypeFile and FieldtypeImage that adds a getFiles() methods for returning all of the files connected with the field, whether originals, variations, or extras.

According to Ryan the API of the PagesVersions module is now mostly finished. Feature wise there is still be some work to be done and it is a new solution so some issues are likely to pop up as we go along, but it is starting to look more and more like a complete solution ready for action.

This week the ability to save and restore partial versions was added, and that was the main remaining thing. By partial versions, I mean the ability to specify what fields are included when a version is saved or restored.

— Ryan

As of this writing versioning is supported for all ProcessWire's core fields, with a few remaining caveats for complex types, as mentioned above. Similarly, the fields that are part of the ProFields bundle are well-supported, especially after upcoming releases of Table and Combo, which will add support for partial versions for said field types.

New version (v2) of the commercial PagesVersionsPro module

The commercial PagesVersionsPro module was also updated this week. Here's the changelog for PagesVersionsPro module v2:

  • Added the ability to select which fields are included during a restore.
  • When doing a restore, it now detects which fields differ between "live" and "version", making it easier for you to choose which fields to restore.
  • When editing a version the "Delete" tab in the page editor now refers to deleting the version rather than trashing the page.
  • The "compare" option has now been improved so that it can better detect differences between the live and version page.
  • During restore, if you "Choose which fields to restore" you now have the option to compare them individually to see what is different between live and version.
  • Added "page-edit-versions" permission so that you can limit the capabilities of this module to specific user roles.

That's all for our core updates section this week. For more details, be sure to check out the weekly update from Ryan at the support forum. Thanks!

New major release for the database migrations module ProcessDbMigrate

ProcessDbMigrate is a third party module from Mark Evens. This module was designed to capture changes made in a development environment, so that they can be migrated to the production environment — without the need to manually transfer them or write migrations of any sort, code or otherwise.

As some of you know, this module has been under progress for quite a while, and we've also covered it once before. That being said, the latest version of the module that we're discussing here (2.0) is a major update, which is why it seemed like a good time to take another look at it. This module is now also available via the modules directory.

The secret sauce for the ProcessDbMigrate module: powerful GUI and automated migrations

Back when we last introduced this module, the main thing that separated it from the "competition" was the way it emphasized the use of GUI instead of programmatically defined migrations. This is still very much true in the latest iteration of the module, but there's actually something even more interesting now: automatic creation of migrations.

The way this works is that you create a new migration in a development environment, enable the "log changes" option for it, and start making changes via the GUI; creating fields, templates, and pages. ProcessDbMigrate keeps track of your actions and once you're finished allows you to export them as a migration package.

Exported migrations can then be installed in the production environment, effectively recreating your actions (and thus the state of the development site) there.

PW is a great tool for enabling less experienced developers to build great apps. This module is aimed at that group and others who wish to use the PW GUI but still be able to do controlled and accurate migrations.

— Mark Evens

For more details...

In an introduction to his module at the ProcessDbMigrate support forum thread Mark explains how and why this module was developed, and what sets it apart from what is no doubt the most popular and full-featured way to handle migrations in ProcessWire at the moment — RockMigrations. There is also a very detailed help page that covers pretty much everything you might want to know about this module.

If you'd like to give this module a try, you can install it via the built-in modules manager in the admin, or clone or download it from the ProcessDbMigrate GitHub repository. Please note, though, that the module is still considered an early release, so be extra careful and remember to make backups before using it in production environment.

Big thanks to Mark for all his hard work on this very interesting and unique module!

Site of the week: Fantasia Beauty

Our latest site of the week is that of Fantasia Beauty, a business-to-business cosmetic supplies wholesale company.

Based in Germany and founded in 1966, Fantasia Beauty is renowned for their manufacture and distribution of beauty accessories — such as mirrors, cosmetic brushes, hairbrushes, and nail care products. Their typical customers include perfumeries, drugstores, cosmetics studios, and online retailers.

The website of Fantasia Beauty was created by flipzoom; Media. It is a very nice looking website, where beautiful typography is combined with quality photography, along with some well-placed animated effects and transitions to keep things interesting. There's plenty of content here as well, about the company and their products, and a form for potential new dealers.

The front-end of this site appears to be primarily hand-crafted, with some third party dependencies, such as Bootstrap Icons, Owl Carousel 2, and jQuery. As for third party ProcessWire modules, the ones that we could easily identify include the popular Pro modules FormBuilder and ProCache.

Big thanks to flipzoom; Media for sharing this project with us, and our congratulations to the client, Fantasia Beauty, for their new, ProcessWire powered website!

Stay tuned for our next issue

That's it for the 502nd issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 30th of December. As always, ProcessWire newsletter subscribers will get our updates a few days later.

Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!

Post a comment