Jump to content
ryan

PW 3.0.130 – Core updates

Recommended Posts

Work continued in closing out issue reports this week. We’re down to about 60 of them now, though if we subtract issues that aren’t reproducible, are already marked as resolved (close pending), may be moved to the request repo, or are a discussion (rather than something to fix), then we’re closer to half that number. Over these last few weeks we’ve been working on issue reports, but I’ve also been enhancing the core in small ways as well. This post will cover a few of the useful enhancements that have been made in recent weeks—

https://processwire.com/blog/posts/pw-3.0.130/

  • Like 18
  • Thanks 1

Share this post


Link to post
Share on other sites

Hey @ryan, great update! I wonder if the new CacheRender function can also be used for repeaters or repeater matrix items? Like this:

foreach($page->repeater_field as $item) {
  echo $cache->renderFile($item->render(), WireCache::expireSave);
}

It would be great, especially with a lot of repeater items and outsourced render files the rendering can take a few seconds.

  • Like 2

Share this post


Link to post
Share on other sites

The caching though won't work if you are using wireRenderFile and reusing the same file with different variables that influence the markup when outputting.
There would need to be another option where you could set some type of ID for the cache; Right now, if i have files being used with different options for output based on supplied variables, like a page builder, it will just render the 1st one over and over if i render the same file in succession.

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Macrura said:

The caching though won't work if you are using wireRenderFile and reusing the same file with different variables that influence the markup when outputting.
There would need to be another option where you could set some type of ID for the cache; Right now, if i have files being used with different options for output based on supplied variables, like a page builder, it will just render the 1st one over and over if i render the same file in succession.

Actually this is possible with the update:

https://github.com/processwire/processwire/commit/12aede03fe297421b538ea6ef16c0f42424077a4#diff-fc95d41f7bed91883ef3f4f16d8c92cdR1104

  • Like 3

Share this post


Link to post
Share on other sites

@ryan, I want to test the new blacklist support with WireMail and WireMailSmtp, but on both configurations I get error of missing method isBlacklistEmail()

Error: Exception: Method WireMail::isBlacklistEmail does not exist or is not callable in this context (in G:\VHOSTS\_PW-REPOSITORY\wire-3.0.latest\core\Wire.php line 519)

(I took the latest DEV branch 3.0.130 this morning)

My code is like in the blog example:

    $mail = wireMail();
    $to = ['info@nogajski.de'];
    $result = $mail->isBlacklistEmail($to, [ 'why' => true ]);
    if($result === false) {
        echo "<p>Email address is not blacklisted</p>";
    } else {
        echo "<p>Email is blacklisted by rule: $result</p>";
    }

Also if I use the to() method of the WireMail base class with WireMailSmtp, I need to adapt the cc() and bcc() methods of it to support it too.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...