Alter Views sort by taxonomy weight

Submitted by christophe on Mon, 03/10/2016 - 19:10

The use case is that we want to sort a list of users by job title, where job title is a term reference to a dedicated vocabulary.
The sort is done by the job title term weight (defined via the vocabulary list).

I choosed to apply a custom sort function on a view, instead of a custom dynamic / entity query for two reasons :

Zero configuration Let's Encrypt under Virtualmin

Submitted by christophe on Sat, 10/09/2016 - 09:50

It has been there for a while under Virtualmin, but I was hesitating on using the GUI configuration of Let's Encrypt from Virtualmin on an existing manual configuration. Let's Encrypt does not allow you to make any change afterwards, yielding this error :

Request failed : The native Let's Encrypt client was used previously on this system, and must be used for all future certificate requests.

Drupal 8 links or where is my l() function ?

Submitted by christophe on Thu, 07/04/2016 - 07:24

The l() function is deprecated in Drupal 8, here is a starter.

Import the URL and Link classes :

use Drupal\Core\Url;
use Drupal\Core\Link;

You have several options, but basically, you can start with an url that will be used by a link.
One of the possible implementation will be used, with the Link::fromTextAndUrl method. 

A lightweight MySQL monitoring on Ubuntu

Submitted by christophe on Fri, 01/04/2016 - 16:47

In some situations, you just need a fast way to monitor MySQL and restart your service asap in case of crash. Neither a production script nor a replacement for a real server monitoring tool (like New Relic, ...) with IP fail over, but a basic solution when you just provisioned a low budget VPS with a very limited setup and still want to get a feedback for further logs details.

1) Install mailutils

It will be necessary to send an e-mail alert.

apt-get install mailutils

Kickoff a Drupal 8 development environment

Submitted by christophe on Mon, 08/02/2016 - 10:01

Drupal 8 evolves quickly, and it's easy to get lost amongst the several documentations that have been written since the beta releases, Drush and PHP version needs upgrade. Some things that I have learned.

Option 1 : No VM setup on Mac OSX, via Homebrew

Okay, VM's are easier to maintain solutions, but in some situations you just don't have enough RAM for having Virtualbox running all the time.

VLAD (Vagrant LAMP Ansible Drupal)

Submitted by christophe on Thu, 19/11/2015 - 15:41

After trying the latest dev release of VDD (needed to run Drupal 8, because at the time of writing this, the stable release is stucked to PHP 5.3), I decided to give a try to VLAD, another Vagrant alike solution.
Main reasons : git and drush are not already installed on th VDD dev, and sometimes I got stucked on the vagrant provisioning.

First reaction after installing VLAD : Woooooow !

Here are some of the sweet goodies that awaits you : 

Let's Encrypt, free SSL certificates

Submitted by christophe on Tue, 10/11/2015 - 14:53

Be ready for the opening of free ninety-day lifetime certificates !

The objective of Let?s Encrypt and the ACME protocol is to make it possible to set up an HTTPS server and have it automatically obtain a browser-trusted certificate, without any human intervention. This is accomplished by running a certificate management agent on the web server.