Drupal Module

Drupal 9 Upgrade: Patching Modules 101

Not all contributed D8 modules have D9 compatibility built into their latest releases. More than a few, however, will have a patch available in their open issues that will get you there. I've had several occasions to patch a module, but it's not something I do with enough frequency to immediately recall how it's done. On the command line I often forget which is the right way to do it: git apply or patch?

Prepping for a Patch

As with all things Drupal--attention to detail is paramount. It's easy to get ahead of yourself when looking for and applying a module patch, but one of the first things you'll want to do when you find one is to ensure that the patch was built for the module version you're using. A patch is a file that applies very specific changes to an already existing file. If the existing file you have on your site (say, the info.yml file associated with a module) differs from the one the patch was created for, the patch will likely fail.

Adding a Custom Block to Drupal 8's Fluid UI Module

The Fluid UI module for Drupal 8 is a great way to improve the accessibility and 508/ADA compliance of a website. The one problem I have with the module is that it renders it's "accessibility block" outside of Drupal's block system via hook_page_top(). What if you wanted to treat the block like any other? What if you wanted to assign it to one of Drupal's block zones?

Full disclosure -- I'm not a PHP developer. In all honesty, I am a front end dev who works mostly in SASS/CSS with the occasional foray into JavaScript and jQuery. So, I'll admit to starting this project with my feet firmly planted into the deep end of the PHP pool; I'm not really tall enough to keep my head above water. PHP, for me, is less about swimming and more about not drowning. At the same time, any chance to dig into the guts of Drupal and get my hands dirty with code is generally something I welcome.

Drupal Module: Share by Mail Failure in Social Media Share Module

This is a rather otaku (nerdy) error you may find when using the Social Media Share module for D8: when trying to share by mail the browser opens the mail client with an incomplete title and body. Except, it only does it for certain articles. Sounds like a mystery; it's not.
share block
A simple block allowing users to share an article by mail.

A little background: one of my clients recently put together a blog. On that blog, we were careful to put together a custom styled share block using the Social Media Share module--we run the D8 version (8.x-1.8).