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.

Use the Drupal module Menu Firstchild to create menu items without links

By default, Drupal requires that you enter a path for each menu link you add/edit from the Menu administration page. There are cases you may want to create a parent item, without any path, that simply links to its first viewable child item. Menu Firstchild provides this functionality.

Another similar solution (didn't worked smoothly in all cases): Special menu items

Use the module SEO checklist to ensure basic Search Engine Optimization (SEO)

If you are not an expert of Search Engine Optimization (SEO) it might frequently happen that you are not aware of important functions that are required to ensure basic SEO. And basic SEO is absolutely key, if you want to grow the visitors of your website with the help of search engines such as Google.

Drupal 8 SEO Book: Now anyone can optimse a Drupal 8 website easily!

Since long time we are using the module SEO Checklist for the optimisation of Drupal websites. For non-experts its a great reference, for experts a nice helper module to check if all the required steps have been completed. With the launch of Drupal 8 Ben Finklea, the CEO of Volacci, created a revised version of the SEO checklist. This new release adapts to the new "module landscape" and brings the optimisation a step further. Many thanks to Ben for the great work!

 Drupal 8 SEO Book

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

Allow users to smoothly scroll up the page

If your website offers long pages or lists it is highly recommended to offer the visitors an easy, smooth and quick way to scroll-up to the top of the page. One solution to adress this issue is the implementation of a scroll to top button or link, which is typically displayed in the right or left bottom corner of the website.

Use Screenfly to test the responsiveness of your Drupal website

Screenfly is a must-use emulation tool because of its wide coverage of platforms. You can customize it the way you would like to test your website under various categories.

Alternatives that are free, easy to use and quick (i.e. no sign-up needed):

Rapidly test your website for cross browser compatibility across 300+ browsers.
http://www.browserstack.com/screenshots

Install "Module Filter" to simplify your module administration

The modules list page can become quite big when dealing with a fairly large site. To simplify the module administration you can install the module "Module Filter". The module provides you a filter textfield and a tab for each package.

Drupal module "Module Filter"

Shrink PNG files for your Drupal website: Easy, quick and professional

TinyPNG uses smart lossy compression techniques to reduce the file size of your PNG files. By selectively decreasing the number of colors in the image, fewer bytes are required to store the data. The effect is nearly invisible but it makes a very large difference in file size!

https://tinypng.com/

TinyPNG: Shrink PNG files easy, quick and professional

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

Customize your site’s error pages

The default error messages Drupal gives your users when they navigate to a web page that they don’t have permission to view or a page that is not found can be intimidating and not really useful. Thus you have the possibility to configure specific Error pages.

Drupal Error Pages

Pages

Drupal themes to be compared