Applying Patches to Drupal Core

Last modified: March 31, 2007 - 16:26

Another in the quick and dirty series that shows how to use the command line to apply, reverse and test a patch for Drupal core. Anyone, even folks with no coding experience at all, can help test patches. The video is available in .mov and .mp4 formats and is 12 minutes in length. For more info on applying patches make sure to read the Patches section of the handbook.

Watch the .mov (26 MB) | Download the .mp4 (56 MB) | Get the Torrent (.mp4 - 56 MB)

'Even folks with no coding experience at all ...'

John_Kenney - June 29, 2009 - 03:38

Please. This comment is obviously written by somebody who can code quite well and can't see how the other half lives.

Real non-coders cannot take this video by itself and apply a patch - and it doesn't really describe how to apply a patch to a module which is the most a non-coder could hope to be doing.

In my case, the main part that is unclear is what directory the module patch should be in (non-coders don't really know what 'root' means - and I don't think Drupal root applies in the case of a module), how to navigate to that directory using a variety of tools (like cygwin in windows), and then what exact command to type from various locations.

Drupal root

SageOfCode - June 29, 2009 - 16:08

Drupal root is defined in the video as the directory where the index.php file is located.

I found the video useful.

...

John_Kenney - June 29, 2009 - 16:48

The video wasn't unhelpful, it just wasn't helpful enough on it's own and I needed much trial and error, plus reference to quite a few other sources before I could figure it out. So the implication that it is a standalone self-explantory piece is exaggerated, imo.

Also I'm no expert, but I could only make a module upgrade work by having the patch file in the module folder. I guess that is the 'root' when dealing with a module - whereas the 'root' for drupal core is as shown in the video. Perhaps if you really understand 'root' and how file directories and the commands work, you could have the module patch someplace else and make it work. I don't really know, but I couldn't based on the info provided.

Plus there are 2 issues there. One is what the thing ('root') is - and whether it differs for a core patch vs. a module patch, and the second is how to navigate there using a tool like cygwin. This later may seem trivial, but as a non-coder, it took me quite a while to figure out. In the video, that navigation happens as basically an instaneous event that the presenter assumes the audience knows how to do.

Anyway, just a suggestion that an even more basic presentation with info on both core and module patches would be helpful to some if developer types are truly interested in having non-developer types trying out their patches.

 
 

Drupal is a registered trademark of Dries Buytaert.