ProcessWire 3.0.113 core updates

ProcessWire 3.0.113

This latest version on the dev branch has a lot of updates and this post covers all the details. The focus this week was on covering the queue of issue reports, and a whole lot of progress was made, plus some other useful additions in ProcessWire 3.0.113.

Summary of updates

In terms of completed issue reports, there were about fifteen of them covered. See the commit log for this week (especially September 12 and 13) for most of the details.

The CKEditor version has been upgraded from 4.8.0 to 4.10.1.

The SessionLoginThrottle module has been refactored and improved. Previously it was a bit too aggressive when two factor authentication was installed. This fixes that, as well as adds a new configuration setting so that you can log activity.

The ProcessController class was refactored so that it now supports method-level permission settings. It uses the existing module info "nav" array permission settings that were previously just used for determining what navigation was shown. As a result, ProcessController can now further reduce the access control/permission code requirements on Process modules.

Added Horst's pull request #118 for the ImageSizerEngine which improves the output when requesting a dimension larger than what the image can support, by maintaining the aspect ratio. Thanks also to @thomasaull for identifying this and for the suggestions in issue #628.

The $mail API variable now has shortcut to(), from() and subject() methods to shorten the fluent interface calls for sending an email. For fluent interface calls, it's no longer necessary to call $mail->new(); Now you can do this if you want to:

$mail->to('foo@bar.com')
  ->from('bar@foo.com')
  ->subject('Hi')
  ->body('Hello world')
  ->send(); 

New $sanitizer methods

Several new case conversion methods were added to $sanitizer. The need has come up often enough (both in the core and outside of it) that I thought we needed a standard set of case conversion methods in the core Sanitizer class:

$sanitizer->hyphenCase('Hello world'); // hello-world
$sanitizer->kebabCase('Hello world'); // hello-world (alias)
$sanitizer->snakeCase('Hello world'); // hello_world
$sanitizer->camelCase('Hello world'); // helloWorld
$sanitizer->pascalCase('Hello world'); // HelloWorld

You can pass these methods a short string (like above) or a giant string of text. They will take whatever you throw at them. While the hyphen/kebab case methods might seem very similar to the pageName() sanitizer, they are actually quite a bit simpler and more standard for general purpose use, rather than page names.

Special support for required attributes

Implemented @Toutouwai request #224 which enables using HTML5 required attribute on inputs that aren't visible. Previously it wasn't practical to use them so much because when the user hits the Save button, the error for the missing required field might appear on a different tab than the user is on. Thus, they would never see the browser error message. This update captures that scenario and automatically changes it to the right tab, and opens any fieldsets and Inputfields as needed till it can reveal the field with the missing requirements.

This update also adds JS API methods, which were built in part to accomodate the above:

  • InputfieldFocus($inputfield) - Show given $inputfield element, regardless of where it is (changing tabs, open fieldsets/fields as needed), and focus.
  • InputfieldOpen($inputfield) - Open the given $inputfield element.
  • InputfieldClose($inputfield) - Close/collapse the given $inputfield element.

Thanks to @Toutouwai (Robin S) for the suggestion and initial code that got this started.

Thanks for reading this week's summary of updates in ProcessWire 3.0.113 and have a great weekend. Visit the ProcessWire Weekly for the latest ProcessWire news and updates!

 

NextProcessWire 3.0.115 and 3.0.116 core updates

2

This week we look at two new versions on the dev branch and a lot of updates. These include new page traversal methods, page list customization options, improved empty trash process, two factor authentication improvements, improvements to the profile editor, and more. More 

Latest news

  • ProcessWire Weekly #551
    In the 551st issue of ProcessWire Weekly we'll check out what's new in the core this week, share a new weekly poll, and more. Read on!
    Weekly.pw / 1 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer