Drupal

By lostcarpark_admin, 10 June, 2026

What is an Update Hook

When working on contributed Drupal modules, you sometimes need to make changes to schema or data structures.

This will generally need an update hook to make necessary changes to existing stored data on sites that installed the module before the change.

The update hook itself is generally simple enough. Here’s an example from the Smart Trim module, to update “read more” link settings on each display type:

By lostcarpark_admin, 26 March, 2023

Often we want timed events on our website. As a general rule, we should try to avoid having these take place in the front end. There are many ways this can be achieved, typically involving cron tasks.

However, occasionally we do genuinely need a task to be controlled from the front end, usually when we need to give user feedback.