koenigequipment.com

By Phil Frilling, 17 May, 2017
Today I had a client call and say their website wasn't loading under SSL. When browsing to the site, we got the error "This organization's certificate has been revoked." So, I quickly setup a new certificate for them using letsencrypt.org, which got the site back online.

Tags

By Phil Frilling, 17 February, 2017

In order to upload a file to a Drupal form, you need to be sure to include the hidden form_id input. After that, it is just a matter of using the name of the html element. The code looks like this:

 curl -X POST -F 'form_id=MY_DRUPAL_FORM_ID' -F 'files[xml]=@/path/to/my/file.txt' https://www.example.com/path/to/form

Tags

By Phil Frilling, 23 March, 2016
I was working on setting up a role migration from Drupal 6 to Drupal 7. After some time, I noticed that the role id's were not being preserved, which was going to cause a problem for me when I went to take the migration to the live server. I initially tried using the addFieldMapping function to link the source rid to the destination rid (similar to preserving the nid for nodes or the uid for users). However, this failed to save any of the roles during migration.
By Phil Frilling, 12 June, 2014
Drupal's calendar module is a great tool for building calendars quickly with views. However, the default theme is still using tables, blech! After some searching, I came across a sandbox module to fix this, https://drupal.org/node/1675894#comment-7903527. Like some of the user's in that thread, I did not want to add another module to my site. So, I set off to theme the calendar in a responsive way. Surprisingly, this was much easier than I anticipated.
By Phil Frilling, 10 July, 2013
Today I needed to embed a YouTube video within the body of a responsive design. This is usually fairly easy with images, but iFrames need a bit of extra love to make them work. I Googled for a while and came across this link: http://stackoverflow.com/a/12121929. I didn't want to use an image, so I followed the comments and came up with the following code.
By Phil Frilling, 18 June, 2012
In order to run a Drush Script from a cron job, you'll need to setup a valid Drush Site Alias. Otherwise, cron will not bootstrap the site correctly and you'll be missing most of Drupal's API functions.
By Phil Frilling, 15 June, 2012
We have a website that updates numerous nodes nightly with an uploaded XML file. This XML file is then processed with Drupal's batch api, and when the XML file is uploaded manually, the script works perfectly. However, in real life, this XML file is uploaded programmatically by a script running on another server. Programmatically, the file gets uploaded and the batch begins properly, but on the successive redirects, the batch fails. This is because, the pseudo browser window from our publishing script closes.

Drush to the rescue

Luckily we have Drush installed on the server.