Drupal basics
Core concepts for Drupal developers.
Q1.What is Drupal and who uses it?
An open-source PHP CMS known for flexible content modelling, fine-grained permissions and multilingual support. It is popular with governments, universities, media and large organisations with complex content.
Q2.What is the relationship between Drupal and Symfony?
Since Drupal 8, Drupal uses Symfony components for routing, the service container, HTTP handling and events, plus Twig for templates. Knowing Symfony concepts makes modern Drupal much easier.
Q3.What are entities in Drupal?
The main data objects. Content entities like nodes, users, taxonomy terms and media are fieldable and stored in the database. Configuration entities like views, content types and image styles store site configuration.
Q4.What are bundles and fields?
A bundle is a subtype of an entity, such as the Article and Page content types for nodes. Fields are reusable data properties like text, images or entity references that you attach to bundles.
Q5.What is the Views module?
A query builder in core that lets site builders create lists, tables, blocks, pages, feeds and REST outputs from entities with filters, sorting and contextual filters, without writing SQL.
Q6.What is the difference between a module, a theme and a profile?
Modules add functionality. Themes control presentation. Installation profiles and the newer recipes bundle modules and configuration to set up a site for a purpose.
Q7.What are Drupal recipes and Drupal CMS?
Recipes are packages of modules and configuration you apply to a site to add a feature, such as a blog or events. Drupal CMS is a ready-made distribution built on core with recipes for faster site building.
Q8.What is Composer's role in Drupal?
Drupal core, contributed modules and their PHP dependencies are installed and updated with Composer, usually from the drupal/recommended-project template. Manual zip installs are no longer the normal workflow.
Q9.What is Drush?
A command-line tool for Drupal. Common commands are drush cr to rebuild caches, drush updb for database updates, drush cim and cex for configuration import and export, and drush uli for a login link.
Q10.What is configuration management?
Site configuration such as content types, fields and views is exported to YAML files, kept in Git and imported on other environments. Content stays in the database, so environments stay in sync without manual clicking.
Q11.What are the main user permission concepts?
Users get roles, and roles get permissions. Node access, field access and custom access checks on routes control what each role can see and do.
Q12.What are view modes and form modes?
View modes such as Full and Teaser let one entity display different fields in different contexts. Form modes do the same for edit forms, for example a short registration form and a full profile form.
Q13.What is the Layout Builder?
A core module that lets editors arrange blocks and fields visually for a content type's default layout or per individual item, without writing templates.
Q14.What are paragraphs in Drupal?
Paragraphs is a popular contributed module that lets editors build pages from structured components, such as a text block, a quote or an image gallery, each with its own fields.
Drupal development
Module, theming and API questions.
Q15.What files does a custom module need?
A folder in modules/custom with a MODULE.info.yml file. Optional files include MODULE.module for hooks, MODULE.routing.yml for routes, MODULE.services.yml for services, MODULE.permissions.yml and src folders for controllers, forms, plugins and event subscribers.
Q16.How do you create a custom page in Drupal?
Define a route in MODULE.routing.yml with a path, controller and access requirements, then create a controller class that returns a render array.
Q17.What is a render array?
A structured PHP array that describes output with keys like #type, #theme, #markup and #cache. Drupal turns it into HTML late in the request, so other code can alter it and caching metadata can bubble up.
Q18.What are hooks and how have they changed?
Hooks let modules react to or alter Drupal behaviour, such as hook_form_alter or hook_entity_presave. Traditionally they were functions in the .module file. Recent Drupal versions support object-oriented hooks with a #[Hook] attribute on class methods.
Q19.What are services and dependency injection in Drupal?
Services are reusable objects defined in services.yml and managed by the Symfony container, such as the entity type manager or the current user. Inject them into your classes through constructors or create() methods rather than calling \Drupal::service() everywhere.
Q20.What are plugins in Drupal?
Swappable classes discovered by attributes or annotations, such as blocks, field formatters, field widgets and Views filters. You create a custom block by writing a block plugin class.
Q21.What are event subscribers?
Classes that listen to Symfony or Drupal events, such as kernel request or response events, registered as tagged services. They are used for redirects, headers and reacting to system events.
Q22.How does the Form API work?
You create a class extending FormBase or ConfigFormBase with buildForm, validateForm and submitForm. Drupal handles rendering, CSRF tokens, validation errors and AJAX callbacks.
Q23.How does theming work in Drupal?
Themes use Twig templates, a THEME.info.yml file and libraries defined in THEME.libraries.yml for CSS and JS. Theme suggestions let you override templates for specific content types or view modes, and preprocess functions prepare variables.
Q24.What is Single Directory Components?
SDC groups a component's Twig template, CSS, JavaScript and metadata in one folder, which makes theme components reusable and easy to maintain.
Q25.How does Drupal's caching work?
Render arrays carry cache tags, contexts and max-age. Tags invalidate cached items when content changes, contexts vary caches by things like user role or language, and Internal Page Cache plus Dynamic Page Cache serve anonymous and authenticated pages fast.
Q26.How do you expose Drupal content to a decoupled frontend?
Enable JSON:API in core, which exposes entities automatically following the JSON:API spec, or use RESTful Web Services or the GraphQL contributed module.
Q27.How do you run updates on a Drupal site?
Update code with Composer, run drush updb for database updates, drush cim for configuration, then drush cr, ideally in a CI pipeline and tested on staging first.
Q28.What is the Migrate API?
A framework for importing content from older Drupal versions, other CMSs, CSV or databases, using source, process and destination plugins defined in YAML. It is used for Drupal 7 upgrades and platform migrations.
Q29.How do you write automated tests in Drupal?
Drupal uses PHPUnit with unit, kernel, functional and functional JavaScript test types. Kernel tests boot a minimal Drupal with chosen modules and are a good balance of speed and coverage.
Q30.How do you query entities in code?
Use the entity type manager to get storage, then entityQuery with conditions, sorts and range, and load the results. Set accessCheck explicitly, which is required in current versions.
Joomla
Questions for Joomla development and maintenance roles.
Q31.What is Joomla?
An open-source PHP CMS with built-in multilingual support, user groups and access levels, and a large extension ecosystem. It sits between WordPress and Drupal in complexity.
Q32.What are the types of Joomla extensions?
Components are the main applications of a page, such as articles or contacts. Modules are smaller blocks placed in template positions. Plugins respond to events. Templates control design, and languages provide translations. Packages bundle several extensions.
Q33.How is a Joomla component structured?
It follows MVC with namespaced classes: controllers handle requests, models handle data, and views with layout files render output, with separate administrator and site parts and a manifest XML file for installation.
Q34.What are template overrides in Joomla?
Copies of a component or module layout placed in the template's html folder, so you can change markup without editing the extension. Overrides survive extension updates, though you should review them after major updates.
Q35.What is the difference between access levels and user groups?
User groups organise users and define what they can do through permissions. Access levels define which groups can view content, menus and modules.
Q36.What are Joomla custom fields?
Fields you add to articles, users, contacts and categories from the admin, such as text, media or lists, without coding. They can be shown automatically or placed in overrides.
Q37.How do Joomla plugins work?
They subscribe to events such as onContentPrepare or onUserLogin. Modern plugins use service providers and event subscribers with namespaced classes.
Q38.How do you secure and maintain a Joomla site?
Keep core and extensions updated, remove unused extensions, use two-factor authentication, configure file permissions, use HTTPS and take regular backups with a tool such as Akeeba Backup. Check the Joomla vulnerable extensions list.
Q39.What is the Joomla Web Services API?
A built-in REST API that exposes content, users and other data in JSON:API format, authenticated with API tokens, which allows headless setups and integrations.
Q40.What is the difference between site and administrator in Joomla?
Joomla has two applications: the site front end visitors use and the administrator back end for managing content and extensions. Components usually have code for both.
Q41.How do you create a Joomla template?
Create a folder with templateDetails.xml, index.php that defines module positions and loads components, CSS and JS through the Web Asset Manager, and an html folder for overrides. Child templates let you customise without editing the parent.
Comparison and scenarios
Questions that test judgement across CMS platforms.
Q42.How do Drupal, Joomla and WordPress compare?
WordPress is the easiest to use with the largest ecosystem, ideal for marketing sites and blogs. Drupal is the most flexible for complex structured content, workflows and permissions at scale. Joomla offers strong built-in multilingual and access features with moderate complexity.
Q43.A client's Drupal 7 site needs an upgrade. How do you plan it?
Drupal 7 is end of life, so it is a migration, not an update. Audit content types, modules and custom code, find modern equivalents, build the new site on current Drupal, migrate content with the Migrate API, rebuild the theme and map URLs with redirects.
Q44.A Drupal page shows stale content for logged-in users. What do you check?
Missing cache tags or contexts on custom render arrays, a custom block with a max-age set incorrectly, reverse proxy or CDN rules caching authenticated pages and lazy builders that should be used for personalised parts.
Q45.How would you build an editorial workflow with approvals in Drupal?
Use the Content Moderation and Workflows modules in core with states like draft, review and published, assign transitions to roles and add notifications with a contributed module or custom event subscriber.
Q46.A Joomla site was defaced. What are your steps?
Take it offline, keep a copy for analysis, change all passwords, update core and extensions, compare files against clean versions, remove unknown admin users and injected files, then find and fix the vulnerable extension.
Q47.How do you deploy Drupal across dev, staging and production?
Keep code and exported configuration in Git, build with Composer in CI, deploy the code, run drush deploy, which covers database updates and config import, and never copy the production database upward without sanitising personal data.
Q48.How would you make a multilingual Drupal site?
Enable the Language, Content Translation, Configuration Translation and Interface Translation modules, choose which entity types and fields are translatable, set the language detection method and add hreflang tags for SEO.
Q49.How do you improve performance on a Drupal site?
Enable page and dynamic caching, aggregate CSS and JS, use a reverse proxy like Varnish or a CDN with cache tag purging, add Redis for cache bins, optimise Views queries and use image styles with modern formats.
Q50.Which CMS would you recommend for a university website with many departments?
Usually Drupal, for granular roles per department, structured content types, multilingual support and workflows. WordPress multisite can work for simpler needs. The deciding factors are content complexity, governance and in-house skills.
How to prepare for the interview
- For Drupal, be comfortable with Composer, Drush and configuration management; these come up in every senior interview.
- Know Symfony basics such as services, routing and events, since modern Drupal is built on them.
- Have one custom module you wrote that you can walk through.
- For Joomla, know the MVC structure of a component and how template overrides work.