What I Learned Today: Views Plugin Debugging Jonathan Jordan Tue, 05/24/2016 - 19:52

As I've said before in my custom views filter handlers tutorial, views is amazing. Today I was writing a custom style plugin. I got the plugin to show up in the list of available formats, but whenever I saved the form, it wouldn't stick.

What I Learned Today: Check Your Default Google Analytics Settings Jonathan Jordan Thu, 04/21/2016 - 17:48

Google Analytics Module Settings

Drupal's Google Analytics Module is great. There are a few settings though that I recently found out you'll want to pay closer attention to. First is the "Pages" section of the configuration form, which allows you to only include/exclude Google Analytics tracking code on certain pages. The default settings are to exclude the code on the following pages.

What I Learned Today: Drupal Behat Scenario Cleanup

I've been doing a lot more Behat testing recently. As my tests have gotten more complex, I've discovered that it was only a matter of "luck" that my earlier tests were properly cleaning up after themselves. What I mean, is that during my tests I fill out and submit a node form, checking that I successfully created it and that the appropriate users can see it. After each scenario you want to clean up any data that was created so you can run the test again and get the same result.

What I Learned Today: Regular Expression Backreferences

This is another post in my challenge to learn something new every day and then share that in a blog post.

This is fairly simple, but even though I'm comfortable with regular expressions, I was not familiar with the "?:" syntax (aka: question mark colon). I was working on some Behat tests using the MinkExtension, and this is used fairly often in the code (?P<option>(?:[^"]|\\")*).

What I Learned Today: MySQL Shell Commands

This is a quick one that I learned from a co-worker. He was in the MySQL shell and instead of ending his query with a semi-colon, like I normally use, he used \G. The results are interesting, instead of results showing in rows with the fields as columns, results are displayed vertically. Each record is separated by a row number and each field is on a newline with the field name.

"Normal" Query Syntax

SELECT * FROM `actions` LIMIT 3;

Ready to get started?