Skip to main content

Articles tagged with "update hooks"

Format Drush output for easy wins!

3rd Apr 2024

Drush, the brilliant command-line tool for Drupal, is capable of giving you its output in several ways. Its global --format parameter can be set to a type that you can use in useful ways. Most recently, I found this incredibly useful when I had made some configuration changes through Drupal's admin pages, and needed to then script those changes to automatically apply to hundreds of sites on a platform we manage.

I simply asked Drush for the value of the configuration I had set, formatted as the PHP code to set those values. Then I could drop...

Read more

Changing Display Suite fields in update hooks

10th Feb 2011

We've been using Display Suite with Node displays on one of our latest sites. It was an experiment, and possibly not something we'll do again - DS offers some great functionality with build modes and ways to re-arrange fields and all sorts on nodes, but since we end up theming most nodes quite a lot anyway, it's not worth the extra hassle that Display Suite can add when you want to change the theming on DS fields, layouts, change the fields' settings etc...

We use update hooks to change most things on sites for clients, since this allows us to...

Read more

Drupal update hooks in a multi developer environment

17th Jun 2009

With large Drupal projects, especially those in their post-live phase, good code and release managment becomes vital.
Update hooks provide the mechanism by which database changes can be scripted and deployed to the live server, this article assumes you are already well versed with the ways of update hooks.
The two main problems we have with update hooks occur on multi developer projects

Same function is implemented in 2 branches. Imagine the situation where you have 2 seperate branches open on the same project, with different developers working on each branch.
Both branches want to update the module crm_integration so...

Read more