O'Reilly logo

Drupal 7 Development by Example Beginner's Guide by Kurt Madel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — applying and testing the patch for the Colorbox File module

So, now let's learn how you go about patching Drupal code.

  1. First, we need to download the patch (http://drupal.org/files/colorbox_file_overhaul-2.patch) to the same directory that we checked out the Colorbox File module to: d7dev/sites/all/modules/colorbox_file.
  2. Next, we will use Git to apply the patch to the Colorbox File code:
    $ git apply -p0 colorbox_file_overhaul-2.patch
    colorbox_file_overhaul-2.patch:59: trailing whitespace.
    colorbox_file_overhaul-2.patch:99: trailing whitespace.
    colorbox_file_overhaul-2.patch:324: trailing whitespace.
    warning: 3 lines add whitespace errors.
    

    Note: the trailing whitespace warnings are not a major concern, and are just a matter of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required