Introduction
The issue about Craft 3.2 and more.
Welcome to another issue of Craft Link List. Since the previous issue, Craft 3.2 has been released. The update brings a number of new features. Check out both links in the Top Stories section to get up to speed on the new newness.
As always, you’ll also find Craft tips, plugins and other webdev links in the issue. If you’ve got a link to recommend for a future issue, visit the link submission page.
Thanks to this issue’s sponsors.
DotAll 2019, the official Craft CMS conference, is coming to Montreal this September. Check out the amazing line-up of speakers.
Freeform 3.2 breaks the mold with what a form plugin can do. Using the relations
parameter lets your Freeform-created form become a comment field, a rating field and more. Learn more here.
Let’s hit the links,
John Morton
Top Stories

Craft 3.2 is Here
Craft 3.2 has arrived. (We're currently at 3.2.2 according to the official changelog.) This post on the Craft site will give you an overview of the new features including autosaving of entries and powerful new preview options.
FYI: Issue 84 of this newsletter included a link to Workflow for Updating a Version-Controlled Craft CMS Website from CraftQuest. It might be a good time to re-watch before you take the 3.2 plunge. (Requires subscription.)
devMode.fm // What's New in Craft CMS 3.2 with Brandon Kelly ⭐️
This episode of devMode is a must-listen if you’re into Craft. (That’s a safe bet since you are reading a Craft newsletter!) Hear directly from Brandon on what's new in Craft 3.2. It's informative and fun.
News
About the Craft Discord channels
Have you been in the Craft Discord group and wondered about the purpose of each channel? Wonder no more thanks to the new “welcome message” excerpted below.
If you're not on the Craft Discord yet, here's a post on the Craft site with info on joining the community.
Community channels:
- #general – This is for general watercooler chatter. (Not the best place to get help!)
- #show-and-tell – Did you just launch something cool with Craft? Show it off to the community here.
Channels for getting help
- #learning-craft – If you’re new to Craft and still getting familiar with it, this is the best place to get help.
- #craft3-help – This is the main help channel for working with Craft.
- #craft3-extend – For help building new plugins or modules.
- #plugin-help – For help working with plugins.
- #commerce2-help – For help working with Craft Commerce.
- #testing – For help writing tests for a project or plugin.
Off-topic channels:
- #front-end – Front-end development.
- #devops – Deployments, infrastructure, and other DevOps topics.
- _#shop-talk – It’s business time.
- #tools – The tools of the trade.
- #random – For stuff that’s a little too off-topic, even for #general.
Brandon also mentioned:
Also please keep in mind that [Discord] is not an official Craft support channel. We do our best to help when we can, but if you really need our help, you’re best off emailing [email protected]
Craft Commerce 2.1.10 released
Craft Commerce is at 2.1.10. If you haven't updated to at least Craft Commerce 2.1.9, you really should update now due to an an important security fix.
Craft 3.1.34 released
In case you're not making the jump all the way to 3.2 yet, the 3.1.x version of Craft has had 2 updates since the last issue. One fix was for an XSS vulnerability.
Plugin Store fix for faster page loads
There was a slow-down in the plugin store about a week ago. It's fixed now, but the issue is one most of us are familiar with: a bigger-than-expected uploaded image. In the case of the plugin store, there were a few SVG icon files for plugins that got added to the system that needed to be optimized. Fixed now. All good.
Ben Rogerson released the source code behind the Gatsby-powered cruftlesscraft.com site.
Featured Sponsor

Level up your skills at Dot All 2019
Experience three days of workshops, talks, and events centered around modern web development and Craft CMS at Dot All 2019. Tickets are available now and see the whole speaker line-up at dotall.com.
Tools, tips, and fundamentals
About making the headless preview work in 3.2
Craft 3.2 is out. Some of the docs are still filling in with detail though.
One question that's come up is about making the headless preview work. Here's some sample JS that Brandon posted in Discord.
// Get the preview token from the URL
let m = document.location.href.match(/\btoken=([^&]+)/);
let token = m ? m[1] : '';
// Then forward that on whenever you are sending an API request
// the 'url' below is the Element API request URL
let url = `...?token=${token}`;
// ...
Tip: Set preview targets dynamically in Craft 3.2
Patrick Harrington shares a tip on using Twig for setting up preview targets in Craft 3.2.
Universal language switcher for Craft CMS
Piotr Pogorzelski contributed an answer to the previous StackExchange link about language switchers. He's also got an entire post on Craft Snippets on the same topic. He shares a Twig macro and discusses how to customize it.

Carbon 1 is deprecated - migrate to Carbon 2
Have you seen the Carbon 1 depreciation notice shown above in your terminal during a Craft upgrade? This post on StackExchange might shed some light on why you're seeing it and how to update.
The issue is that Carbon 2 requires PHP 7.1.8+ while Craft 3 requires PHP 7.0+. Carbon 1.x was recently deprecated, but by no means is it unsafe, unstable or risky to use, etc.
You may also want to check on the migration notes for Carbon 2.
Truncating text with Twig macros in Craft CMS | Craft Snippets
These Twig macros will allow you to truncate text - by a number of words or number of characters, without splitting words.
General Config Settings: maxRevisions
Now that Craft 3.2 autosaves entries, you may want to tweak how many revisions will be saved for each entry. The default is 50
, but you can control that with the maxRevisions
setting in your config/general.php
file.
Perfecting your technique
Setting Up Your Own Image Transform Service ⭐️
Create optimized/transformed images for pennies by leveraging the power of AWS Lambda to create your own Serverless Image Handler.
How to create a content builder using Craft CMS ⭐️
Vaughn D. Taylor has a new take on how to build a content builder in Craft. He discusses how Neo, as opposed to using SuperTable, allows him to create a more flexible and DRY solution which leads to a cleaner UX for content creators. The post includes many template examples.
What is Cache Warming?
In this blog we want to go over the concept of a warm cache vs a cold cache and the benefits and downsides of warming your cache for visitors.
What are the different scenarios to plan for when using $allowAnonymous in a controller?
This is currently an open question on StackExchange specific to the new Craft 3.2 release. If you've got answers, please contribute.
What has been updated with the
allowAnonymous
behavior in Craft 3.2 and what scenarios does it require that we use the additional configuration settings such asALLOW_ANONYMOUS_LIVE
andALLOW_ANONYMOUS_OFFLINE
?
Creating Your First Test in Craft CMS | CraftQuest
Craft 3.2 introduces full support for testing using Codeception. Have you never done automated testing before? Following along with Ryan and learn how to install Codeception in your project and create your first acceptance test. (Requires subscription.)
Sponsor

Robust Relating of Submissions to Craft Elements in Freeform 3.2
The new Relations feature has now made Freeform a suitable replacement for handling things like Comments, Ratings, Product Reviews, Sign-up forms for Calendar Events and more! Check out the Relations documentation for more information and a step-by-step guide to set up!
Plugged In
AsyncQueue
This plugin by Oliver Stark replaces Craft's default queue handler and moves queue execution to a non-blocking background process. The command craft queue/run gets executed right after you push a job to the queue.
Table of contents ⭐️
This plugin by Piotr Pogorzelski generates a table of contents from HTML headers in text. Anchor links in table direct to corresponding headers in text.
Section Field
This plugin provides a field type for choosing sections. This allows content administrators to select from available singles, channels, and structures. Entries using this field can then access these selections in their templates.
Prism Syntax Highlighting
This plugin enables a new field type called "Prism Syntax Highlighter" within the control panel. When used in an entry, a code block will appear and you can enter highlighted text from a choice of over ~170 different languages.
Twig Portal
Adds a portal tag to Twig, to render DOM anywhere in the document.
Christian Seelbach (aka carlcs), the plugin's creator, explained its use in a bit more detail in Discord like this:
It works very similar to Craft’s
{% css %}
tag. Instead of passing CSS to thehead()
, the{% portal %}
tag makes it possible to pass HTML to the location where you have theportalTarget()
function.
The plugin's creation was inspired by the Vue Portal component.
Overheard
It’s not Craft, but it’s interesting.
devMode.fm // Svelte 3's radical new approach to web frameworks ⭐️
This episode of devMode welcomes Rich Harris, the creator the Svelte JavaScript framework. He discusses the new Svelte 3.0 release, and how it moves away from a traditional JavaScript framework into a JavaScript framework compiler.
Open Source Guides
Open-source software is made by people just like you. Learn how to launch and grow your project.
WhichBrowser/Parser-PHP
Browser sniffing gone too far — A useragent parser library for PHP. See it in action by visiting this link.
If this interests you, check out MobileDetect plugin for Craft CMS 3.x mentioned back in issue 52 of the newsletter.
Mailtrap.io — Fake smtp testing server. Dummy smtp email testing
Mailtrap is a dedicated playground for your email tests. Use it before your messages are perfect enough for reaching real inboxes.