Occasionally when developing new updates for modules, the "schema version" has to be reset back if the local update code failed for some reason. In Drupal 7, this was a straightforward change to the `system` table, where each module was clearly listed with a `schema_version` column that could be changed via Pancakes relatively quickly. In Drupal 8, the approach is slightly different. You can find the value of each module schema in the `key_value` table, anything under the collection `system.schema`.
Strange composer error & troubleshooting
Recently, I was working on a D8 codebase and getting a pesky error anytime I tried to invoke a composer command:
Just to capture that error in text:
React & Drupal - A simple yet powerful example project
React. It's talked about at nearly every Drupal event these days, in the context of headless and progressively decoupled implementations. There are lots of examples and articles out there that talk about integrating Drupal and React. I think having articles like these out on the open web is important, as each provides a perspective that could potentially make the "A-ha!" moment happen, and that is valuable for the net and open source!
First, let's get our Drupal setup with a REST endpoint. I'll be using Drupal 8.6.x-dev branch in this version. We want to enable these modules:
Creating Workspace entities programmatically
With Drupal 8.6.x, the exciting new "Workspaces" functionality is coming to core! I was diving in and playing with it, and I have to say I am pleased and excited with how this new feature will enhance core functionality provided by Drupal. Plenty of projects I've worked on or been involved in have some need for workflow - Stage and prepare content, and then at some point, deploy it out to the live site.
Fast D8 local setup with drush
I recently stumbled across a command I hadn't known existed, but I think could potentially save a lot of time when it comes to showcasing D8 or firing up an instance to mess around with:
drush qd
You'll see when running this command, it creates a new folder with D8, and starts a server. Here's the output from my terminal running this command:
Programmatically execute a drush command in an update hook.
Something pretty awesome that I did recently was to figure out how to execute a drush command in an update hook. I was working on a client site in which, we had the dreaded "Missing module" issue - a ton of these harmless yet super annoying warnings whenever a cache-clear or other certain actions were performed:
Setting Up A Drupal 8 Container on CircleCI with CircleCI 2.0 Syntax
I recently went through a learning process I want to share, since I found it somewhat difficult to find the pieces to make this work. That is, having CircleCI 2.0 style testing run on a Drupal 8 installation. For the environment setup, I wanted to use PHP 7.1, and MySQL 5.7. I also knew that I wanted to get drush working, and therefore would need composer, and I wanted to be able to leverage drush as I started this initial test environment. For this first run, I also wanted to execute a PHPUnit test 'FilterQualtricsTest' from our custom utexas_qualtrics_filter module.