A DRUPAL Contribution Guide

What is the Drupal Community?

The Drupal Community consists of all the members using Drupal and coming together to form a group and voluntarily give their time to contribute towards bettering the community.

What ways can I contribute to the Drupal Community?

There are multiple ways to contribute to the Drupal community, and you don't need to have a developer background to give something to the community.

  • Drupal Core issues: You can select issues from Drupal core from : https://www.drupal.org/project/issues/search/drupal to contribute. Here you can commit patches to the issue, review tickets that are in “needs review” and if you have found any issue in Drupal you can log here by providing basic details about the same.
  • Contribute a Module to Drupal: If you have any feature in mind that you think can be used in Drupal as a standalone module , so that a larger audience can start using it , you can add your module to Drupal. For creating and getting it approved you have to follow steps mentions here: https://www.drupal.org/developing/modules
  • Contributed Module Issues: Along with DrupalCore issues , there is a huge list of bugs/issues which you can pick for fixing by providing patches from contributed modules: https://www.drupal.org/project/issues/search.
  • Documentation: if you do not have any Development background or are not interested in contributing by writing code, another interesting way is to help Drupal.org in improving Documentation. Documentation in Drupal is needed in the form of README.txt in every single module/theme , in form of code commenting , class usage etc.
  • Validating Issues: If you are good at reviewing tickets or have QA background you start contributing to the Drupal community by verifying the fixes provided by any community member on the. For this you have to pick up tickets specifically which are in “needs review” status. List of issues you can found here: https://www.drupal.org/project/issues/search/drupal?text=&assigned=&submitted=&project_issue_followers=&status%5B%5D=8&issue_tags_op=%3D&issue_tags= [4422 issues] , This list contains both Drupal core and Contributed modules issues , it's up to you which you want to pick and start working.
  • Contribute financially: The Drupal Association is a nonprofit (501c3) organization serving the international Drupal community. One can also contribute to the Drupal Community in monetary terms by opting for the individual membership. Read more here - https://www.drupal.org/association/individual-membership.
  • Note: https://www.youtube.com/watch?v=INpedSOpdqw&feature=youtu.be

  • Log new Issue: You can also log your own issues to Drupal.org. The issue can be from both Drupal Core and Contributed modules. If you faced any issue while using Drupal in Core or any module you can go and log the issue directly to Drupal.org. Make sure to not log a duplicate issue.

What is the Life Cycle of a Drupal Issue?

Following can be the different states of an issue:

  • Active - When a new issue is created, it is in an Active state.
  • Needs work - When the issue needs to be worked upon, it is in a Needs Work state
  • One can pick the issues from either of the two states to start with.

  • Needs review - Once the issue is picked, the patches are successfully submitted and all the test cases are passing, the issue’s state should be changed to Needs Review.
  • Reviewed & tested by the community - Once the issue is reviewed by any contributor, the issue is moved to “Reviewed & tested by the community” (RTBC) state where one of the members from the core community team reviews the issue
  • Fixed - When an issue passes from the RTBC state, it is moved to the Fixed state
  • Closed (fixed) - After the Fixed state, the issue moves to Closed (fixed) automatically within two weeks. This is the last state of an issue.
  • Closed (won't fix) - This state represents that an issue has no solution
  • Other States:

  • Patch (to be ported): When a Patch is to be ported for other versions of Drupal/Contributed module.
  • Postponed: When the Issues/Feature/bug is postponed by the author/community, and doesn’t need a fix.
  • Postponed (maintainer needs more info): When an issue is raised but according to the maintainer of the Contributed module, more info is needed about the issue to get it fixed.
work

Contribution workflow:

With the Merge Request workflow in Drupal Gitlab, It is now easier than ever to contribute to Drupal via code.

Step 1: Find a Drupal.org issue OR Create one.

Step 2: Create a Fork.

Step 3: Make changes to the fork.

Step 4: Commit & Push changes to the issue fork branch.

Once the MR is submitted, the same is reflected in the Drupal.org issue.

Mark the issue as Needs Review and let the reviewers and maintainers take this issue forward from here.

Step 1: Create an account on Drupal.org

Add organization to profile and add an attribute ( i.e Your name at organization OpenSense Labs ).

Step 2: Clone project in local:

Go to any theme/module > Version control > select the branch to work from > clone in theme or module folder.

Ex: git clone --branch '8.x-4.x' https://git.drupalcode.org/project/bootstrap.git

branch

Step 3: Find or Create issues:

You can find issues in contributed themes, contributed modules, and Drupal core.

You can pick open issues to provide patches or comment as per requirement. Or you can create a new issue, Make sure you go through all the issues, it should not be duplicated and a valid issue.

Step 4: How to create a patch

When you make changes in files to fix any issue.

1. Add that file by git add can add multiple files too.

2. Create patch from added files:

git diff --cached (files added by git add) > [description]-[issue-number]-[comment-number].patch

Eg:git diff --cached style.css > overflow-issue-fixed-313233-2.patch

Style.css: is the modified file, overflow-issue-fixed: description of issue, 313233: Issue no. 2: comment no, .patch to create .patch file.

https://www.drupal.org/community/contributor-guide/contribution-areas/modules-themes-distributions

3. Steps to Create Interdiff:

  • How to apply patch: git apply -v downloadedFile.patch
  • git apply git apply -v the previous patch (against which we need interdiff.)
  • git add (all changes of the previous patch)
  • make your changes
  • git diff > interdiff_4-5.txt
  • git add (your changes)
  • git diff --cached > new_patch_name.patch.

Step 5: How to create a project on drupal.org

Managing a drupal.org theme, module, or distribution project: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or-distribution-project

Go to drupal.org/project/add and click the link for the type of project you want to create. Fill out the form. By default, your project will be a sandbox project.

See documentation: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or-distribution-project/creating-a-new-project

Contributions to credit:

The following are examples of types of contributions that should be recognized:

  • Creating a well-written issue that describes a problem
  • Proposing a solution (either in the form of a patch, or a text comment)
  • Reviewing or testing a patch
  • Adding screenshots of the problem or solution
  • Adding documentation
  • Don’t post screenshots of CLI.
  • Don’t assign an issue to you for a long time or don’t assign it to yourself.

Channels

Some popular channels are:

  • #announcements - The default channel, used for Admin announcements.
  • #general - The main water cooler, used for general Drupal discussion and light support questions.
  • #support - The main support channel, used for long or deep support discussions.
  • #session-help
  • #DrupalCon
  • #contribute - Used for any discussion related to contributing to the Drupal project.
  • #accessibility
  • #diversity-inclusion
  • #jobs and #jobs-remote
  • #drupal-seo
  • #governance
  • #documentation
  • #layouts - The Layout initiative have their meetings here.
  • #search
  • #ux - Used by the Usability team for discussions and meeting announcements
  • #womenindrupal
  • #australia-nz - Australia and New Zealand Drupal community
  • #drupal-russia - Russian Drupal community
  • #drupal-ukraine - Ukrainian Drupal community
  • #drupal-saudi - Saudi Arabia Drupal community
  • #drupal-google - This channel for students and mentors involved in the Google Summer of Code program and anyone interested in learning more
  • #bugsmash - This is a Community Initiative to fix known bugs in Drupal Core
  • #drupal-infrastructure - Discussion of the Drupal project infrastructure

Many modules and themes have their own channels - for example:

  • #bootstrap
  • #commerce
  • #gutenberg
  • #opensocial
  • #paragraphs
  • #views
  • #webform
  • #bootstrap_barrio

Written By: Gaurav Mahlawat