Creating Patches from Drupal Merge Requests

Drupal.org has used patches to manage community contribution for many years. But, patches are difficult for new users to learn and require the use of the command line. Recently, Drupal.org code has migrated to Gitlab, and we can now use Gitlab and Drupal.org issues to create merge request to share code and fixes with modules and Drupal Core. But, how do you use the code on your site immediately? Create a patch file and upload it to the issue on Drupal.org.

Read On →

Drupal Merge Requests using Gitlab!

Drupal.org has used patches to manage community contribution for many years. But, patches are difficult for new users to learn and require the use of the command line. Recently, Drupal.org code has migrated to Gitlab, and we can now use Gitlab and Drupal.org issues to create Merge Requests to share code and fixes with modules and Drupal Core. Here’s an overview of creating a merge request for folks who want all the details.

Read On →

Drupal Maintainer's Initiative

With the launch of Drupal 9, the community is rallying to update all of the community contributed modules from Drupal 8 to Drupal 9. This work is often just a single line of code to tell Drupal that the module supports 9. But, for older, out of date modules, the work required to get to Drupal 9 is a bigger effort. Some of these modules haven’t been updated in 4 years.

Read On →

Content Modeling in Drupal 8

In many modern frameworks, data modeling is done by building out database tables. In Drupal, we use a web-based interface to build our models. This interface makes building the database accessible for people with no database experience. However, this easy access can lead to overly complex content models because it’s so easy to build out advanced structures with a few hours of clicking. It’s surprising how often Drupal developers are expected to be content modeling experts.

Read On →

Drupal 8 Admin Best Practices

Drupal sites often suffer from a less than ideal editor experience. While Drupal 8 improves on the default experience by providing inline editting, working preview, and moving the ‘advanced’ options to the sidebar, there’s still common mistakes that will lead to poor a experience. As a part of my on-going Drupal 8 Best Practices series, lets look at what we can do to build good admin interfaces. Here are a few major principles behind the admin experience: Use as few content types as reasonable.

Read On →

Drupal 8 Theming Best Practices

The theming guide for Drupal 8 will get you started in the basics for theming a Drupal site. But, once you’ve learned the basics, what best practices should you be applying to Drupal 8 themes? There are lots of popular methods for writing and organizing CSS. The basics of CSS, of course, apply to Drupal. Don’t get too specific Place your CSS in the header and JavaScript in the footer Organize your CSS well Theme by patterns, don’t go top down Preprocess your styles Use configuration first When it comes to Drupal, there are some common mistakes that happen when a front end developer doesn’t know Drupal.

Read On →

Drupal 8 Breadcrumbs - Add the Current Page

Breadcrumbs are a pain point in Drupal 7. If you don’t know how breadcrumbs are supposed to work, go read this. The crumb should start with home and continue through to an unlinked crumb of the current page. Crumbs were implemented poorly, and breadcrumbs were difficult to modify in a module. Further, they were based on items in the menu. The breadcrumbs didn’t even allow you to edit the home title or include the current page title as an unlinked crumb.

Read On →

Drupal 8 Configuration Workflow Best Practices

Don’t store site configuration in the database during development because putting configuration in the database makes configuration difficult to track in version control. Instead, use the file system! Putting configuration in a database also makes it more difficult to restore, compare, sync, deploy, modify, and review the site config. Drupal 8 uses Yml files for configuration which are a perfect format for file-based configuration. In fact, this is the only method for storing configuration in BackdropCMS because BackdropCMS uses JSON files to store site configuration.

Read On →

Drupal 8 Development Best Practices

These core concepts apply to Drupal 8 site builds. However, many often apply to the other major web framework from WordPress to Node projects. Many of these ideas are documented on Drupal.org as well. I’m rewriting them here because I disagree with the documentation in several key areas. Use The Same Development Environment Everyone on your team should have exactly the same development environment. Using the same development environment ensures that the project runs exactly the same for each team member working on a project.

Read On →

Drupal 8 Site Building Best Practices

I’ve taught an beginners course during Drupal Global Training Days many times in portland, and I give students an introduction to Drupal 8 for site builders. I spend the day simplifying Drupal for new developers. But once you’re beyond the basics of the interface, there are many different ways to accomplish a task in Drupal and Drupal 8 only adds to the choices. So, if you’re a Drupal developer looking to craft easier to maintain Drupal 8 sites, this series is for you.

Read On →