Drupal Interview Questions And Answers – 2

A list of top frequently asked Drupal interview questions and answers Part-2 are given below. Drupal jobs interview questions and answers page designed by our professionals help you to overcome interview fear and to successfully clear it.

51. What is the use of Dashboard menu?
It displays the list of articles or pages which are created. It is a first screen that will get displayed when you log into administration area.

52. What is the use of Content menu?
In this menu you can create, manage and find new pages. Here, the table gets displayed with the detail of the article i.e. status, title, updated, author and operation (Edit and delete).

53. What is the use of Structure Menu?
Structure includes the blocks, manage content types, add new menu links to the site and manage administrative tagging of content.

54. What is the use of Appearance menu?
In this menu, the lists of themes are displayed. User can install the theme, update the existing theme or switch the themes.

55. What is the use of People Menu?
In people menu, you can create a new user account or mange the existing user.

56. What is user management?
User Management manages the information of the user, which allows creating or deleting the user, changing passwords, time and roles.

57. What is Anonymous user?
It allows user to access your website without asking them for the username or password.

58. What is authenticated user?
It allows only those users to access your website, who are authenticated to use it.

59. How to remove breadcrumbs from my Drupal pages?
Breadcrumbs or breadcrumb trail is a navigation aid used in drupal interfaces. Normally it appears in between the top banner area and the page title. It gives users a way to keep track of their location within programs. Breadcrumbs are really useful in a comparatively bigger website with plenty of sections and subsections. But when it comes to smaller websites, it may found useless. In those cases you may either hide it using CSS (eg. .breadcrumb {display: none;}) or in the page.tpl.php file remove the line that says

60. How to add custom PHP codes in my Drupal pages or blocks?
By default, drupal will not allow inserting PHP code directly inside a post or in a block. To do this, you need to activate a drupal module called PHP filter via, Administer Site building Modules. Even though this module ships with drupal, it remains disabled by default.

61. How do I get my site to have SEO-friendly URLs?
The Pathauto module automatically generates URL/path aliases for various kinds of content (nodes, taxonomy terms, users) without requiring the user to manually specify the path alias. This allows you to have URL aliases like /category/my-node-title instead of /node/123. The aliases are based upon a “pattern” system that uses tokens which the administrator can change.

62. How can I enable clean URLs in Drupal?
Drupal’s default URL structure is like “http://www.sitename.com/?q=node/10? This URL format can be hard to read, and can sometimes prevent search engines from indexing all your pages properly. In this case you can eliminate this “?q=” and clean the URLs through the following: Navigate to Administer Site configuration Clean URLs. By default, it will be disabled. Select enabled and click the save configuration button.
You can make your URLs cleaner with the help of path module: Home Administer Site building Modules: enable the Path Module.

63. What is the option makes Drupal emit “clean” URLs? (i.e. without ?q= in the URL)
Choose the enabled option under clean URLs
Go To Administer->Site configuration->Clean URLs.

64. What is the use of twitter suffix option in advanced tab in druapl social networking?
Twitter Suffix will optionally append a Twitter handle, or text, so that you get pinged when someone shares an article.

64. Explain User, Permission, Role In Drupal?
Every visitor to your site, whether they have an account and log in or visit the site anonymously, is considered a user to Drupal. Each user has a numeric user ID, and non-anonymous users also have a user name and an email address. Other information can also be associated with users by modules; for instance, if you use the core Profile module, you can define user profile fields to be associated with each user.
Anonymous users have a user ID of zero (0). The user with user ID one (1), which is the user account you create when you install Drupal, is special: that user has permission to do absolutely everything on the site.
Other users on your site can be assigned permissions via roles. To do this, you first need to create a role, which you might call “Content editor” or “Member”. Next, you will assign permissions to that role, to tell Drupal what that role can and can’t do on the site. Finally, you will grant certain users on your site your new role, which will mean that when those users are logged in, Drupal will let them do the actions you gave that role permission to do.
You can also assign permissions for the special built-in roles of “anonymous user” and “authenticated user”. Drupal permissions are quite flexible — you are allowed to assign permission for any task to any role, depending on the needs of your site.

65. When can a Drupal user not edit a node they created?
Symptoms: An authorized Drupal user loses “edit” access to nodes they’ve created, even if they have appropriate node (or other module) access permissions. Or, user cannot edit a node that should be editable by them, based on access control or node access settings. No errors or warnings are presented to the user. Nothing in the Drupal watchdog log.
Possible Cause: The user does not have permission to use the input filter currently assigned to the node. (An administrator or other privileged user may have changed the input filter settings, or, input filter permissions may have been changed to exclude the node author since the node was created. As a result, the user never had, or no longer has permission to use the input filter associated with the node.)

67. What is the difference between Drupal and Ruby on Rails?
Drupal is a Content Management System, it is a huge pile of code that give you a full working website directly after install. It already handles users, articles, permissions, uploading data so that you can start a small website even if you don’t know a word of code. However, if you want to change it, you will have to learn about the internals of the beast, and develop your own plug-ins to alter its behavior.
Ruby on Rails is a framework, it’s more like an empty shell to fill with the logic you need. It is a set of useful classes and functions so that you don’t waste time on low-value tasks when developping a website. At first, a RoR application does nothing, but you can start developping features very quickly, and you can do basically anything you want. It is infinitely much more flexible than Drupal but you have have to do everything yourself.

68. What is database abstraction layer in Drupal?
Drupal provides a 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, but also allow developers a way to leverage more complex functionality in a unified way. It also provides a structured interface for dynamically constructing queries when appropriate, and enforcing security checks and similar good practices. The system is built atop PHP’s PDO (PHP Data Objects) database API and inherits much of its syntax and semantics.

69. Explain the path system of Drupal?
When you visit a URL within your Drupal site, the part of the URL after your base site address is known as the path. When you visit a path in your Drupal site, Drupal figures out what information should be sent to your browser, via one or more database queries. Generally, Drupal allows each module you have enabled on your site to define paths that the module will be responsible for, and when you choose to visit a particular path, Drupal asks the module what should be displayed on the page.
For instance, this site (drupal.org) is (of course) built with Drupal. The page you are now viewing is http://drupal.org/node/19828, whose path is “node/19828?. The module that is responsible for this path is the core Node module, so when you visit this page, Drupal lets the Node module determine what to display.
To determine the path to a particular page on your site, for purposes of creating a link, go to the page you want to link to and look at the URL in the address bar. By default the URL, after the base address of your site, will begin with ‘?q=’. When ‘Clean URLs’ are enabled you will see a directory structure in the URL. The “path” for use in a menu item is the part of the URL after the site’s base address and without the “?q=”.

70. Explain Modules in Drupal?
A module is a software (code) that extends Drupal functionality. Modules fall into one of three categories: –
Core modules are those included with the main download of Drupal. These can be turned on or off without downloading additional components. Contributed modules are downloaded from the Modules download section of drupal.org, and installed within your Drupal installation.
Custom modules are modules you write yourself. This requires a thorough understanding of Drupal, PHP programming, and Drupal’s API.

71. What are some most commonly used PHP based CMS?
Following are some most commonly used PHP based CMS:
• Drupal
• Joomla
• WordPress

72. Why is Ctools used in Drupal?
Ctools is a set of APIs and tools which is used to improve the developer experience.

73. What are patches in Drupal?
Patches are the files that contain a list of differences between one set of files, and another. You can make changes like addition, deletion in codes through patches. Patches can also be used to make changes to another copy of the original or main file.

74. What is Drupal cron?
The term weight in Drupal is used to order nodes. Nodes with lower weight will be at top of the list while nodes with heavier weight will be at lower position.

75. Why is the ‘search’ function in Drupal is better than other CMS?
Drupal integrates well with external search engines such as Xapian, Apache solr if the built-in search engine does not meet your needs properly.

76. Why you shouldn’t modify core drupalfiles ?
No matter how easy it is to modify core files to make Drupal do what you want it to do, resist the temptation.
• Doing so will make it complicated, difficult or near impossible to apply site updates such as Security and bug fixes.
• You will make it difficult for those that come after to maintain the site.
• You could possibly leave your site vulnerable to exploits.
The Drupal core has been designed to be modular, so there should be no reason to hack it. If there is a feature you want and it cannot be accomplished outside of modifying core, consider submitting your hack as a patch. Create an issue and tell the community the feature you want to accomplish. It will then be tested and your feature may become a part of the Drupal core.

77. How can you drop a table using module in Drupal?
To drop a table you can use db_drop_table in install file.

78. What is Drupal distributions and when to use it?
Distributions are full copies of Drupal including Drupal core along with additional software such as modules, libraries and installation profiles.
Distributions are used for:
o Demoing Drupal
o Evaluating Drupal
o Quickly binding Site
o Learning Drupal

79. Name the translations available in Drupal?
Languages in which Drupal can be translated are:
o Catalan
o Dutch
o French
o Hungarian

80. What is teaser in Drupal?
A short introductory sentence or paragraph about a piece of content that informs readers about the subject of the content. By default, the first paragraph or two of the content is used (there is a setting for how much), usually with a link to the complete node.

81. What is drupal weight?
A term used by Drupal to define the priority or order in which a function is processed or a block / node is displayed. From Drupal 6, the weight field is adjusted dynamically using a drag-and-drop interface. Note: A lower weight value (-10) will float to the top of lists, while heavier (+10) weights will appear lower in lists

82. What Is Comment Moderation In Drupal?
Drupal core contains settings that allow you to moderate comments. Drupal’s user access controls allow you to specify whether or not users must already have an account before they can post comments to the site. You can also specify whether a user (logged in or anonymous) may leave a comment without approval. Comment moderation is made simpler via the contributed module called Notify. Notify will send an email to the administrator whenever someone leaves a comment on their site.

83. Explain the API in Drupal 7?
The field API allows custom data fields to be attached to Drupal entities. Any entity type can use field API to make itself “fieldable” means allows fields to attach to it.
The Field API allows custom data fields to be attached to Drupal entities and takes care of storing, loading, editing, and rendering field data. Any entity type (node, user, etc.) can use the Field API to make itself “fieldable” and thus allow fields to be attached to it. Other modules can provide a user interface for managing custom fields via a web browser as well as a wide and flexible variety of data type, form element, and display format capabilities.
The Field API defines two primary data structures, Field and Instance, and the concept of a Bundle. A Field defines a particular type of data that can be attached to entities. A Field Instance is a Field attached to a single Bundle. A Bundle is a set of fields that are treated as a group by the Field Attach API and is related to a single fieldable entity type.
For example, suppose a site administrator wants Article nodes to have a subtitle and photo. Using the Field API or Field UI module, the administrator creates a field named ‘subtitle’ of type ‘text’ and a field named ‘photo’ of type ‘image’. The administrator (again, via a UI) creates two Field Instances, one attaching the field ‘subtitle’ to the ‘node’ bundle ‘article’ and one attaching the field ‘photo’ to the ‘node’ bundle ‘article’. When the node system uses the Field Attach API to load all fields for an Article node, it passes the node’s entity type (which is ‘node’) and content type (which is ‘article’) as the node’s bundle. field_attach_load() then loads the ‘subtitle’ and ‘photo’ fields because they are both attached to the ‘node’ bundle ‘article’.
Field definitions are represented as an array of key/value pairs.

84. How to create a custom profile in Drupal 7?
In Drupal 7, custom user profiles are like fieldable entities similar to nodes. To create a new custom user profile, follow these steps:
• First, go the Administration
• Then, go to the Configuration tab
• Next, click on People
• Go to Account settings and add a new field
• Configure the corresponding display to each user page on the Account Settings (ie. /user/$uid).

85. What is entity api module?
The entity api module extends the entity API of Drupal core in order to provide a unified way to deal with entities and their properties. Additionally, it provides an entity CRUD controller, which helps simplifying the creation of new entity types.

86. What are available SEO modules in Drupal?
There are various SEO modules available in Drupal :
• Pathauto
• Meta tags/ Node words
• Service Links
• Google Analytics
• Related Links
• Search 404
• Site map
• Url list

87. What are the five conceptual layers in Drupal system?
1. Data (nodes, etc.). Before anything can be displayed on the site, it must be input as data.
2. Modules. Modules are functional plugins that are either part of the Drupal core or are contributed modules that build on Drupal’s core functionality.
3. Blocks and menus. Blocks can be used to present anything, so just about any piece of content on a Drupal site (other than main content, breadcrumbs, and primary/secondary menus) is usually a block. Blocks are an extensible core feature of Drupal with a simple API provided by the block module. Blocks are similar to “widgets” in content management systems, but are highly generalized. Menus are a collection of links (menu items) used to navigate a website. The Menu module provides an interface to control and customize the menu system that comes with Drupal. By default, new menu items are placed inside a built-in menu labeled Navigation, but administrators can also create custom menus.
4. User permissions. User permissions are defined for various roles and users are assigned to these roles in order to grant them the defined permissions.
5. Themes and templates. The top conceptual layer of the drupal architecture is the theme. This consists primarily of XHTML and CSS, with some PHP variables intermixed, so Drupal-generated content can go in the appropriate spots. Also included with each theme is a set of functions that can be used to override standard functions in the modules in order to provide complete control over how the modules generate their markup at output time. A theme may contain one or more templates, depending on the complexity of the site and the way it has been designed.

88. What are Drupal blocks?
Blocks are container objects that are used to organize your content of your website.

89. What is the use of the field set the width of each sidebar in the layout and general settings?
It is used to set width of first sidebar and second sidebar and unit in % or px or em.

90. What is the use of Media query for this layout field in the layout and general settings?
Media query defines different style rules for different media devices and by default for this layout will be 1025px.

91. What is the maximum and minimum width for media query for Landscape tablet in tablet layout?
Media query for Landscape tablet will be min-width: 769px and max-width: 1024px.

92. What is the use of URL path settings option while creating basic page?
Here you can specify alternative URL by which content can be accessed. Don’t add slash at the end or beginning of the URL alias or else it will not work.

93. Can you explain the Function and Working of Dashboard Module ?
The Dashboard module provides a Dashboard page in the administration menu. The intention of the Dashboard page is to give administrators a quick overview of important information on the website.

94. What is entity and entity API?
They provide a unified way to work with different data units in Drupal. Drupal 7 is all about entities. They are everywhere: nodes, users, taxonomy terms, vocabularies etc.
But how, as developers, can we create our own entities? When do we really need to do that? I think these questions are really very project-specific. We can probably use nodes for nearly everything. But when it comes to performance-sensitive projects, nodes should really only be used for content, and we should separate as much as possible from nodes. Why? Nodes are revisioned, they fire a lot of hooks, and they have functionality that we likely won’t need. Also if we know exactly what fields we should have in our entities, we can create our own custom entities to avoid all those joins of Field API tables.

95. How to use the contextual filter?
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.

96. What is subtheme?
A Drupal subtheme (or sub-theme) is a theme that is based on a “base theme”. The base theme provides basic (and sometimes more than basic) functionality. The subtheme styles the site with a unique look, and adds any unique extra functionality.

97. What is responsive theme?
A responsive theme (as the one used for this website), is an approach to web development that allows a website to break itself down smoothly across multiple monitor sizes, screen resolutions, and platforms, be it a computer, tablet or mobile device. It allows the developer to create a site that is optimized for each platform, both in navigation, readability and load time.
As you can see when resizing the window (if you are viewing this site on a computer), the layout of the page shifts depending on the size of the screen; with different layouts for content depending on viewing area. Themes (or layouts) such as this, allow for a single site and single look to the site, to be viewed on various devices without the need for additional themes or resizing by the user.

98. When do I need a contextual filter vs. a relationship?
A relationship is a join. Just think of it terms of SQL: – a ‘relationship’ is a JOIN on another table – a ‘filter’ (contextual or not) is a WHERE clause.
Contextual just means the parameter comes from the current context, e.g. part of the URL, something in the session,

99. How to interact with Drupal search system?
The search module lets users search for specific content on your site. You can search both for users and for particular words. When you are on the “content” tab of Search, you will be able to search for words appearing in the default rendering of node content on your site, which would include the default rendering of any CCK fields, Location fields, Taxonomy, etc., as well as comments. When you are on the “users” tab of Search, you will be able to search the user names of registered users on your site, and if you have sufficient permissions, also their email addresses.

100. What is a patch in Drupal and how will we apply patch in drupal?
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, standard way, which means that a program (also named patch) can be used to apply the changes to another copy of the original file.

Sign-up for our email newsletter and get free job alerts, current affairs and GK updates regularly.
Subscribe Here (or)

Leave a Reply

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

5 − = two

Popup Dialog Box Powered By : XYZScripts.com
  • RSS
  • Facebook
  • Google+
  • Twitter