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.

Using Drupal, HTML5, and Javascript to Create Hybrid Internet Apps

Author: Jared Whitehead

In the ever evolving internet world, an issue that has been arising is “how do I take an existing website and make it cross-browser compatible?” Of course the simplest answer to this would be to create a style sheet for each browser, it’s easy but it can take up a lot of time and hassle. The same issue comes up when you want the website to be viewable on a mobile device as well.

Clean URLs not working? Check your .htaccess file!

Here are some of the most common reasons why your clean URLs may not be working (assuming you're using a normal Linux/Apache hosting environment).

1. Your site is in a subdirectory, or you're using an Alias, but you didn't set RewriteBase

2. Your .htaccess file didn't get uploaded at all

3. Your .htaccess file is corrupt

4. Pager and other query strings don't work


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

Use the module "Quick Tabs" for tabbed content

If you want to create tabbed content for your website, the module Quick Tabs is probably the easiest solution. As the name promises, this module allows you to create tabbed content quickly and easily.

Use the module "Quick Tabs" for tabbed content

Use the Drupal module GeSHi Filter for syntax highlighting

The Drupal module GeSHi Filter offers you a convenient way to display different code on your website (php, html, css, js, etc.). The GeShi Filter module provides a filter for source code syntax highlighting for a wide range of languages. At the time of this writing the GeSHi library supports highlighting for more than 200 programming languages and configuration syntaxes.

Important notes:

Forget the Drupal SEO modules from LevelTen Interactive

Over time I stumbeled over SEO related Drupal modules from LevelTen Interactive and I tried them. Having all my experiences in mind I came to a very clear conclusion: Forget these modules, don't try to install them if you don't want to waste your time! Why?

Use the Drupal module PDF to ImageField to generate images from PDF Files

If you use a filefield to upload PDFs you might want to display a preview thumbnail or to generate a gallery of images from the document. If so, the Drupal module PDF to ImageField is the solution you are looking for. he PDF To ImageField module provides automatic conversion of uploaded PDF files to images. The module is implemented as an additional widget for
File Field where PDFs are uploaded to. It places generated images into a Image Field on the same content type.

The magical trio of Drupal content management: Bundle copy, node clone and node convert

Creating content types and content can use-up lots of your time and energy. Our experience has shown that there are three key modules, which allow you to speed up this process drastically. These modules are particularly valuable for the creation of mock-ups with demo content.

The magical trio of Drupal content management

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.


Use the module "Commerce Fancy Attributes" to add a color and/or size selector to the cart form

This module provides a "Rendered term" attribute mode, that shows the rendered term instead of a radio button (degrades to a normal radio button when JS is off) on the add to cart form.

How to use the module to add a color selector:

Drupal module "Commerce Fancy Attributes"


Drupal themes to be compared