Tagged "drupal"

Creating fields in update hooks on Drupal 8

You've got an update hook that depends on a new field that depends on config import that needs to be done after the update hook has run that requires the config import that needs... ARGH.

User registration using Simple Oauth

In a headless setup, I wanted to protect the user registration endpoint from being accessed by unauthenticated users. I achieved it using the Simple Oauth module.

Testing redirects in Drupal 8

I'm setting up a controller on Drupal 8 which should redirct to the home page if certain query parameters aren't set. Writing a test to make sure that the redirect happens correctly took longer than expected. After trying a number of different approaches, I finally figured it out.

Make a file executable in Git

I make it a habit to ignore all file permission changes in Git, but sometimes I need to make a script executable. This is how I change the permissions on a file in such a way that they're stored in the repo.

Upgrading from Drush 8 to 9 with Acquia

While starting on a new project recently, I decided to take the plunge and upgrade to Drush 9. The upgrade process, especially since it's an Acquia site, was a little bit haphazard. In this post I'll describe the issues I faced and how I resolved them.

Creating and releasing a project on Drupal.org

Over the course of a recent project, I helped to write some custom modules that have been reused across a few other projects internally. Instead of keeping them internal, I decided to open-source them and post them on Drupal.org, feeding back to the community and ensuring the stability and safety of the code. I found the process to be quite difficult to follow, so here's a handy summary of how to publish a module to Drupal.org, and some tips and tricks along the way.

See all tags.