Submitted by Nick Vahalik on Fri, 07/08/2016 - 15:18
So as I was sitting here just now waiting for an 80+ MB import to process over an SSH connection, I began wondering to myself if there was some way to monitor the progress of an import. Percentage—or even throughput—of the file being sent over the pipe.
Turns out that there is a way!
Enter the command
Submitted by Nick Vahalik on Sun, 06/26/2016 - 23:19
Output buffering in PHP isn't new. It was introduced in PHP 4 and for the most part, it's one of those things that unless you're not using a CMS or a framework, you'll never really need to mess with it much.
<script> tag is parsed, it is executed immediately.
Submitted by Nick Vahalik on Mon, 05/23/2016 - 09:12
Background and Intro
The Hamshield was a Kickstarter that ended sometime last summer. The original expected delivery date was October of 2015, but due to issues with manufacturing and a problem with their amplification circuits, it was delayed. I won't go into the details here, but you can read it on their Kickstarter page:
Submitted by Nick Vahalik on Wed, 04/20/2016 - 14:21
Just a quick note that if you're importing a Commerce price:
Note that you can also set up a constant in the migration definition and use the constant value:
Submitted by Nick Vahalik on Wed, 04/20/2016 - 09:08
If you're wanting to do some advanced processing (e.g. lowercasing a word and then capitalizing the first letter) you can chain the two callbacks to get the desired effect:
Submitted by Nick Vahalik on Mon, 04/18/2016 - 13:58
cset command is a bit picky, but with a few command line options, we can get it to import a yaml file into our site's config:
drush -y --format=yaml cset config.entity.string '' - < config_file.yml
This will put the entirety of
config_file.yml into the configuration entity
Submitted by Nick Vahalik on Mon, 04/04/2016 - 12:28
One of my new favorite modules recently has been Field Tools. What I love about it is that it presents you with the ability to export all of the fields on a particular bundle (or even just a single field).
Then, you can just use
field_create_instance in a little loop.
Take for example (in a module's .install file):
Submitted by Nick Vahalik on Thu, 03/31/2016 - 14:25
Perhaps this may save someone else some time:
Submitted by Nick Vahalik on Wed, 02/24/2016 - 09:48
As I've written about in the past, Platform.sh's Makefile build system is pretty sweet. One of the things that confuse me the most, however, is how to make a change to a distribution (such as adding a patch) without making things even more complicated.
Hat tip to Tavi Toporjinschi for writing the original example this is based off of.
Submitted by Nick Vahalik on Sun, 11/15/2015 - 14:01
Recently, I tried to run some tests locally and the test runner kept silently failing. Ultimately, it was just giving up during bootstrap. The problem was eventually traced to Acquia's frustrating modification of the settings.php file; it only loads when
$_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] is defined.
So in order to make it run, you'll need to: