Drupal Interview Questions and Answers

Drupal Interview Questions

Here are list of drupal interview questions and answers that will help prepare you for your next drupal interview ahead of time.

Normally drupal interview questions start with some basic concept of the subject and later they continue based on the further discussion and what you answer.

I have listed down few commonly asked Drupal interview questions and answers. Wish you a good luck for your interview!

List of Drupal Interview Questions and Answers:

Q. What is Drupal?

A. Drupal is an open-source platform and content management system for building dynamic web sites offering a broad range of features and services including user administration, publishing workflow, discussion capabilities, news aggregation, metadata functionalities using controlled vocabularies and XML publishing for content sharing purposes.
Equipped with a powerful blend of features and configurability, Drupal can support a diverse range of web projects ranging from personal weblogs to large community-driven sites.

Q. Can I use Drupal on the command line?

A. Yes, you can use drush –
drush is a command line shell and Unix scripting interface for Drupal.

Q. What is Database abstraction layer in Drupal?

A. Allow the use of different database servers using the same code base.
Drupal provides a slim database abstraction layer to provide developers with the ability to support multiple database servers easily.
The intent of this layer is to preserve the syntax and power of SQL as much as possible, while letting Drupal control the pieces of queries that need to be written differently for different servers and provide basic security checks.
Most Drupal database queries are performed by a call to db_query() or db_query_range(). Module authors should also consider using pager_query() for queries that return results that need to be presented on multiple pages, and tablesort_sql() for generating appropriate queries for sortable tables.

Q. What is a patch?

A. A patch is a file that consists of a list of differences between one set of files and another. All code changes, additions, or deletions to Drupal core and contributed modules/themes between developers are done through patches.
The differences are presented in a structured and standard way, which means that a program (i.e. also named patch) can be used to apply the changes to another copy of the original file.

Q. What is difference between Diff and Patch?

A. Diff creates Patch.
In simple terms, the diff command is used for comparing the differences between two versions of a file. The resulting file is called a patch, and typically is given (by the user) a “.patch” suffix.
This patch file then can be used on other copies of the “old” file by using the patch command, thus updating their “old” file(s) to match the “new” file(s).

Q. Which are the core required modules in drupal 6.x?

A. List of core required modules in drupal 6.x are:
Block — Controls the boxes that are displayed around the main content.
Filter — Handles the filtering of content in preparation for display.
Node — Allows content to be submitted to the site and displayed on pages.
System — Handles general site configuration for administrators.
User — Manages the user registration and login system.

Q. Whether drupal is written in procedural-style or object oriented?

A. Procedural oriented.

Q. What is content type in drupal?

A. Content type is used for inputing data it is collection of different data type fields. The data entered through content type can be seen the end user.
You can add more content type in drupal while there is some in built also available like basic page etc. You can also modify its fields In other words content type is like a form through which a user having permissions can enter the data and end user can view to it.

You may like  Top 10 HR Round Questions And Answers

Q. What is taxonomy in drupal?

A. Taxonomy is used to categorize the content in drupal you can also make a relation between content by using this taxonomy.
For example, in drupal you can add vocabulary and assign terms to it. Then those terms you can use for your content, base on the content having the terms you can relate the data.

Q. What is module in drupal?

A. Module is used to extend the functionality of drupal there are some core module available with the download of drupal and you can also used contributed module for these you have to download and install to these modules.

Q. What are roles in Drupal?

A. Every user come to drupal site has an role if the user is not logged in is anonymous user having user id 0 and the user which is logged in will have user id greater than 0. You can also create more roles in drupal.

Q. What are blocks in drupal?

A. Blocks are used to display content at different places you can show content in blocks menus in blocks or these can be a module driven or admin created dynamic modules.

Read Also: CodeIgniter interview questions and answers

Q. What is node in Drupal?

A. A node is content created using content type or you can say when we save data through content type it will be saved as node.
This node will have a node id that is used for further operations of content like view, edit, delete etc.

Q. What are the regions in drupal?

A. Content in drupal is displayed in different portions of the page like
header, footer, content, side bar etc these are the regions where we place the content for example to show a block it must be assigned to a region.

Q. How to define regions in drupal?

A. To define new regions in drupal you have to go to your current activated theme directory’s .info file and write these lines:
regions[content] = Content
regions[help] = Help
This will create two regions Content and Help.
You can use assign blocks to these regions.

Q. How to make a module?

A. Module is used to extend the core functionality of drupal. You can make it easily for basic purpose and expand its functionality when you more familiar with this these are the main files required for making a drupal module:
a) make a directory of module name according to the name of your module and place it
in sites/all/modules.
b) mymidule.info — this file defines name and package where the module to be list in drupal
c) mymodule.module — main file for module where all the functions will be define.
These are the main files for making modules but you can add css and js files if required here mymodule is thename of module you can change it accordingly.

Q. What makes “Search” in drupal as an excellent feature than Other CMS?

A. Drupal uses search indexing using content type, classification information from taxonomy system and the content meta data. Drupal treats its content as fine-grained semantic information that Drupal knows about can be used to fine-tune search results.
Also, you can tweak and override the search system to adjust the user interface, the way content is ranked, and the way results are displayed.
That said, Drupal integrates well with external search engines such as Apache Solr, Xapian, and Sphinx if the built-in search does not meet your needs very easily.

You may like  PHP4 vs PHP5 | Difference between PHP4 and PHP5

Q. What is a Module in drupal?

A. A module is software (code) that extends Drupal features and/or functionality. Drupal Supports – Core modules – included with the main download of Drupal, and you can turn on their functionality without installing additional software. Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation.
You can also create your own module – CustomModules using PHP programming, and Drupal’s module API.

Q. What are hooks in Drupal?

A. Hooks are drupal api code which allows module to interact with the Drupal core. Drupal’s module system is based on the concept of “hooks”. A hook is a PHP function that is named foo_bar(), where “foo” is the name of the module (File name is thus foo.module) and “bar” is the name of the hook. Each hook has a defined set of parameters and call back functions to trigger functionality on specific event. For example, if you use form with submit button, on submit event you can have specific functionality.

Q. How database system of Drupal works?

A. In Drupal, each type of information has its own database table. For instance, the basic information about the nodes of your site are stored in the Node table, Comments and Users also have their own database tables, and roles, permissions, and other settings are also stored in database tables.

Q. What modules do you always recommend and why?

A. List of modules that are always recommended:
Views – This module is essential in every website I build. It makes displaying lists of content very easy.
If you want an image slideshow, a list of blog posts, a list of products, etc., views is the best place to start.
Panels – Panels gives you the ability to create custom pages easily. These custom pages can have multiple regions of content. For example, you may want to create a home page that has a Slideshow on the top, and a two column layout below.
Ctools – On its own, Ctools does not seem to do a lot. However, it is actually a very powerful framework if you begin developing your own modules. You can use Ctools for developing multi-step forms, modal dialog boxes, and even multi-step forms inside of modal dialog boxes.
Token – Tokens are little snippets of text that can be used as replacement patterns. For example, if your website sends out emails and you want to add in the users name, or you want fill in a link path with a node id to provide a helpful link to content, tokens will save the day.
Pathauto – The Pathauto module is a necessity for any website that frequently adds new content. This is also especially important if you have a website that allows users to create content using content types. Pathauto simplifies creating clean and search engine friendly URLS for the various content you add to your site.
Webform – If you want to provide easy to fill out forms for the visitors of your site, the Webform module will help you out.
Rules – Drupal rules will allow you to set up condition actions.
Date – This is useful for allowing the easy selections of dates in content types (with a nice date popup). It also integrates nicely with the views module.
Quicktabs – Makes it easy to add tabbed content without having to write your own Javascript/Jquery. What more do I have to say?
Libraries – Makes organizing your various libraries of functionality easy (see Jquery UI above for an example). Google Analytics – I don’t build a Drupal website without adding Google Analytics. This module makes it very simple. What gets measured, gets improved after all.

You may like  Hello, World - Your First PHP

Read Also: CakePHP interview questions and answers

Q. Where is the Setting files placed in drupal?

A. Setting file is placed at sites/default/settings.php. Here you can define databse credentials and other basic settings.

Q. What is Cron?

A. It is basically a action to be triggered periodically. In Drupal you can run cron by going to admin/config/system/cron.

Q. How do I access the Drupal admin panel, when the login block is disabled?

A. This is really a common question among Drupal beginners; we need not always want the login block to be displayed in our site. Since most of these cases the login block will be turned off in the administration.

In those cases, we can access the login screen simply through the following URL.
http://sitename.com/?q=user

or if the clean URL is enabled
http://sitename.com/user

Similarly if you can’t access the logout link and need to logout, you can do so by using the URL
http://sitename.com/?q=logout

alternatively with clean URLs enabled you can try
http://sitename.com/logout

Q. What is the difference between Core and Contrib?

A. The standard release of Drupal, known as Drupal core, contains basic features common to content management systems. These include user account registration and maintenance, menu management, RSS-feeds, page layout customization, and system administration.
The Drupal core installation can be used as a brochureware website, a single- or multi-user blog, an Internet forum, or a community website providing for user-generated content.
As of August 2011 there are more than 11,000 free community-contributed addons, known as contrib modules, available to alter and extend Drupal’s core capabilities and add new features or customize Drupal’s behavior and appearance. Because of this plug-in extensibility and modular design, Drupal is sometimes described as a content management framework.
Drupal is also described as a web application framework, as it meets the generally accepted feature requirements for such frameworks.

Q. How does caching work in Drupal?

A. One of the common (mostly unfounded) complaints about Drupal has been, “Drupal is slow.” You want to hire a developer who understands Drupal’s built in caching system, and what its limitations are. For example, Drupal 6’s block cache will not appreciably speed up the page if the user is logged in.
Ask your candidate to recommend some additional solutions to speed up Drupal’s caching.
These could include the Boost module, Varnish, Squid, Memcache or Pressflow. Ask if they’ve ever run into issues with Drupal’s cache.

Q. Why do you think Drupal is powerful & popular CMS compare to others?

A. Drupal Allows to create multiple content types using content construction kit (cck) without any programming skills.
Also allows customize theme template for each content type. For example you can have page, article , story, slideshow content type.

Like with all open-source projects there is no commercial support available for drupal developers. Though, there is vast online community for Drupal available via Forums so, you can get help from them always. Hope this drupal interview questions and answers helps drupal developers to be more efficient before interview.

One thought on “Drupal Interview Questions and Answers”

Leave a Reply

Your email address will not be published. Required fields are marked *