Google Code In  Date: 16th Dec 2017
Getting Started with Drupal for GCI Students

Intro to Drupal :

Drupal is one of the best Content Management System which allows you to make different web pages and apps with the help of thousand of themes and modules available. Drupal is an open source community in which people from various countries are contributing every minute to make it more and more better.
Drupal's core is written in PHP and it follows many principle such as coding standards,modularity, etc.
A beginner can too contribute to Drupal (adding a keyword to an page is also a quiet good way of starting in contribution to Drupal). There are lot of people who are available at some point of time to help you with using Drupal. You can also chat on IRC with the community.

Working of GCI :

Google Code In is a content to introduce Pre-University students of age 13-17 to Open Source Development. Every year , different open source organizations register themselves with Google Code In and put different tasks. Students from all over the world participate in it by claiming tasks of the organizations they like and working to submit it before the deadline. Drupal also takes part in it . So , for that you need to make an account on drupal.org and then Google Code In group of Drupal.

Installing Git and Drupal and Working with Git: 

Git is a tool which helps you to manage your changes to the code. So, for installing it type the following command in terminal : 

1. For windows download the latest version from the following link.
2. For Mac, use Macports and type the following command :
$ sudo port install git-core +bash_completion +doc +gitweb +svn
3. For Linux, type the following command on Terminal :
$ sudo apt-get install git-core

Basic Configuration :

1. Choose the name which will be suitable for publicly associating yourself with the commits. 
 $ git config --global user.name "Your Name"
2. Provide an email address through which anybody can contact you. 
$ git config --global user.email yourname@example.com
3. Setting git for using automatic line endings.
$ git config --global core.autocrlf true


 Installing Drupal:
  
Type the following command in the terminal for installing Drupal: git clone http://git.drupal.org/project/drupal.git

Getting Started in the Issue Queue : 

We are here going to know how to report the issues in the Issue Queue and for that we should know how to report an issue, confirm a bug report. 

So, here we are going to post a sample issue , and it can be done in following manners -

1. Firstly , go to the Drupal 8 Sandbox issue (The issue is a sample issue which is used to make beginners understand issue queue.)



 



2. Then ,Under Component , select Miscellaneous and under Category select Bug Report. 

3. Now , Copy the following text and paste it into the title Box.  
Rewrite description for URL alias on node/add/*

4. Then , Copy the following and paste into the Description Box : 

Note: This issue is being posted here as an exercise by a participant in the http://drupalladder.org ladder for contributing to core. Please don't do anything with this post. The real issue has already been resolved in Drupal 8. If you would like to try this exercise yourself, visit http://drupalladder.org and click on Drupal Ladder
Current:
Optionally specify an alternative URL by which this content can be accessed. For example, type "about" when writing an about page. Use a relative path and don't add a trailing slash or the URL alias won't work.
Proposed:
The alternative URL for this content. For example, type "about" when creating an about page. Use a relative path without a trailing slash


5. After completing the above steps , hit save and you will see that your issue has been posted.

6. After we have created the issue , we have to confirm a bug report which can be found in the Drupal Sandbox Project which can be installed by typing the following command :

git clone --branch 8.x https://git.drupal.org/sandbox/bhirsch/1388780.git drupal_8_sandbox_for_drupal_ladder

7. After you have installed your sandbox project, move to your sandbox site, and the bug (which is help text to make an URL alias is bit confusing) can be found under Add content -> Article or Basic Page -> URL Path Settings . If you found the bug, the confusing text , there, then you can comment by posting a screenshot of it on your issue , thereby confirming the bug. 


8. For that, Go to the issue which you have posted and then click on Comment.
Then, you can comment how the bug can be found and can attach the relevant screenshot ( I have attached the above screenshot).
The comment can be made like this :


9. So, Congratulations, the bug report has been confirmed. Now , the last thing to do is to update the issue summary which can be done according to Drupal issue summary template. The issue summary will look like this :


Testing Patches :  

Git configuration commands:  
Type the following Git Configuration commands in the terminal to make the command more legible and do functions like changing the color of diff files :
 
git config --global color.status auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global color.diff auto



1. Now go to your sandbox directory which you have downloaded by typing cd location_to_sandbox. 

2. Check on which branch you are by typing the following command :
$ git branch

3. If you are not on the branch , type command :
$ git checkout 8.x

4. Now download the patch in comment2 in your drupal sandbox directory.

5. Then, go to your sandbox site and give the issue a look. (The help text is confusion as seen in the screenshot below).


6. Now move to your sandbox directory in the terminal and then apply the patch by typing the following command : 
git apply 1326088-rewrite-desription-for-url-alias.patch


7. Now, when you will go back to your site and refresh the page, you will see that the helping text has been changed and has become quite understandable.

 8. Congratulations, the patch has been applied. 

This was a great experience of successfully testing the patch.I learned a lot of new things like how to use git to track the changes and then applying them in the patch. "Getting started with Drupal for GCI Students" on Drupal Core Ladder is one of the best resources for the beginners who are looking to participate in GCI and are looking to contribute to Drupal as a part of it. I , also being a beginner learned from this ladder only, it was very helpful for me to get started.







 





  












Comments