Drupal

Drupal 8 custom Google Maps and automatic geocoding with Composer, Drupal Console and Drush

Submitted by christophe on Mon, 09/01/2017 - 18:20
The scope of this article is to illustrate the responsibilities of several tools and techniques used in the Drupal ecosystem (Composer, Drupal Console, Drush, Configuration management) to achieve quickly a simple custom Google Maps use case: an Address field will be defined on a content type. We want the address to be geocoded automatically for each node on save to display a Google Map. The display of the map will be achieved by a custom module to allow further extension.

Front and backend relations are getting better faster stronger and easier

Submitted by christophe on Sun, 08/01/2017 - 20:06

Here are a plain list of modules that really gives site builders front and backend super powers and make these two categories of developers closer than ever. 

Page Manager

It supports the creation of new pages, and allows placing blocks within that page.
Like Drupal 7's Page Manager, it provides a concept of "page variants", each with their own selection conditions.
Additionally, it can be used to take over an existing page, like overriding /node/% to change what is displayed when viewing a node.

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 :

Behat : affordable testing for small to medium client projects

Submitted by christophe on Sun, 08/11/2015 - 13:46

One of the many amazing sessions given at the DrupalCamp Leuven 2015 was about tests applied to small / medium sized projects. I was a bit sceptical, we all agree that testing should be part of any development process, but it can run you quickly out of budget on small projects. @pfrenssen has just proven the opposite.

Running Drupal 8 on Koding.com

Submitted by christophe on Sun, 15/03/2015 - 19:12

I wondered if there was a solution to play around with Drupal 8 on a Chromebook (super cheap hardware / "everything in the cloud model" with a 16G SSD).

After some reddit I discovered that Koding.com provides you freely, in the browser, a VM / terminal plus a text editor for PHP and other popular languages (Ruby, Python, ...).

Open up your Koding Terminal and cd in the Web directory (default, single docroot for a VM).

cd Web

Use +SymLinksIfOwnerMatch option in .htaccess for Drupal on Virtualmin

Submitted by christophe on Sat, 08/11/2014 - 21:47

The default Drupal 8 .htaccess provides +FollowSymLinks.

There is an old discussion about that on the Virtualmin forum.

patch is under creation for Drupal 8. It changes the Options +FollowSymLinkson the root .htaccess directory.

by 

Options +SymLinksIfOwnerMatch

You should also change this on the sites/default/files .htaccess