Skip to main content

Using terminal and dig to check your DNS records

Recently I had an error with a domain smtp server not recognising port 587.  To begin to test what was happening I wanted to get some key information about the server.  My tool of choice was the dig command.  Using the dig command:

How to programmatically create a custom Drupal 8 block

Blocks are a great way to add pieces or chunks of content to your Drupal site.  Capable of displaying simple text, images, forms or complex logic.  There are plenty of sites around that show you how to add a simple custom block.  However, if you are a developer like me, when you are writing your custom block programmatically it has far more requirements than a simple block.  In this article, I'll show how to:

regex expressions a working sheet

Regular expressions (regex) are extremely useful in extracting information from any text by searching for one or more matches of a specific search pattern.

Loading and accessing Drupal node data - like title, nid and other values

Loading the node

To query the node, I prefer to create a series of functions to mange the process in a class.  However, keeping this simple, this can be achieved through:

$node = \Drupal\node\Entity\Node::load($nid);

Otherwise if you require to load multiple nodes, where the list of node.nids is in an array.

$nodes = \Drupal::entityTypeManager()->getStorage('node');

Adding Tailwind css to Drupal

Tailwind CSS is a highly customisable framework that delivers developers the tools to quickly pull your site together.

 

Initial Configuration

The installation and configuration steps are essentially the same as those outlined within the Tailwind documentation.

Note they need to be performed within your custom theme's directory such as /themes/custom/{theme} for Drupal 9

OctoberCMS common command functions

Common commands

Themes and plugins have similar command lines.  So rather than note them individually and miss clarity, the reference {type} can be replaced with the term plugin or theme.

 

install
php artisan {type}:install AuthorName.PluginName

 

list
php artisan {type}:list

 

iOS localization to your app

Localization is the process of showing other languages in your app and is surprisingly painless in iOS.  For most of us the base version of the app will be written in English.  Then you will localize the app to other languages.  The process of localization in this article is based on the latest Xcode which is 12.1.

RealmSwift 10.1 framework not found realm-sync

Updating Realm and RealmSwift from 5.5.x to 10.0.0 brought in the following error 

RealmSwift 10.1: framework not found realm-sync

The greatest clue I came across to solving this issue was on the Realm GitHub issues page for realm-sync error.  However, updating Cocopods wasn't the only step required to correct this issue.  The steps I took were:

clearing cache

At times while developing in October CMS, you will perform a step that kills the site.  Recently, I had transferred the site to production and I was working through our steps to cross check deployment.  This included reviewing the error logger plugin.  The error logger has four tabs Mailer, Slack, Syslog and Relic.

Deployment error iPhoneOS

Post the recent update to Xcode 12.x (12A7300), I found opening an app returned the following deployment error

Subscribe to