Planet Drupal

React and Drupal 8 with JSON API 1/3

Submitted by christophe on Tue, 16/05/2017 - 22:30
The goal of this serie of posts is to achieve quickly a simple museum Audioguide web app based on a React isomorphic boilerplate with a Drupal 8 backend that uses the latest standards. The web app will be fully decoupled by being hosted on another domain than the Drupal one. As a real world case, we want it to be fully multilingual. This is the first post of a serie of 3. This first one focuses on having a Drupal and React setup that meets our requirements. The second one will define a MVP that will just fetch the audioguides list and a detail view (GET operation), the last one will then add extra features like getting user feedback (POST operation).

Update a project installed via composer_manager or drush to a CI based Composer template under Drupal VM

Submitted by christophe on Tue, 18/04/2017 - 12:24

If you have to go for a Drupal core update from a previous install based on composer_manager or drush (both deprecated), consider installing something robust, Composer friendly, that excludes vendor and core for a lightweight repository and enables CI and automation tools like Phing, Behat, PHPUnit, CodeSniffer, ...

If you don't have Drupal VM installed, head to the documentation.

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.

Install Solr 6 for Drupal 8 on Ubuntu 16.04

Submitted by christophe on Wed, 26/10/2016 - 21:55
This setup is intended for production use on a dedicated server (VPS, ...). For development purpose it should be preferable to use Drupal VM, it comes with a default Solr configuration that can be enabled via the config.yml file. If you are using Drupal VM and want to configure Search API for Solr, you can jump to point 4.

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 :