This week we’ll take a look at LoginRegisterPro — a new module that provides an all-in-one, self contained module for providing new user registration, secure logins, profile editing, and more. It does this all in a manner that is reliable, efficient, comprehensive and secure. More
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
Support for generation of WebP images from the core, enabling drastically smaller and faster image file delivery. Be sure to also see: Strategies for using WebP images with ProcessWire and Migrating to WebP images on an existing site.
Added support for custom fields in file/image fields enabling you to add and configure fields for file/image fields the same way that you do with templates.
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 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
Upgraded $pages->touch() to support specifying date type (modified, created, published).
Expanded $input cookie support in core with PlatinumElvenKing™ cookie technology.
New $cache->renderFile() method – does the same thing as $files->render() (rendering any PHP file as a template file with all API variables, etc.) except that it caches the output so that it doesn’t have to re-render the same file until your cache expiration rules take effect.
New $datetime->elapsedTimeStr() method – takes two dates/times and gives you the difference in a nicely formatted value.
New $config->sessionForceIP setting that lets you dictate the source of the client’s IP address.
New $config->statusFiles setting – Specifies optional automatic include files when ProcessWire reaches each status/state.
New $database->allowTransaction($table) that returns whether or not a transaction would be allowed right now for given $table.
New $database->tableExists($table) that returns whether or not the given table exists.
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
WireHttp updated with CURL support to support more environments.
WireHttp sendFile() method updated so that it can now support delivery of partial downloads.
Added the ability to hook multiple methods at once in a single addHook call. See this example that demonstrates using this new feature in a hook that provides on-demand mirroring of remote web server files to your dev environment,
New hookable $templates->fileModified() method that is called whenever a modification is detected to a template file.
Column width enhancements in the template editor – Drag column width percentage to set and save width automatically.
Improvements to field/template context override settings – You now get a list of all field settings that you want to allow to be customized per-template, you get a table that shows you a diff of what overrides are present, and you now get modal links to modify them.
New Notice::noGroup constant that adds the ability to programmatically send Admin messages, warnings and errors that shouldn't be collapsed or grouped with others of the same type. This can be used to make sure a user can't miss an important notification.
.htaccess file upgrades – New improvements to core .htaccess file and new additional .htaccess files for redundant security.
ProcessWire system URLs/paths now more customizable giving you more control over file locations.
New debug mode installer toggle – Added ability to enable debug mode automatically from PW’s installer
Improvements to logs system including improved readability for errors/exceptions logs and auto-sorting of logs in Ajax navigation by date updated.
Upgrades to static translation functions with the ability to specify options.
New Debug::backtrace() method that provides a more PW-specific alternative to PHP’s debug_backtrace() function.
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.
Improvements to MarkupQA class so that you can now configure it for more control over what it does.
New WireMail blacklist setting enabling you to prevent ProcessWire from sending emails to addresses matching patterns that you specify.
More helpful error handler that can auto-detect and advise on common errors.
Documentation improvements especially with regards to procedural functions which previously weren't covered in the online API reference.
Added ability for users to create their own bookmarks in Lister or ListerPro, where previously only superusers could create and manage them.
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.txtso you'll rename it to
.htaccessafter 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
Post a comment
A look at two new modules released this week: LoginRegisterPro and FileValidatorImage. Discussion on upcoming plans for new FileValidator modules and how they are useful in PW. Plus a brief highlight of two great new ProcessWire-powered websites: Aaron Copland (an American composer) and Sono Motors (an EV startup). More