Iteanz Interview Questions | Latest Technologies Interview Questions

Drupal Interview Questions and Answers

Written by Rupa.R | Sep 10, 2022 9:26:24 AM

Q1. What is a sub theme in Drupal?

Ans: Sub-themes are just like any other theme, with one difference: They inherit the parent theme's resources. There are no limits on the chaining capabilities connecting sub-themes to their parents. A sub-theme can be a child of another sub-theme, and it can be branched and organized however you see fit. This is what gives sub-themes great potential.

Q2. What is entity api module ?

Ans: 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.

Q3. What Are The Applications Of Drupal?

Ans: Here are some typical Drupal usages:

  • Content Management: Using a simple, browser-based interface, members can publish stories, blogs, polls, images, forums, etc. Administrators can easily customize the design of their Drupal installation.
  • Hierarchical ordering: The Drupal classification system allows hierarchical ordering, cross-indexing of posts and multiple category sets for most content types. Access to content is controlled through administrator-defined user roles. A search option is also available.
  • Weblog: A single installation can be configured as an individual personal weblog site or multiple individual weblogs. Drupal supports the Blogger API, provides RSS feeds for each individual blog and can be set to ping weblog directories when new content is posted on the home page.
  • Discussion-based community: A Drupal web site can be successfully used as a discussion forum. Comment boards, attached to most content types, make it simple for members to discuss new posts. Administrators can control whether content and comments are posted without approval, with administrator approval or through community moderation. Collaboration - Used for managing the construction of Drupal, the project module is suitable for supporting other open source software projects. The collaborative book module includes versions control, making it simple for a group to create, revise and maintain documentation or any type of text.

Q4. What Is Comment Moderation In Drupal?

Ans: 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.

Q5. What hardware does Drupal.org run on?

Ans: People often wonder what kind of hardware drupal.org runs on. Throughout the project history this has been a tough question. For a while it was a server in a random office building. That server eventually died and required a fund-raising effort to replace (the funds were raised in 24 hours!).
The critical infrastructure is all configured to share the load and be redundant. For example, db1 and db2 are configured to be master-slave most of the time to provide for better performance and allow the slave to be promoted to master if the master fails.

Q6. What Are Hooks In Drupal?

Ans: Hooks in Drupal allows modules 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 and “bar” is the name of the hook. Each hook has a defined set of parameters and a specified result type. To extend Drupal, a module need simply implement a hook. When Drupal wishes to allow intervention from modules, it determines which modules implement a hook and calls that hook in all enabled modules that implement it.

Q7. Why does Drupal need a database? What databases are supported?

Ans: Drupal stores its information - the individual pages, the registered users, and so on - in the database. The database forms the back-end for your Drupal site. At this time, Drupal supports MySQL (or an equivalent such as MariaDB), PostgreSQL, and in Drupal 7, SQLite.

Q8. How To Enable Clean Urls In Drupal?

Ans: The standard Drupal installation contains a sample .htaccess file which supports clean URLs. It is easy to miss copying this file, because of the leading “dot”. So before trying to enable Clean URLs, make sure this file exists in your Drupal installation.

Q9.  Explain Drupal Architecture.

Ans: Drupal is based on less publicized but still widely used architecture Presentation Abstraction Control, or PAC. The menu system acts as the Controller. It accepts input via a single source (HTTP GET and POST), routes requests to the appropriate helper functions, pulls data out of the Abstraction (nodes and, from Drupal 5 onwards, forms), and then pushes it through a filter to get a Presentation of it (the theme system). It even has multiple, parallel PAC agents in the form of blocks that push data out to a common canvas (page.tpl.php).

Q10. How to install and configure drupal 8?

Ans:
 
  1. Delete the contents of the "$drupal_home$" folder.
  2. DOWNLOAD  "drupal-8.0-alpha2.zip"   (or newer)  from  Releases for Drupal Core, and unzip the contents to the "$drupal_home$" folder.
  3. Within a browser   (suggest Firefox), enter the address:
    http://localweb1
  4. The Drupal setup screen should appear.Choose the language, then "Save and continue".
  5. Choose "Standard" or "Minimal", then Save and continue".
  6. Enter "Database name" as "web1_data"; Enter the user name and password as $db_uid1$ and $db_upw1$ respectively ... and continue.
  7. "Site name" will be "localweb1" Enter a valid   (but throwaway)  "Site e-mail address". Enter Username: "admin"
    Enter a valid   (but throwaway)  "E-mail address". Enter a password for "admin" and confirm it and enter the rest of the fields. then "Save and continue".
  8. Upon page response, "Congratulations, you installed Drupal" Click on: "Visit your new site."
  9. Upon page "Welcome to localweb1" Click on: "Add new content" ... add your 1 st  page ... then view your 1 st  page.

 

 

Q11. What Is A Web Content Management System?

Ans: A Web content management system is content management system software, implemented as a Web application, for creating and managing HTML content. It is used to manage and control a large dynamic collection of Web material. A WCMS facilitates content creation, content control, editing, and essential Web maintenance functions. The software provides authoring tools designed to allow users with little knowledge of programming languages or markup languages to create and manage content with relative ease. Most systems use a database to store content, metadata, or artifacts that might be needed by the system. Content is frequently, but not universally, stored as XML, to facilitate reuse and enable flexible presentation options.

Most systems use server side caching boosting performance. This works best when the WCMS is not changed often but visits happen on a regular basis. Administration is typically done through browser-based interfaces, but some systems require the use of a fat client.

Q12. What are Drupal Distributions and Drupal installation profiles?

Ans:

  • Installation profiles are what a developer creates as the basis of distributions. They define installation steps (such as enabling modules, defining content types, etc.) that run after Drupal's base installation when you first install Drupal. One or more standard installation profiles are included in the Drupal Core download; developers can create custom profiles that set up Drupal for specific purposes, and optionally release them for community use on Drupal.org. It is not always easy to attempt to use an installation profile directly, if it requires non-core modules, themes, or libraries -- you would have to locate and download all the required components yourself before you could install Drupal. Instead, it's a lot easier to download a full distribution (if available).
  • Distributions are full copies of Drupal that include Drupal Core, along with additional software such as themes, modules, libraries, and installation profiles. The automatic packaging scripts on Drupal.org turn installation profiles into distributions, by gathering all the modules, themes, and libraries they require into a single zip archive, so that all you need to do is download the full archive and run the install script.

Q13. What is drupal weight?

Ans: 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.

Q14. What is teaser in drupal?

Ans: 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.

Q15. What is render array in drupal?

Ans: Render arrays are the basic building blocks of Drupal content. In Drupal 7, render arrays provide a structured way to programmatically alter content before it is displayed. Further details can be read on the Render Arrays documentation page.

Q16. Why you shouldn't modify core drupal files?

Ans: 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.

Q17. How do you convert PSD to drupal theme?

Ans: PSD files are the raw photoshop files used to generate the graphics in a theme. You need to convert the PSD to regular html/css theme, then you have to follow the steps for creating a drupal theme.Know more about file system in drupal theme.

Q18. What is an argument in drupal?

Ans: A section of the path for a page on a Drupal website. In the path /node/937 the first argument is “node”, and the second is “937”. Some modules, most notably Views, allow the use of “wildcard” arguments that allow a particular page to vary depending on context.

Q19. What is drupal trigger?

Ans: Defined by modules, triggers typically result from some characteristic change in an entity maintained by a module. Some examples of triggers are: deleting content, adding a comment that a user has logged in, or adding a term. In addition to the triggers provided by the Drupal core modules, triggers may be added by installed contributed modules.

Q20. What is cron in drupal?

Ans: A command scheduler that executes commands or scripts (e.g. scripts to backup a database) automatically at specified time and date intervals. Drupal uses a “cron job” to perform periodic tasks that help Drupal to run smoothly and efficiently.

Q21. What is drupal 8?

Ans: The Most Customizable, Adaptable Drupal Release Ever, Drupal 8 will set a new standard for ease of use, while offering countless new ways to tailor and deploy your content to the Web. Easily customize data structures, listings, and pages, and take advantage of new capabilities for displaying data on mobile devices, building APIs, and adapting to multilingual needs.

Important Points:

  • Mobile in its DNA
  1. New Configuration Management
  2. Multilingual Capabilities
  3. Built-in Web Services
  4. Effortless Authoring
  5. Fun and Fast Theming
  6. Views, Out of the Box
  7. Field Power
  8. Better Markup with HTML 5
  9. Industry Standard Approach          

Q22. What are breadcrumbs?

Ans: The set of links, usually near the top of the page, that shows the path you followed to locate the current page. For example, it might show Home > Drupal > Current Events > News Articles, meaning that you started at the home page, clicked on “Drupal” in the menu, then selected “Current Events” in the sub-menu, and finally selected, “News Articles.” The term breadcrumbs is borrowed from Hansel and Gretel, who left crumbs of bread along their path so they could find their way back out of the forest.

Q23. What is drupal cache?

Ans: The core Drupal cache stores assembled pages and blocks for anonymous visitors in the cache tables in the database. Other popular Drupal caching options include boost,memcache, and authcache.

Q24. What is permission in drupal?

Ans: In Drupal, a tool for controlling access to content creation, modification and site administration at the application level. Administrators assign permissions to roles, then assign roles to users. The first user of a Drupal site (User1) automatically receives all permissions. In operating systems like UNIX, permissions are security settings restricting or allowing users to access information or perform certain functions at the operating system level. In the case of files on UNIX systems, there are three types of permissions: read, write and execute

Q25. Compare Drupal To Commercial Cms System?

Ans: Drupal is often compared to a number of commercial content management systems including Crown Peak, ExpressionEngine, Clickability and Site Life in terms of capabilities. None of these systems offer the range of features that can be found in Drupal or the flexible, developer-friendly architecture that allows us to rapidly deploy dynamic web sites. In terms of sustainability, these platforms lack the innovative approach to development, with updates and new features continually being added to the platform. These systems typically do surpass Drupal in terms of out-of-the-box reporting and metrics tools, generally providing views of data that is also stored in other systems.

Q26.  Explain hardcoding in drupal?

Ans: The temptation to hardcode happens to the best of us - that's why even the best of us are at risk of being burned by it.
Hardcoding defined
Hardcoding is the practice of making code tailored to handle very specific cases. Here are some examples of hardcoding as applies to Drupal:

Inserting an SQL query into a .tpl file
Writing a script that queries the database to make some changes to nodes
Using a regular expression on the output of a theming function to change one HTML class into another

The above examples might work some or even all of the time. However, like hacking core, efficacy alone is not sufficient to make them compatible with the "Drupal Way". Even when hardcoding works - and it often doesn't work as expected - it comes at the cost of that code's ability to handle a more general set of situations.

Q27. Explain drupal administration.

Ans: The purpose is to:

Check your site's status.
Configure your site information.
User management.
Add additional functionality.
Customizing the site appearance.
Posting content.

Q28. What do version numbers in drupal mean?

Ans: Drupal release versions

Starting with Drupal 5.0, the "5" indicates the major version of Drupal, and the .0 is the minor version i.e. the bug-fix release or patch level. That means that 5.0, 5.1, 5.2 and so on all have the same underlying structure. Collectively, these versions are often referred to as "5.x". Modules for 5.x are generally all compatible with each other and with any Drupal 5.x version of core. However, modules written for Drupal 6.x or 7.x will not work with 5.x and vice-versa.
The newest version in each series fixes problems that were discovered since the previous version, and these fixes sometimes include critical security updates. This newest version will also include all the problem fixes since the first version of this series.

Q29. Why does Drupal need a database? What databases are supported?

Ans: Drupal stores its information - the individual pages, the registered users, and so on - in the database. The database forms the back-end for your Drupal site. At this time, Drupal supports MySQL (or an equivalent such as MariaDB), PostgreSQL, and in Drupal 7, SQLite.

Q30. What Does Drupal Do?

Ans: Drupal is the choice for many great web sites because it does a lot of different things very well, and allows different kinds of information to interact effectively through its flexible, open architecture. Drupal's feature set is far more economic and practical for most organization.