By Phil Frilling, 15 December, 2017
In Drupal, content is defined as "Information meant to be displayed on your site, and edited by users: article, basic page, images, files, etc.". Configuration, on the other hand, is defined as "Information about your site that is not content and changes infrequently, such as the name of your site, the content types and views you have defined, etc.". A simple analogy is that of a contractor building a house. They must raises walls, set windows, and lay floors.
By Phil Frilling, 20 June, 2017
Upgrading an inventory of three servers using ansible, I can use the following command to make this happen:

ansible -i Inventory -m apt -a "upgrade=yes update_cache=yes cache_valid_time=86400" -b -B 3600 all
This command does the following: 1. Use the inventory file named "Inventory" 2. Run the Ansible module "apt" 3. Run the ad-hoc command for the apt module "upgrade=yes update_cache=yes cache_valid_time=86400" 4. The -b makes the user become sudo. 5.
By Phil Frilling, 30 May, 2017
Today we noticed a weird error where our CMS software was unable to write files to the server. Upon investigating, it appears the /tmp directory filled up the hard drive, which prevented file writes to the server. We rebooted the server and it took 20-30 minutes to reboot. The AWS boot logs were saying: "A start job is running for Create Volatile files and directories" As it turns out, the /tmp directory is only cleared on reboot.

Tags

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, 4 January, 2017
A quick php snippet to convert seconds to HH:MM:SS


  $seconds = round($seconds);

  $output = sprintf('%02d:%02d:%02d', ($seconds/ 3600),($seconds/ 60 % 60), $seconds% 60);

Tags

By Phil Frilling, 3 January, 2017
Loading a paragraph field entity for use within node.html.twig. In order to load a field in a paragraph referenced entity, we need to first load the referenced entities

$my_paragraphs = $variables['node']->my_paragraph_field_name->referencedEntities();
Then, we look through the paragraphs to get the correct language, and in turn, pull the field from the paragraph.

    foreach ($my_paragraphs as