Today we have a new master version released, version 3.0.148! The last master version was 3.0.123, so there are 25 new versions worth of upgrades, fixes and optimizations in this new master version, relative to the previous. In this post we’ll take a closer look at what’s new.
In going through all of the changes, version by version on the dev branch, one thing I noticed is that a large percentage of the commits over the last year had to do with resolving hundreds of issues reported at GitHub. While none are major things, the combined effect of so many minor fixes is actually quite large, and definitely makes this upgrade worthwhile, regardless of the new additions. While an itemized list of fixes doesn’t make for good blog reading material, I did just want to preface this post by mentioning that this is one of the major differences between 3.0.123 and 3.0.148.
A special thanks to everyone that's contributed to this version with reports, ideas, code and troubleshooting at GitHub over the last year. You all are the reason why ProcessWire is so reliable and stable. Thanks also to Teppo Koivula for covering all of the core updates and everything else he does at ProcessWire Weekly. In addition, thanks to Horst for providing the initial development of the WebP support, one of the most exciting additions in this version relative to the previous master. Thanks also to the entire ProcessWire community for all that you do in supporting the project and helping others here. I think we've got one of our best master version releases ever, let’s take a look at what’s new in this version relative to the last master version…
What’s new in ProcessWire 3.0.148?
Images and files upgrades
Page API upgrades
New $page->meta() method – A useful new Page method that provides a new storage option for page-specific data, independent of ProcessWire fields.
New $page->if() method – This new method enables you to conditionally render a string or execute an inline function according to whether the expression in the first argument matches.
New “Unique” status for pages (Page::statusUnique) – a way of specifying that a page should have a globally unique name.
New “Flagged” status for pages (Page::statusFlagged) – Currently it is used to flag a page as potentially having errors. A page receives this flag from the Page editor when the last interactive save to it produced one or more error messages.
$sanitizer API variable upgrades
New $sanitizer->trim() method added – Trim of all known UTF-8 whitespace types (or given chars) from beginning and ending of string.
New $sanitizer->chars() method added – Sanitize string value to have only the given characters.
New $sanitizer methods – range, min, max, bit, maxLength, maxBytes, sanitize, validate, valid, attrName, fieldSubfield, and httpUrl.
New available $sanitizer syntax options enabling the ability for sanitizer calls to be constructed and stored in strings useful in configuration settings.
New $sanitizer->getTextTools()->diffMarkup($old, $new) that returns a diff string of differences between $old and $new using HTML <ins> and <del> tags.
API variable upgrades
Fieldtypes and Inputfields
New “toggle” field – You can think of it like a checkbox in that it offers a simple ON or OFF selection like in this example. But rather than having a single checkbox to represent that state, it uses two buttons with their own labels. This enables the user to specifically select ON or OFF, YES or NO, TRUE or FALSE, etc. It comes with several of predefined labels like these, but you can also specify your custom labels (and in multiple languages if you'd like).
New asmSelect feature supporting parent/child relationships.
Improvements to InputfieldSelector module that improve the speed at which fields and subfields can be selected.
Improvements to the comments Fieldtype and manager – Added featured status to comments, new count() method to accompany existing find() method, and improvements to CommentFilterAkismet.
New ability for Fieldtype modules to specify custom classes to use for their corresponding Field objects.
CKEditor version upgrades as well as an HTML purifier upgrade.
WireHttp class upgrades
New wire404($msg) function that when called, stops execution with a 404 unless redirect URL available (for front-end use)
New wireEmpty($val) function that returns whether the given value is empty according to ProcessWire standards.
New WireData($a) function that creates a new WireData instance, optionally populated with array ($a) of data.
How to upgrade to ProcessWire 3.0.148
This section assumes you are upgrading from another 3.x version, but if you are upgrading from a 2.x version then you should go here instead.
When upgrading from one 3.x version to another, please use the General Upgrade Process. This consists primarily of making sure you've got everything backed up and then just replacing your
/wire/ directory with the one from the newest version.
In addition, if you are currently running any 3.x version prior to 3.0.135, you will also want to upgrade your root
.htaccess file to the newest version:
Upgrading your .htaccess file
If you haven't made any custom modifications to your .htaccess file then you can simply replace the old one with the new one. The new one is in a file named
htaccess.txt so you'll rename it to
.htaccess after removing your old one.
If your .htaccess file does have custom modifications, you know what they are, and are comfortable applying them to the new one — go ahead and follow the step above and then make those same modifications to the new .htaccess file.
If you aren't sure what custom modifications your .htaccess file might have, or how to apply them to the new one, please see this post which will quickly guide you through it: How to upgrade an existing .htaccess file
If you are curious what's new in this latest .htaccess file version, please see this post for all the details.
How ProcessWire professionals work
ProcessWire Weekly infographic
In case you haven't seen it yet, ProcessWire Weekly #294 included a pretty amazing infographic titled How ProcessWire professionals work – the results of our recent weekly polls summarised. I found it fascinating and a really compelling and beautiful presentation put together by Teppo. Be sure to check it out if you haven't already by clicking the graphic below:
Thanks for reading and Happy New Year! I hope that you enjoy this new master version of ProcessWire 3.0.148. Stay tuned, lots of great stuff is on the way for ProcessWire in 2020!
ProcessWire is a timeless tool for web professionals that has always been committed to the long term. It started in 2003, gained the name ProcessWire in 2006, and has been in active development as an open source project since 2010. Now more than a decade later (2020), we’re just getting started, as ProcessWire continues to grow and develop into the next 10 years and beyond!
Excerpt from ProcessWire 3.0.148 README file