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:
Submitted by Nick Vahalik on Mon, 10/19/2015 - 09:53
So I was reading through some blogs this weekend and came across an article about VW on the Clean Code blog. It's a short post and I suppose if you wanted a summary blurb, it would be this:
I think that argument is even more asinine than Michael Horn's. They knew. And if they didn't know, they should have known. They had a responsibility to know.
Submitted by Nick Vahalik on Wed, 08/19/2015 - 22:36
So I needed to recreate a truncated users table to stop the Drupal admin from barfing all over the admin... the url_alias table has the UID and the user names in it... so why not?
Submitted by Nick Vahalik on Mon, 06/01/2015 - 15:53
Acquia DevDesktop can be pretty slick at times for development, but if you're trying to work with a site that has domain access AND internationalization, you may be scratching your head a bit.
First off, you must correct the entries for the default site (or whichever site you're testing) in the domain and languages tables.
You'll need this patch since Drupal 7.x Core doesn't handle port numbers properly.
Then your site will work!