You are here

Drupal Planet

git format-patch is your Friend

Submitted by Oliver Davies on 21 May, 2014 - 11:00

The Problem

As an active contributor to the Drupal project, I spend a lot of time working with other peoples’ modules and themes, and occassionally have to fix a bug or add some new functionality.

In the Drupal community, we use a patch based workflow where any changes that I make get exported to a file detailing the differences. The patch file (*.patch) is attached to an item in an issue queue on Drupal.org, applied by the maintainer to their local copy of the code and reviewed, and hopefully committed.

Don’t Bootstrap Drupal, Use Drush

Submitted by Oliver Davies on 19 November, 2013 - 20:57

There are times when doing Drupal development when you need to run a custom PHP script, maybe moving data from one field to another, that doesn't warrant the time and effort to create a custom module. In this scenario, it would be quicker to write a .php script and bootstrap Drupal to gain access to functions like node_load() and db_query().

To bootstrap Drupal, you would need to add some additional lines of code to the stop of your script. Something like:

Creating Local and Staging sites with Drupal's Domain Module Enabled

Submitted by Oliver Davies on 17 June, 2013 - 22:28

The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The issue is that the domains are stored within the database so these are copied across when the data is migrated between environments, whereas the domains are obviously going to change.

Pages

Subscribe to Drupal Planet