Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough
May 01 2021
May 01

This month of April is celebrated as DrupalFest on Drupal completing its 20 years. With all the virtual events happening in the last month we have seen great blog posts from the Drupal community.

Here are 6 Drupal blog posts from April 2021 which you must read.

1. If I was to rebuild Drupal.org, what would I want it to look like?

Over the last few weeks, I have found myself thinking more and more about Drupal.org and the various websites and services that surround it, such as groups.drupal.org, events.drupal.org, git.drupal.org, api.drupal.org, jobs.drupal.org, Slack, drupalchat.me, drupical.com, drupal.tv, drupalcontributions.opensocial.site, and all the others that don’t immediately spring to mind!

Author: @rachel_norfolk

Read more: https://rachelnorfolk.me/2021/if-i-was-rebuild-drupalorg-what-would-i-want-it-look

2. How to Manage Multimedia in Drupal? Media Module

Author: @grzegorzbartman

Working with multimedia is one of the areas that large websites have to deal with. When multiple editors upload a large number of files, keeping your photos and videos in order can become difficult and time-consuming. Drupal has several proven recipes for managing the media library, which I'll present in this article.

Read more: https://www.droptica.com/blog/how-manage-multimedia-drupal-media-module

3. State of Drupal presentation (April 2021)

Last week, Drupalists around the world gathered virtually for DrupalCon North America 2021.

In good tradition, I delivered my State of Drupal keynote. You can watch the video of my keynote, download my slides (244 MB), or read the brief summary below.

I gave a Drupal 9 and Drupal 10 update, talked about going back to our site builder roots, and discussed the need to improve Drupal's contributor experience.

Author: @Dries

Read more: https://dri.es/state-of-drupal-presentation-april-2021

4. How to Organize Your Drupal Content With Taxonomies

Taxonomy is the process of classifying information. In Drupal, it’s also a powerful core module that allows you to assign labels to your content according to whichever patterns make the most sense for your site.

Let’s take a look at the different ways you can leverage taxonomies within a Drupal site and go over some best practices that’ll help you build your own system.

Author: @leighvryan

Read more: https://evolvingweb.ca/blog/how-organize-your-drupal-content-taxonomies

And now some Drupal 9 upgrade stories...

5. We upgraded to Drupal 9. Here’s how we did it

If you have a Drupal website you are no doubt aware that Drupal 7 & 8 will soon reach end-of-life. Part of your plan for the next 12 months needs to be getting your website migrated onto Drupal 9.

This might understandably feel a little daunting, but fear not, we can help! We have recently migrated our own website from Drupal 8 to Drupal 9, and while at times it was a little tricky, it wasn’t as big, scary, or painful as you might think. It of course helps when you have a skilful team of Drupal experts that researched, tested, de-bugged, and deployed this core versional upgrade. 

Ream more: https://www.equimedia.co.uk/resources/blog/we-upgraded-to-drupal-9

6. Our Drupal 9 Upgrade Story

The Drupal community is super excited for the Drupal 9 release, and so are we! 

In the spirit of our tradition of keeping the QED42 website up to date with the latest Drupal releases, we decided to celebrate the Drupal 9 release day by porting our website to Drupal 9. And we’d love to share our learnings with the Drupal community.

Author: @AshishVDalvi

Read more: https://www.qed42.com/blog/our-drupal-9-upgrade-story

Jun 23 2019
Jun 23

Starting a new Drupal 8 project? And the first thing you might do is to install a module, but which one first. There are a few obvious ones to install and sometimes these have no relation to the functionality of your project but they always help you in the background.

But why do we install them? It's simple, they make our life easy while we are implementing the universe of features into our Drupal website. But then you always miss some of those life-saving modules and only install them when you feel the pain.

Now here is my list of Drupal 8 modules that will make your life smooth and you should install them as soon as you see that welcome message on the home screen.

  1. Admin Toolbar
  2. Environment Indicator
  3. Config Split
  4. Module Filter
  5. Site Settings and Labels

1. Admin Toolbar

Project page: https://www.drupal.org/project/admin_toolbar

Availability: Drupal 8

Downloads: 133157+

Okay, this was obvious! It was always annoying to go through all those pages to reach the manage field of a content type. In Drupal 7, the Administration Menu module came to the rescue but in Drupal 8 it's Admin Toolbar that does the job perfectly.

Admin Toolbar module integrates with the core's toolbar module and provides a drop-down menu for easy access to the menu items in the Administration menu. Just install and forget about it.

2. Environment Indicator

Project page: https://www.drupal.org/project/environment_indicator

Video: https://www.youtube.com/watch?v=8WbP9ZYxAx0

Availability: Drupal 8 | Drupal 7

Downloads: 18314+

Remember the time when you accidentally change settings or updated content on the wrong environment, thinking you are in the local environment. For these situations, the Environment Indicator module comes to the rescue. This module simply adds colors to the Drupal admin toolbar to indicate which environment you are working on.

You can simply configure different colors for different environments to differentiate like Development (Green), Staging (Orange), and Production (Red). Just try it and you will see how often you leave the wrong environment tab open in your browser.

3. Configuration Split

Project page: https://www.drupal.org/project/config_split

Tutorial: https://www.daggerhart.com/drupal-8-configuration-management-with-config-split/

Availability: Drupal 8

Downloads: 18816+

Drupal 8 introduced configuration management in the core to allow the export of database configurations in YML files. But what if we don't want to keep everything the same in all environment, maybe you want some development modules on configurations different for the local environment.

For these situations, Configuration Split does the job for us. This module allows you to create groups of configurations that you want to separate from the rest of the configuration. 

4. Module Filter

Project Page: https://www.drupal.org/project/module_filter

Availability: Drupal 8 & Drupa 7

Downloads: 327,907+

One of the first things you do on a first install is to go to the modules listing page and enable or disable modules. But with time this list of modules becomes so big that you start searching for it in browser search. So the best solution is to use the Module Filter module to search for the required module with a search box on the module listing page.

Another feature of the Module Filter module is that it provides a horizontal view for the module list page where modules are categories with their package. This makes it easy to just simply click on the package tab to see what modules are available in it. This was the must-have module in Drupal 7 and this functionality was incorporated in Drupal 8 but adding this module also allows you to list your modules with category tabs and gives you a permissions filter on the permissions page.

5. Site Settings and Labels

Project Page: https://www.drupal.org/project/site_settings

Availability: Drupal 8

Downloads: 641

With Drupal 8 all settings start to save into configuration and we export configuration. But if you want to have a configuration that can be changed whenever needed without the fear of overriding it on the next config import.

"Site Settings and Labels" module is something you can use in your Drupal 8 project if you are in the same situation. This module allows you to set settings as content with the features and feel of the Drupal 8 configuration system. So remember this module as this could be your secret weapon on your next Drupal 8 project.

In the comment, let me know which one is your favorite or if I missed your go-to module for a fresh Drupal 8 installation.

Nov 14 2018
Nov 14

Whenever you edit '/etc/apache2/httpd.conf' file you need to restart apache on your mac. And you can make your life easy by using the terminal command to start, stop or restart the Apache server on Mac OX by simply executing the 'apachectl' commands.

Command to restart mac apache server

sudo apachectl restart

or

sudo /usr/sbin/apachectl restart

Command to start mac apache server:

sudo apachectl start

or

sudo /usr/sbin/apachectl start

Command to stop mac apache server:

sudo apachectl stop

or

sudo /usr/sbin/apachectl stop

And yes it's not always necessary to check what the status of Apache is, you can simply run the restart command from the terminal, without worrying about whether it is running or stopped.

The restart command is also very helpful if you make any changes related to your Apache server configuration in httpd.conf. And sometimes just restart the server before starting debugging why the website is not responding or something wrong with your Apache PHP setup.

Aug 23 2018
Aug 23

RESTful API endpoints in Drupal can allow you to expose the content of Drupal 7 website to other external resources. These endpoints can be used for fetching data with an AJAX call or simply a web service.

For making complex RESTful web services in Drupal 7, Services module is the best option to go for but if you looking for a simple endpoint in Drupal 7, which outputs JSON response, then going with a custom solution will be the best bet.

Create API endpoint with JSON response in Drupal 7

To create a simple API endpoint in Drupal to serve a JSON put you need to create a custom callback

/**
 * Implements hook_menu().
 */
function mymodule_menu() {
  $items['api/mymodule'] = array(
    'access callback' => true,
    'page callback' => 'mymodule_json',
    'delivery callback' => 'drupal_json_output',
  );

  return $items;
}

A noticeable point in this callback is the "delivery callback" argument which runs the output through drupal_json_output function.

/**
 * Callback function to return the data.
 */
function mymodule_json() {
  $data = ['cat', 'dog', 'mouse', 'elephant'];

  return $data;
}

Now if you navigate to the callback url 'api/mymodule' to see the output then you will see the following result

[
 "cat",
 "dog",
 "mouse",
 "elephant",
]

Now you can see that this output is exposed as a JSON and can be consumed by other platforms or an AJAX callback to consume data.

The same approach can be used to expose a node or a user as a JSON output.

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web