Configuring Craft CMS with Redis for use on Heroku
This post is about connecting a Heroku app built in Craft CMS to Heroku Redis with an SSL connection. I’ve recently taken an app from the free tier to a paid tier on Heroku and was presented with a problem with connecting my Craft CMS app to Redis. I hope this post is helpful to someone else who’s found themselves in this situation. Upgrading Heroku Redis from the free tier to a paid tier… + read on
Build a basic Docker image
In this post, we’ll dissect a small Docker image I have on Docker Hub: johnfmorton/tree-cli. It’s not a complex image, but its simplicity is good because it is fairly easy to understand. Once you understand the basics, you can create your own more complex Docker images. The tree-cli image is based on an official Node image and has one customization: I’ve installed tree-cli from npm, which is a package that allows us to list… + read on
OneTrust blocking video playback due to privacy setting
I have several clients that use OneTrust for cookie consent. Each organization has different configurations for its OneTrust implementation. Today we encountered a tricky situation that I wanted to share. This particular organization’s OneTrust configuration is set to “auto” which means OneTrust will actively enforce the user’s cookie preferences without much configuration. The “auto” setting makes implementing OneTrust much easier, but we hit a roadblock when it came to allowing video playback for users… + read on
Video with transparency in Chrome, Edge, Firefox, Safari, iOS and Android, circa 2022 (updated in late 2024)
This post on using video with a transparent background will probably not age well. At least, I hope that is the case! Ideally, in the future, you can use a single .webm video file with an alpha channel and it will work everywhere.But, as I write this post in January 2022, and have updated in 2024, after much research and trying different approaches, I have a <video> tag that will play a video with… + read on
Tweaking site performance and configuring AWS
I’ve recently updated jmx2.com. The site worked as it was and I didn’t really have the spare time to get to the ever-growing list of updates I’d accumulated. I had a week of relative quiet appear and I’ve finally worked on the site again. Here’s what I’ve been doing. General clean up of the code in the Craft Twig templates. Built a new server with PHP 8 and moved the site. I had already… + read on
The HTML email template in Craft CMS
The documentation of Craft CMS improves constantly but for a CMS that evolves at the pace we’re used to with Craft, keeping up with documenting every nook and cranny doesn’t always happen. The HTML Email Template is pretty basic and hasn’t received much love in the docs yet. Searching the Craft documentation doesn’t turn up much information. If you search the Craft Discord community, you’ll find documentation nuggets scattered in conversations. In this post,… + read on
Docker, Craft, Forge, Arcustech, and Heroku
I have recently embraced using Docker for my local development. To be clear, I’ve had stumbles along the way. Luckily, I have a friend who is always there to help me out. (Thanks, Andrew!) As with almost everything I post on this site, this post serves as a note to my future self, but I hope you (you, being you, not me) gets something out of it too. Why do this? Like many people… + read on
So long, Craft Link List, and hello again, Craft Link List
Hello Craft friends! I’ve got news to share about Craft Link List, the Craft CMS-focused newsletter I’ve written since May 2015. Craft Link List #127 was the last issue I worked on before handing over the newsletter to the Craft CMS team. The decision to stop writing the newsletter was difficult. The diagram above is from this tweet that I stumbled upon in early December. I bookmarked it and kept coming back to it… + read on
Adding Date Validation Logic when Creating an Event in Craft CMS 3
I have a Craft CMS site with two Date/Time fields. One field is called calStartTime and the other is calEndTime. The goal is to check that calEndTime does not happen before the calStartTime. To do this, I have a custom module. Head over to pluginfactory.io to scaffold out a module. You could also do this in a plugin, but a module is probably easier. Listen for the Entry::EVENT_BEFORE_SAVE event and then make sure the… + read on
A critical error: Chromium revision is not downloaded.
I have been trying to get critical to work on my Mac but kept getting the following error when my webpack configuration hit the point where it was trying to configure the Critical CSS. Error: Chromium revision is not downloaded. Run “npm install” or “yarn install” at Launcher.launch (/Users/john/Sites/craft-w-webpack/node_modules/puppeteer/lib/Launcher.js:119:15) I tried fixing this by following the instructions, npm install, but the error continued to happen. The path to getting this fixed had several steps… + read on