ProcessWire core updates (2.5.24)


This week I saw the Optical Circuit demo by 0x4015 and my mind was blown. This is a 4k demo… no, not a demo for 4k screens, an actual self executing demo (.exe file) that takes up just 4096 bytes (soundtrack included), and runs in real-time (if you download it rather than watching it on YouTube). But for your convenience, here it is on YouTube:

Just for comparison sake, the small ProcessWire logo that you see in the ProcessWire admin (or the one you see on this page in the upper left corner, not including the P mark) takes up about 4k. And those are already compressed images.

Seeing what could be done with 4096 bytes in that demo made me think the least we could do was to slim down our JS and CSS assets. This week support was added for all modules to have alternate minified assets in addition to the current non-minified assets. When the minified JS or CSS files are present, and debug mode is off, the minified versions get used instead of the non-minified versions.

For example, a file like inputfields.js was getting well above 30k, and the minified version runs at about 13k. Similar results appear in dozens of JS files used throughout the system.

Minified versions of CSS files are also supported, but many are already minified (those that come from Sass origins at least), and there aren't many large CSS files in the system outside of the admin theme.

If you are a module developer, you may find it useful to include YourModule.min.js and YourModule.min.css files in addition to your YourModule.js and YourModule.css files. The core now recognizes and uses them when appropriate.

Field dependencies upgrades

Field dependencies now support OR values, thanks to a PR from LostKobrakai. Where you could previously only specify field=foo, now you can specify field=foo|bar to say that "field" can contain "foo" or "bar" (or more OR conditions if you'd like). While we were in there, we went ahead and upgraded it so that you could also specify OR conditions for the field portion. Meaning, you could do: this_field|that_field=value. You can combine them too, though we're guessing not many will need to go that far.

Something else you can now do is match checkbox and radio button fields by their label. Previously you had to specify the page ID, and perhaps it's best that you still do that… But for quick needs or FormBuilder use, you may find it more convenient to say page_field=Something rather than page_field=123.

These field dependencies work in both the ProcessWire core and FormBuilder. They can be specified globally for a field, and/or contextually for a field in a specific template.

Shift-click with multi-checkbox fields

Multi-checkbox fields now support shift-click to select a group of checkboxes at once, thanks to a PR from awt2542. In addition to working with InputfieldCheckboxes, it also works for checkboxes in any table (that uses MarkupAdminDataTable).

More options for modal windows

We've had a couple of requests to provide more options for modal window configuration, beyond just the width/height offset for the 4 different modal sizes (small, medium, large, full). As a result, we've added the ability to specify additional configuration settings for each of those modal window sizes, including: draggable, resizable, time to reveal (show), time to close (hide), modal behavior, and more. See the commit to config.php comments for more.

ProcessUser dropdown upgrade

When you've got 100+ users in your system, the current dropdown menu for Access > Users isn't particularly useful, because you'll only see the first 100 users in alpha order. We've updated it so that when you've got more than 50 (or 100) users, it now defaults to showing a list of roles and a count of how many users are in that role. Click it and it takes you to a Lister showing those users. If you have fewer than that threshold number of users and still want that behavior, you can set the threshold quantity of users in the ProcessUser module settings.

More PRs on the way

Special thanks this week to those that submitted pull requests and/or helped update the core: LostKobrakai, esrch, teppokoivula, diogo, boundaryfunctions, adrianbj, awt2542, and anyone else I've forgotten to mention here. We've also got many more pull requests to get through in the coming weeks, thank you coding with PW!


  • adrian


    An awesome week of updates and refinements! So cool to see more devs getting involved in contributing to PW.
  • Benjamin


    • 4 years ago
    • 43
    With http/2 coming up concatenation will become less of an issue (more on that here So I don't know if it would be worth the effort.
    • Teppo


      • 4 years ago
      • 33
      Seems to me that HTTP/2 is still going to require support from web-servers, and the big guys have just started working on that, which means that it could take a while before this gets serious footing.

      Taking a quick look around, nginx has planned to support HTTP/2 by the end of 2015, IIS is currently in beta-testing mode, and Apache doesn't seem to have any (official & public) plans yet.

      Valid point either way, and definitely something to keep an eye out for. I've got a tendency to expect the worst, which in this case means that I don't expect this to be really common and/or usable until years from now (at best), and even then there will be late adopters who won't benefit from this until much later.

      Hopefully I'm wrong, though (sure wouldn't be the first time), and thanks for bringing this up! :)

  • Tom Reno

    Tom Reno

    Great work everyone! Dependencies supporting OR values is an update I've been hoping for, and it's really rocking my world!
  • Yannick Albert

    Yannick Albert

    • 4 years ago
    • 44
    For sure, the browser would do its best to give us the best expirience to the user. But what if we destroy this behaviour, as someone did earlier in main.js for AdminThemeDefault?! (By the way, i liked the comment "prevent a clicked link from jumping back to the top of page (makes the UI nicer)". Nope, not nicer. ;)

    In admin, this is fixed due

    But, links in the modules-section, on this site, always fails as of this shitty thing: "/site/templates/scripts/main.js" (jQuery("ul.modules li").click...). We could prevent that by adding something like this: `event.metaKey || event.shiftKey || event.ctrlKey || event.which > 1`.

  • Teppo


    • 4 years ago
    • 43
    I'm particularly thrilled about the minification support; performance is a wonderful thing!

    Coincidentally I've been wondering whether it would be possible to combine requests for static assets (mainly JS/CSS) while in the admin. While technically possible, I'm not entirely sure if it would really be feasible, though.

    Since each page could potentially load different assets, we might end up with page-specific cache files, and that could get very ugly very fast. Perhaps I'm missing something obvious here, though.. anyone? :)

    • ryan


      • 4 years ago
      • 33
      Cmd/Ctrl-Click has always worked fine for me. You don't need JS for that. The browser handles that one natively.
      • Yannick Albert

        Yannick Albert

        • 4 years ago
        • 34
        My rant for this week...

        "Fancy Shift-click multi-checkbox fields", but cmd/ctrl-click is still a pain.


        Twitter updates

        • ProcessWire 3.0.133 adds a useful new Page::meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type— More
          14 June 2019
        • New post: This week we’ll take a look at 3 different WEBP image strategies that you can use in ProcessWire 3.0.132+. Then we’ll dive into a major update for the Google Client API module, and finish up by outlining some useful new updates in FormBuilder— More
          31 May 2019
        • New post: This week we've added WEBP support in ProcessWire thanks to a GitHub pull request from Horst Nogajski. This enables you to have highly optimized image output in PW and I think you’ll really like the difference it makes— More
          24 May 2019

        Latest news

        • ProcessWire Weekly #266
          In the 266th issue of ProcessWire Weekly we're going to take a closer look at ProcessWire 3.0.133 (dev), introduce a third party module called Repeater Images, and highlight a recently released site belonging to the Australian Antarctic Division. Read on!
 / 15 June 2019
        • ProcessWire 3.0.133 core updates
          ProcessWire 3.0.133 adds a useful new $page->meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type. Read on for all the details, examples and screenshots.
          Blog / 14 June 2019
        • 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.