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.

Troubleshoot error message after update/installation of module/theme with "undo"

Occasionally it might happen that you get an error message or even a fatal error after updating/installing a module or theme. If so, try to undo the recent changes first.

Issues page for Drupal Views

Trobleshooting computed field with Drupal 8 (Drupal core 8.3.2; May 2017)

  • 8.x-1.0-alpha1 does not work with Drupal core 8.3.2 (you'll get unexpected errors) >> Choose 8.x-2.x-dev
  • Computed fields don't display on content types which existed prior the module is installed >> Create a new content type and everything works smoothly

Important: The field only updates when the node is saved (Cron, clear cache and similar not enough)

Drupal Computed field

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

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 Rooms Availablity Search Block - Ajax breaks "Book this Room" link

Ajax overrides form action="/node-url" with action="/views/ajax"

Workaround with Drupal's hook_form_alter() for views module. See similar problem with solution here: https://www.drupal.org/node/1294164#27

The hook_form_alter() basics can be found here: http://websmiths.co/blog/very-introduction-drupals-hookformalter

Use the Drupal module File Entity (fieldable files) to add files over the web interface with Drupal 7

File Entity (or fieldable files) is an easy Drupal 7 solution allowing you to add files over the web interface without FTP (if admin/content/file is missing, install the File Entity module).

Drupal module File Entity (fieldable files)

"The website encountered an unexpected error. Please try again later." (Drupal 8)

You might get "The website encountered an unexpected error. Please try again later." after the installation or uninstallation of a module, when you login with the admin user or in general. Possible solutions:
  • run update.php
  • move the module installed/uninstalled outside the Drupal installation
  • Clear cache within the database by emptying all cache tables

Google Maps v3 api stop working

The Google Maps API allow for the embedding of Google Maps onto web pages of outside developers, using a simple JavaScript interface or a Flash interface. It is designed to work on both mobile devices as well as traditional desktop browser applications. The API includes language localization for over 50 languages, region localization and geocoding, and has mechanisms for enterprise developers who want to utilize the Google Maps API within an intranet.

If the Google Maps v3 API stops working, try the following:

GMap Module for Drupal 9: Styled Google Map

Did you use the GMap Module for your Drupal 7 website and you are looking for alternatives for Drupal 9 or Drupal 8? Do you need to create a Google Map view with multiple locations? Do you need a field formatter with a broad scope of options? The the Drupal 9 and Drupal 8 module Styled Google Map is the solution.

GMap Module for Drupal 9: Styled Google Map


Drupal themes to be compared