Useful Drupal modules

Click on the module name for notes, comments, patches.
Recommendations (for and against) are my personal opinion only and may be out of date. Feel free to email with corrections/suggestions.

Why doesn't the table mention Drupal 9 or 10?

1. Nowadays, I try and use Drupal as little as possible. Specifically I do not recommend it for a new website. I'd also strongly caution you against choosing Drupal if you're at the beginning of your career and trying to learn web development (front / back / full stack) or just want to manage/maintain a website. More details why by email on request.

2. By February 2022 I'd updated all the sites I look after to Drupal 9 (experience: mixed). As of March 2023, a year later, none of them were fully ready for Drupal 10 (waiting on support for various modules). By 13 Nov 2023 (a week or two after D9 lost support) I had updated a couple of them.

Q: What's the Drupal 9 to 10 upgrade experience like? A: it's what I'd describe as "just bearable", slightly better than D8 to D9, though with plenty of things to still trip you up. There is still deprecated code that needs fixing in D10 modules, and policy changes mean odd things will break (be prepared to turn off Aggregate CSS/JS files if your themes stop working, and note that Drush launcher doesn't work with Drush 12...)

Admittedly the upgrade_status module is the best solution they could have come up with for tracking compatibility. Also watch out for a nasty session headers bug with redirect_after_login.

What about sites still running Drupal 7? In short I still recommend leaving them on Drupal 7 or moving to another platform entirely. My prediction was that Drupal will extend D7 support year after year (note that drupal.org itself is still running D7). It's now been confirmed as 5 Jan 2025. There will have to be some sort of third-party long term support, because of the sheer volume of sites that are not being upgraded.

Your decision is really what specifically you think you will gain from Drupal 8/9/10 - often the answer will be not enough, and one of the main hassles - apart from converting each content type one at a time, and setting up a new theme, will be recreating all your views by hand, as views can't be automatically upgraded.

(134 modules in list)
Module name or machine name
Any text in the notes
Name D8 Sort descending Personally Tested Last Updated
Structure Sync (structure_sync)

d.o. page

"Essential"

Lets you synchronise taxonomies, custom blocks and menus.  

Important: always double check after importing if menu / block etc. has been correctly updated - if not, you may need to use a more forceful option.

Permissions Filter (permissions_filter)

d.o. page

"Essential"

The admin permissions page can get pretty long. 

This lets you narrow it down by typing permission names into a text field.

Address (address)

d.o. page

Used to be called addressfield.  Adds one dependency - commerceguys/addressing.

This is a bundle of address fields, the correct combinations are shown depending on which country the user selects via a dropdown.
You can configure which countries are allowed per field instance.
To set the default, use the Manage Form Display tab.

It validates postcodes are in the correct format. 

Also supports 'zones' (groups of countries/subdivisions) for shipping/tax purposes.

Views taxonomy term name into ID (views_taxonomy_term_name_into_id)

d.o. page

Allows you to use /my-view/foo instead of /my-view/123 when adding a contextual filter based on taxonomy terms

Username policy (username_policy)

d.o. page

This gives you a single box where you can enter tokens to form the default username.

It seems to work, but in D7 the patterns section ("Only use the below pattern elements") was empty. This is supposedly because there's a dependency on the 'profile' module, except profile doesn't exist in D7 (I tried profile2 instead but it made no difference) and profile2 doesn't exist in D8.

auto_username displays tokens OK and is more powerful / has more settings including customise at what point names are truncated, etc.

Masquerade (masquerade)

d.o. page

"Essential"

Allows you to browse the site as another user (to see what they see) and then quickly switch back again.  A general Drupal recommendation is to create test accounts for each of your roles, so this is useful for testing them.  (As per notes, don't use it for anonymous access, just log out.)  Replacement for 'Switch User'.

Patch and known bug:

Metatag (metatag)

d.o. page

"Essential"

This comes with a whole series of modules, including metatag_verification that will allow you to insert a google-site-verification tab. Instructions

How to add it to a content type/bundle:

  • You need to add the metatag field to the content type and position it on the form (it'll display as a disclosure triangle in the sidebar)
  • You also need to configure the level of available options at /admin/config/search/metatag/settings
Datetime Range (datetime_range)

d.o. page

"Essential"

Now in core, but you need to enable it.

Adds an 'all-day' option.

Field group (field_group)

d.o. page

"Essential"

Add group' button to /admin/config/people/accounts/form-display (or any other form), can then group fields inside fieldset/other HTML wrappers.  

 

Types of groups:

  • Fieldsets
  • Horizontal tabs
  • Vertical tabs
  • Details
  • Accordions
  • Divs
  • HTML elements

In theory can use this to add <div>s with css styles such as flexbox, like webform uses, but CSS to support that needs to be present on the page.
 

Raven (raven)

d.o. page

"Essential"

This module logs events and sends them to Sentry.  Sentry is an open source application you can self-install, but also a free/paid SaaS version.

For a content management framework as complex as Drupal it's worth logging errors.

Tips:

  • In Raven config, recommend not logging debug and info messages, but do select Enable fatal error handler and Enable stacktraces.
  • You can enable the javascript error handler as well, but personally I only use PHP.


Drupal benefits:

  • logs the Drupal uid
  • logs referrer URLs
  • you can tag versions (e.g. commits) as well as different environments
  • you get a full breakdown of AJAX requests

 

Views infinite scroll (views_infinite_scroll)

d.o. page

  • supports both a 'Load more' button and automated load
  • need to turn AJAX on for the view
  • patch needed to support back button (adds a preserve history option to settings, which then needs to be turned on)
Twig Tweak (twig_tweak)

d.o. page

Adds Twig syntax to insert views, view results, regions, entities (e.g. nodes, blocks, webforms), menus, images, image styles, tokens, breadcrumbs, messages, contextual links and more.

Unique field ajax (unique_field_ajax)

d.o. page

"Essential"

Gives you a checkbox for 'Unique' when editing fields - can have it checked during form entry (via AJAX) and specify a custom error message per field.  Seems to have bug where field you're checking is sometimes refocused (even if no errors) if you've already tabbed away from it and continued typing.

Mollom (mollom)

d.o. page

Deprecated

Not recommended

DO NOT USE - security issue and Acquia will no longer support or maintain it.

Spam filtering SaaS from Acquia. Free for up to 50 "ham" messages a day.  Scans message then provides a captcha if appropriate, scores each message for reputation, spam etc.  I never tried this module and anecdotally I've seen mixed reports / people suggesting it's not all that good.

Comment Notify (comment_notify)

d.o. page

"Essential"

Allows users to receive emails for replies to their comments (or optionally for all comments on a node).  Can be toggled by content type (although not by comment type, if you have more than one comment entity).  In permissions, you can also control which roles can subscribe.  Can also set it so the author of a node also automatically gets emailed for every comment.

I'm using three patches:

I also have a site which uses two comment types; I wrote a patch to turn off the notification checkbox for one of them.

Coder (coder)

d.o. page

Checks your code against Drupal coding standards.

No need to install this - isn't actually a module, it's a set of phpcs rules installed as standard in /vendor/drupal/coder/coder_sniffer

Devel (devel)

d.o. page

"Essential"

Key features:

  • Kint (enable kint submodule, for pretty variable printing, way to view properties and methods)
  • DevelMailLog (redirect all mail to text files instead, specify location directory, specify filenames using tokens for recipient, subject, timestamp) - DevelMailLog requires that you also install the MailSystem module to activate it
  • Config Editor and State Editor (enable via /admin/config/development/devel/toolbar)
Add another (addanother)

d.o. page

"Essential"

For this to work for any content type after you activate it, you have to manually edit and save that content type's settings, otherwise the buttons will be missing.

Responsive and off-canvas menu (responsive_menu)

d.o. page

This uses a JS library and works without a second copy of the menu in the HTML, and you don't need to make any changes to your existing navigation menu.

Look at the README file for instructions.
You need to install mm_menu and superfish in your libraries folder.

Note you're forced with the mobile version of the menu to have it expand to full depth (although the hack/workaround, if you want a top-level menu only,  is to hide the lower elements in CSS)

For hand-crated CSS / minimal javascript solutions, see https://css-tricks.com/responsive-menu-concepts/

SEO Checklist (seo_checklist)

d.o. page

Shows a long checklist, split over a series of tabs, you can tick off items and some (e.g. modules you need to install) are auto-detected. See Module of the Week blog post. 

Block Visibility Groups (block_visibility_groups)

d.o. page

Rather than change visibility for individual blocks, you can group them together and assign complex visibility settings to all of them. Module page promotes it as a simpler alternative to Panels.

Configuration Update Manager (config_update)

d.o. page

You also need to enable config_update_ui, which adds an 'Updates report' tab to Config Sync (/admin/config/development/configuration/report)

Better Exposed Filters (better_exposed_filters)

d.o. page

"Essential"

My recommendation - safe to use but understand it's currently pretty limited due to bugs.

To activate, change a view's Exposed Form style (Advanced column) to 'Better exposed filters'.  

  • Lets you enable AJAX auto submit. The difference is without BEF, with Use AJAX, an AJAX request (vs a full page reload) is made but ONLY when you click 'Apply'.  With BEF, as soon as you change a dropdown the view updates (like the filters on this site).  
  • You can change the input method for each field (e.g.a single checkbox for what would otherwise be a True/False dropdown), make them "collapsible", add select all/select none links where appropriate.  
  • Rewrite option that lets you reword all the options for the filter and also delete some.

Limitations:

  • If you have a search field - e.g. Combine fields filter - you MUST turn on 'Exclude Textfield' if you are using 'Autosubmit'  
  • Most of these options *aren't* available for taxonomies (e.g. webform where  
  • If you use the default views single or grouped exposed filters, with selects/radios, they work correctly, but when you change them to BEF style, with checkboxes and AJAX, they don't (form is submitted and the checkbox has disappeared)
  • Bug: reset button doesn't use AJAX, it sends you to a view URL instead (disable it in settings)

 

So all you can really do with BEF at the moment is use the AJAX setting.

Documentation 

Real Name (realname)

d.o. page

Use tokens to merge first name, last name or any other fields.
Then you can display the realname field in various places.  

Note: you have to add code to substitute the default username in the title of user node views - e.g. in mytheme_preprocess_block(&$variables)

Computed Field (computed_field)

d.o. page

Add a field whose value is calculated using raw PHP; specifically $value = 'foo';

(The recommendation is you write your PHP in a module of your own, and then call that method from the UI - for security and version control reasons).

Note: value is only calculated when nodes are saved (i.e. will initially be empty for existing content).

D8 status; alpha but working.

Toolbar menu (toolbar_menu)

d.o. page

"Essential"

Add extra menus (which appear as cog icons with a title, which you can click and expand) to the admin toolbar at the top of your site.

Views Contextual Filters OR (views_contextual_filters_or)

d.o. page

"Essential"

By default if you add multiple contextual filters to a view, they must all pass (AND).
This gives you a checkbox in Advanced > Query Settings for the view which switches it to OR.

Coffee (coffee)

d.o. page

"Essential"

Keyboard shortcuts. A bit like Spotlight/Alfred/Launchbar.

Alt+D to launch (memonic: alt + D = coffee!)

Handy as it doesn't clash with browser keyboard-shortcut extensions such as Vimium.

Tips:

  • April 2020: 8.x-.10 released, means you no longer need this patch to fix CSS colours
  • remember that you can/should add your own menus to the search index
Configuration Override Warn (config_override_warn)

d.o. page

"Essential"

Displays a message on config pages indicating which config settings have been override by settings.  
There's a config setting where you can hide the actual values (so you can hide API key - you need to use config editor to edit that, there's no admin page)

D8 Editor Advanced link (editor_advanced_link)

d.o. page

Adds options should as choice of target, title, class ID etc. to the link dialog in CKEditor.

Needs configuring after install.

Snippet Manager (snippet_manager)

d.o. page

Snippets are Twig templates that can be managed using the UI.  They can be inserted in various ways including via CKEditor, tokens.

Support for HTML, CSS, JS, and variables.

Environment Indicator (environment_indicator)

d.o. page

"Essential"

Change the colour of the admin menu according to whether you're using dev, staging, production etc.

(You can also add 'switcher' menu links, e.g. Open in dev, Open in Prod). 

Notes:

- need to reset the cache after you've made changes [#2406619]

Content access (content_access)

d.o. page

"Essential"

Set permissions by content type (with the option of overriding node by node)

Rules (rules)

d.o. page

Patch needed (the pages and roles tabs are missing on block editing form otherwise):

https://www.drupal.org/project/rules/issues/3160347