Drupal Tips and Tricks

The installation, configuration and the work with Drupal obviously brings some challenges. Within this section you find some Tips and Tricks which shall help you to make your work easier.

Don't use style.css for CSS modifications; create an alternative file

If you make CSS modifications in the style.css, they will be overwritten if you install a new version of a theme. To avoid such problems it is highly recommended to make modifications in an alternative .css file.

Use distributions for a quick installation

The classical way to install Drupal, is to download and install the latest Drupal Core from drupal.org. If you want to save time, I recommend you to get familiar with the Drupal Distributions, which make it possible to quickly set up a complex, use-specific site in fewer steps than if installing and configuring elements individually.

Drupal Distributions

Install the administrator menu module to save time

Using the standard administration menu often requires you to click several times to get to the desired function. To make this process faster you can install the "Administration menu" which gives you a direct access to the different admin functions (drop-down menu).

Drupal administrator menu module

Drupal Views: Exclude current node from a list view

In some situations, for example a block listing nodes related to the node being viewed, you might wish to exclude the current node from a list view.

Views 3

Drupal Views

Install Drupal on your local machine(s)

Installing Drupal on your local machine(s) offers you manifold advantages. First of all, it allows you to work (much) faster compared to when working online. Secondly, it offers you the perfect playground to experiment and test things.

Back up your database

Install the module Backup and Migrate to back up your Drupal site. This is probably the easiest way to back up and restore your Drupal MySQL database.

Drupal module Backup and Migrate

Drupal 8: Mismatched entity and/or field definitions

If you get the warning "Entity/field definitions Mismatch detected Mismatched entity and/or field definitions." after upgrading (for example from 8.37 to 8.45 i.e. required security update) you have to fix this issue first before running database updates. If you don't you might get into unresolvable problems. The solution is easy.

1. Adapt index.php

Add the following script before $response->send(); in index.php file(located in Drupal root folder)

Drupal 8: Mismatched entity and/or field definitions

Experiment

The best way to learn anything new is by doing. Just start working on whatever it is you’re trying to do. Start small, just do! To experiment and play around you can install Drupal on your local machine(s).

Meta Tags in Drupal 8: Special elements beyond nodes/taxonomies/views

Meta tags in Drupal 7 was super easy: With the modules Meta Tag and Meta Tags Quick you could do anything. In Drupal 8 the module meta tag covers the standard cases but meta tags quick is not available in a usable version. So what to do?

Drupal module context metadata

The handy Drupal 8 module "Quick Node Clone" allows you to clone nodes easily

Are you looking for the successor of Node clone?

The Drupal 8 Quick Clone module works very similar as the Drupal 7 Node Clone module. The quick clone module allows users to make a copy of an existing item of site content (a node) and then edit that copy. Doing so the authorship is set to the current user and the menu and url aliases are reset.

Clone

Pages

Drupal themes to be compared