This week we have some very useful new additions to both the core Repeater Fieldtype and the ProFields Repeater Matrix Fieldtype. This post covers all the details along with a couple of brief demonstration videos. More
ProcessWire 3.0.190 has 15 commits relative to 3.0.189 and contains a mixture of issue resolutions and feature additions. We’ll review these below, in addition to updates for the PageAutosave and ProFields Table modules.
In terms of core updates, this post covers the differences between dev branch minor versions 3.0.189 and 3.0.190. The last version covered by a blog post here was 3.0.184, so if you don't follow the weekly forum posts but are interested in what else is new since 3.0.184 (and there has been a lot), be sure to read ProcessWire Weekly editions #384 and newer, in addition to the weekly forum posts.
Feature additions in 3.0.190
Added a new option to repeaters that enables you to specify whether repeater item controls (delete, insert, clone, etc.) should be always visible or visible only when the header is hovered. This can be found on the "Details" tab when editing a repeater/matrix field in the "Repeater Editor Settings" > "When to show repeater item controls/actions".
$pages->find()support for "id" selectors like
id.sort=2|1|3which ensures the pages are returned in the order given by the IDs. Previously you could only do
id=2|1|3without a guaranteed order.
Adding a field to a template using the "Send to template(s)" option in the field editor now updates the Template's modified date.
Added support for searching subfields with PageAutocomplete using the
$pages->add()method has been updated to pull a fresh copy of the page from the database after it has been added. This helps with some API usages where returned $page may have not been fully initialized in some cases.
As mentioned in an earlier forum post, this version enables you to specify a background color for RepeaterMatrix item labels with a hex color code in your repeater matrix item labels. For instance added
#FF0000to the repeater item label would make the repeater item header background color red (see screenshot further down in this post). I recommend sticking to background colors that work well with white/foreground text colors.
$pages->raw()->col($id, $col)which returns the raw value for a native pages table column for a given page ID. Also added
$pages->raw()->cols($id, $cols)which does the same thing but returns multiple column values in an array. Like other methods added by the PagesRaw class, it can enable much faster performance for cases where you need a native column value but don't want to load the page. This addition is mostly for internal core use (moreso than the other raw methods), but perhaps it will occasionally come in handy for others too.
Issue resolutions in 3.0.190
Fixed issue with WireHttp hanging when using the socket method (fix via Radon8472).
Fixed several PHP 8.1 deprecation notices.
Fixed PageAutocomplete matching everything when using a field it doesn't recognize.
$pages->findRaw()error on fields that lacked a DB table.
Fixed missing repeater item outlines/borders in AdminThemeUikit.
Fixed a multi-language pagination issue when a pagination prefix other than "page" was used for the default language.
Removed jQuery dependency for parent modal windows (fix via Teppo).
PageAutosave + LivePreview v6
This week there is also an update posted to the PageAutosave + LivePreview module in the ProDrafts, ProFields and ProDevTools boards. This new version adds the following:
Adds an autosave on/off toggle that appears at top of page editor screen.
Adds a confirm dialog when user clicks live preview but has autosave off.
Adds an option to save previous changes when autosave was off and is turned on.
Adds a configuration setting for default autosave toggle on/off state.
Adds a configuration setting to specify whether the live preview window should close or remain open when the page editor window unloads.
In case you missed it earlier, here's a video posted by Jonathan Lahijani (in the forum) demonstrating his use of the PageAutosave + LivePreview module with his page builder:
ProFields Table v22
A new development version of ProFields table was posted in the ProFields board. This version adds the following:
New support for a row cloning feature (via Robin S). You can enable it in the field editor "Details" tab, "Settings & Actions" fieldset.
Added support for a new "Toggle" column type, which is essentially the same as the recently added Toggle field in the core.
Improvements to Uikit admin theme output, various JS improvements, fix for date formats issue and other minor improvements and fixes.
Thanks for reading, have a great weekend and remember to stop by ProcessWire Weekly for the latest ProcessWire news, updates and site of the week.
This week we have some great performance and scalability improvements in the core that enable lazy-loading of fields, templates and fieldgroups. More