ProcessWire Weekly #419

In issue 419 of ProcessWire Weekly we'll check out this week's core updates, introduce a brand new recipe of the week, and more. Read on!

Welcome to the latest issue of ProcessWire Weekly. Hope you folks have had a nice and relaxing weekend so far. In this week's issue we're going to check out the latest weekly update from Ryan, and share a brand new recipe of the week. For said recipe we'll use at least one feature that's new for the stable version of the core.

As always we're also going to choose and highlight a new site of the week. This time our pick for the site of the week title belongs to the German company Die Holzbauer, and was developed for them by flipzoom; Media.

Thanks to all of our readers for being here with us again, and as always, any feedback is most welcome – please don't hesitate to drop us a line if there's anything in your mind you'd like to share with us. Enjoy our latest issue and have a great weekend!

Latest core updates and a weekly update from Ryan

In the latest weekly update at the support forum Ryan provides a brief update regarding last week's stable release, 3.0.200. Long story short: things have gone smooth so far, and as of this week there's a 3.0.200 tag in the GitHub repository.

Some small updates for the core this week

Compared to last week's release version, a few relatively minor fixes have been pushed to the master branch. More details can be found from the weekly commit log at GitHub, but here's a brief summary of what's new since last week:

  • Fixes for two incorrect assignments in conditional tests during fieldgroup saves.
  • Fix for an issue where accessing non-existing pagination pages could sometimes result in a redirect loop.
  • Fix for an issue where duplicating fieldsets in the admin didn't work as expected.
  • Fix for a PHP 8.1 notice caused by the ProcessPageEditImageSelect core module.

If you're already running 3.0.200, you may want to grab the latest version from GitHub — and if you're still on an earlier version, now would be a great time to upgrade!

In other news...

In his update Ryan also shares some details about an upcoming project that he's just starting with our forum moderator Pete. Said project involves migrating a large website from WordPress to ProcessWire, a topic that has previously resulted in very interesting case stories among other things.

Ironically, if past history is any indicator, I seem to get the most done on the core (and modules) when I'm actively developing a site. Needs just pop up a lot more. [...] I'll share more on this project and what we learn in this WP-to-PW conversion in the coming weeks.

— Ryan

I don't know about you folks, but personally I'm very much looking forward to hearing more about how this project goes, and what can be learnt from it.

That's all for our core updates section this week. For more details be sure to check out the latest weekly update from Ryan. Thanks!

Recipe of the week: automatically suggesting content on the 404 page

With every new stable release there are typically some new features, including those that introduce new capabilities to the developer API. In this week's recipe we'll make use of one of these new features, adding a bit of extra flair to the 404 page.

The problem

When a user hits the 404 page, whether that's due to an error from their part or some change that has been made on your site, it's always a potential problem: if they don't find what they were looking for, they're less likely to stick around and browse your content, buy your products, or whatever it is that you'd like them to do.

One way to alleviate this issue is by making sure that our 404 pages are as useful as possible. In this context useful means, among other things, providing some hint on where to look next. Even better if said hints can be made somewhat context aware.

The solution

As of 3.0.200 ProcessWire has a way to identify the closest matching page for provided path: for an example if someone looks for issue #420 at path /issue/420/, but that issue doesn't yet exist, this method will instead return the issues parent page.

Here's how you could make use of this in your 404 page template — or in our case in the basic-page template, since the template used by our 404 page is basic-page:'

<?php
if ($page->id == $config->http404PageId) {
    $closest = $pages->request()->getClosestPage();
    if ($closest->id > 1) {
        // note that we'll skip home page, since that doesn't
        // seem like a particularly useful suggestion
        echo "<p>Closest matching page we could find is "
            . "<a href='{$closest->url}'>{$closest->title}</a>"
            . ", is that what you were looking for?</p>";
    }
}

Though this approach may not help in all situations, generally speaking anything that makes finding content easier is a welcome addition. As such, we'd recommend giving above solution a try and seeing if it can be of benefit for your site.

That's all for our recipe of the week. Hope you found it useful, and please let us know if you've got suggestions for future recipes — or problems that need solving! — and we'd be happy to feature them in our future issues.

Site of the week: Die Holzbauer

Our latest site of the week is Die Holzbauer, which is a German company specializing in sustainable and creative wooden products. Their product lines include point of sale or POS displays, modern wooden advertising materials, and individual wooden furniture for the catering industry.

Die Holzbauer" stands for the combination of sustainability and creativity. Since 2014, we have been developing and producing sustainable POS displays, modern wooden advertising materials and individual wooden furniture for the catering industry - Made in Germany.

The website of Die Holzbauer was crafted by flipzoom; Media, and features a stunning design — it's amazing what one can achieve by relatively simple visual elements and well-thought-out typography — and plenty of quality content, ranging from company introduction and product pages to a jobs board and a contact page with a very nice custom contact form.

The bulk of the public facing site is powered by the Foundation front-end framework, along with some non-related additions, such as the cookie consent solution powered by CCM19. When it comes to ProcessWire modules, there are at least a couple that we could spot: FormBuilder and ProCache, two popular commercial modules from Ryan.

Big thanks to flipzoom; Media for sharing this project with us, and our congratulations to the client for their new ProcessWire powered site. Great work from everyone involved in this project; the site looks amazing, feels intuitive to use, and has top-notch content!

Stay tuned for our next issue

That's it for the 419th issue of ProcessWire Weekly. We'll be back with more news, updates, and content Saturday, 28th of May. As always, ProcessWire newsletter subscribers will get our updates a few days later.

Thanks for staying with us, once again. Hope you've had a great and productive week, and don't forget to check out the ProcessWire forums for more interesting topics. Until next week, happy hacking with ProcessWire!

Post a comment