ProcessWire 3.0.166 core updates and more

This week ProcessWire version 3.0.166 is released on the dev branch. In this post we’ll cover all that’s new relative to the previous version, 3.0.165. Plus we’ll check out the latest new versions of ProCache and FormBuilder.

What’s new in ProcessWire 3.0.166

Relative to 3.0.165, ProcessWire 3.0.166 has a lot of minor changes and fixes, but when all combined, it ends up being a pretty significant update.

Numerous upgrades have been made to ProcessWire’s page files management, with the biggest addition being newly added support for secure pagefiles on a per-template basis. Previously it was only possible to configure this on a site-wide basis. Making it configurable per-template adds a lot of new flexibility. I covered this in more detail in this forum post, so if interested, would encourage you to read more about it there.

A new $config->serverProtocol runtime property has been added that returns the current server protocol in use. In addition, various parts of the core were updated to use it rather than assuming HTTP 1.1.

The WireHttp class has been updated with a new sendStatusHeader() method to accompany the existing sendHeader() method.

Fairly major refactoring and improvements were made to ProcessWire’s WireShutdown class that handles the shutdown of every ProcessWire instance, most noticeable when there is an error to display. While few are likely to ever need it, the shutdown instance can be accessed from $wire->shutdown (like an API variable). There is a new setFatalErrorResponse() method on it that lets you control what http status code will be sent, any additional headers to send, who to send errors email to, and the contents of the error email.

New $database API methods were added including getVersion() and getRegexEngine(). These are mostly for core use but public in case others need them. In our case, we needed it to be able to identify some regular expression syntax changes between MySQL 8.0.4 and versions prior to it, so that's what prompted these new methods.

Some improvements were made to ProcessWire’s Session class ($session API var), especially in the redirect() method. Plus a new $session->location($url) method was added that works the same as the redirect method, but implies a 302 (temporary) redirect rather than a 301 (permanent) redirect. While you could do this with an argument to the existing redirect method, I don’t like folks having to remember more than one argument when it comes to the more common API method calls.

The $session API var also gained a sessionHandler() method that returns the current WireSessionHandler instance, or null if using PHP file-based sessions. The most common example of a WireSessionHandler is the SessionHandlerDB core module that many install to use database-driven sessions. This is another method that is likely only useful to the core at present, but should future WireSessionHandler modules add unique features, this will make them accessible to the public API.

Speaking of the SessionHandlerDB module, it gained some added flexibility for handling situations where too many requests are coming in for the same session ID. Rather than failing with a 500 error, it now fails with a 249 “too many requests” error, which tells the client side when it should retry again. In addition, you can configure how long ProcessWire should wait to obtain a session lock before throwing this error. The number of seconds is configurable in the SessionHandlerDB module settings. The existing default value of 50 seconds remains, but you can now reduce it (or increase it) if you want to.

Issues resolved in 3.0.166

Relative to the current master version, a few issues have also been resolved in 3.0.166:

  • Fixes for MySQL 8.0.4+ support when performing ~= word matches on page names.

  • Fixes an issue with the DateTime “select” inputs not allowing empty values.

  • Fixes an issue with the $sanitizer->truncate() method sometimes truncating more than it should due to entity encoding of punctuation.

  • Fixes an issue with circular reference Page reference fields producing an out of memory error.

ProCache 4.0.1

In addition to these core updates, this week a new incremental version of ProCache was released in the ProCache support/upgrades board. Here’s what’s new in ProCache 4.0.1 relative to 4.0.0:

  • Add support for new clearing merged/minified CSS and JS files by age or manually selected.

  • Option to disable automatic creation of .htaccess example files.

  • Addition of ProCacheStaticClear and ProCacheStaticEntry classes to isolate and expand cache clearing and item/entry management.

  • Several new methods for finding and clearing cache entries, which will be used for expanded options on upcoming versions.

  • Some fixes in HTML minification with multiline attributes and how it handles unusual attribute whitespace.

  • New hooks to accommodate specific needs when they arise in the support boards.

If already running smoothly with ProCache 4.0.0, then you may not necessarliy need to upgrade to this version. But if you were wanting to be able to perform custom cache clearing scenarios beyond what you are already able to configure, this version has a lot of new hooks and API methods you'll be interested in. Post in the ProCache board about your needs and we can walk through it together.

FormBuilder v44

This latest version of FormBuilder was released a couple of weeks ago, but those that don't keep up-to-date with the forums may have missed it, so below we'll cover all that's new in this version. Note that this updates list is a copy/paste from my post in the forums, in case you already read it.

This version makes significant improvements to FormBuilder's entries listing features and API. You can now find submitted form entries with selector strings just like you can with pages in ProcessWire. It’s like using $pages->find() except for form entries. You can perform queries on any field in the form and use several different operators. This also includes some of the new text matching operators new to the most recent PW master version.

The entries screen for any form now gives you the option to search and/or filter based on any field in the form. You can also create multiple filters on top of one another, matching multiple fields or even multiple values for the same field.

You can dynamically select what columns appear in the entries list, and in what order. This is very much like the “Columns” tab in Lister or ListerPro.

You can also search, filter, display and export field values from nested forms, which was not supported in earlier versions of FormBuilder.

You can stack multiple search filters on top of one another for AND conditions.

When it comes to keyword searches, in addition to searching individual fields in an entry, you can also search all fields in the entry at once (something you can't easily do with pages).

You can now sort by any form field in the entries list by clicking the column headings. Also supports reverse order. In earlier versions of FormBuilder, you could only sort by ID or created date.

The CSV export has been improved with options to export based on your filters/columns selection, or export all rows/columns. In addition there are now options for letting you specify what type of column headings to use and whether or not to include a UTF-8 byte order mark (which some MS Office apps apparently prefer).

In addition to all of the above, there have been numerous other minor optimizations, bug fixes and other improvements throughout FormBuilder. A few new hooks have also been added in FormBuilderProcessor.

Note that versions 41, 42, and 43 were all minor-update versions that were only released casually in the FormBuilder board for specific cases. Version 44 of course also includes the updates from those 3 versions as well.

FormBuilder v44 requires ProcessWire 3.0.164 or newer. To support the new search/filter/sort functions in the entries list, you must have MySQL 5.7 or newer. For earlier versions of MySQL, these features are disabled except for the “search all fields” option. FormBuilder v44 is available for download now in the FormBuilder support board (login required).

In addition to this newest version of FormBuilder, a new InputfieldFormBuilderRecaptcha module was released for spam prevention using the Google reCAPTCHA service. This module is available for download in the FormBuilder support board and works on FormBuilder versions 39 and newer. More about this module can be found in the PW 3.0.165 forum post.

Focus will soon be shifting to the new ProcessWire modules site development, so I’m trying to stay kind of close between the master and dev versions of the core, enabling us to continue to release more master versions in the short term, at least until we start getting into more significant core updates on the dev branch. For more details about recent core updates and other ProcessWire news be sure to read the ProcessWire Weekly. Thanks for reading and have a great weekend!


  • Jeevan


    • 2 years ago
    • 65

    Hi Ryan,
    thanks a lot for the updates. wishes


PrevProcessWire 3.0.164 new master version


This week we’re proud to announce the newest ProcessWire master version 3.0.164. Relative to the previous master version (3.0.148) this version adds a ton of new and useful features and fixes more than 85 issues, with more than 225 commits over a period of 7 months. More 

Twitter updates

  • ProcessWire 3.0.210 new main/master version released— More
    6 January 2023
  • ProcessWire 3.0.209: Core updates and an interesting AI that knows ProcessWire– More
    30 December 2022
  • Implementing and using TinyMCE 6 in ProcessWire– More
    16 December 2022

Latest news

  • ProcessWire Weekly #454
    In the 454th issue of ProcessWire Weekly we'll introduce a couple of brand new third party modules, check out what's new in the latest dev version of ProcessWire (3.0.211), and more. Read on! / 21 January 2023
  • ProcessWire 3.0.210 new main/master version
    140 commits, 55 resolved issues, dozens of new features, eight contributors, and five new pull requests make yet another great new version of ProcessWire.
    Blog / 6 January 2023
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.