Drupal

Drupal Installation Profiles - Part 3 - Roll your own

Trying to hatch your own Drupal Distribution? Or (more likely, like me) are you going through an iterative prototyping exercise? Time to create your own Drupal Installation Profile

This article How to Write a Drupal 7 Installation Profile provides some background information. Drupal 7 core provides 2 generic examples that you can examine:

Drupal Installation Profiles - Part 2 - Distributions

At first glance Drupal Installation Profiles may seem a little complex, scary or even overkill for your world. But fear not. They can be tamed. At this point I think it makes sense to step back and examine the use of Installation Profiles. They are not as esoteric as you may have imagined. They are a fundamental Drupal mechanism employed by things you are likely already familiar with: Distributions.

Drupal Installation Profiles - Part 1

When prototyping or investigating a new concept it is common to wander down the wrong path since by definition you are are in uncharted waters. There is generally more than 1 way to address a problem and Drupal often provides several slightly (or radically) different contributed modules for any area of interest. Going down the wrong path is all part of the learning curve. You will make mistakes. And have to start over from scratch. Hopefully you are getting smarter. This learning process often means that you need to wipe what you have done and start over from a known point.

MySQL - utf8 is not really utf8

Turns out that utf8 is not really utf8. I was using Drupal 7 and MySQL and started to encounter a strange error when saving some captured user input. This was the reported error symptom

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x98\x8D H...' for column 'field_raw_content_value' at row 1

 

A quick Google search led me (incorrectly) down the path of trying to "clean" my data. My assumption was that the end user was somehow providing corrupt utf8 data. A few sample hits are:

Bundle Copy for Drupal Taxonomy Terms

We had a simple problem: capture a Drupal taxonomy AND its associated terms (definition AND content) in code so that we could automatically deploy a new taxonomy based feature to a website.

Bundle Copy was on our radar as the solution. Or at least part of it.

Deploying Drupal Taxonomy Terms

Prelude:

A Drupal Taxonomy is a very neat concept. They are handy for categorizing content. Combined with the Autocomplete Term widget, Taxonomies allow content creators to easily find an existing term or create a new term to associate with their content. I use a single taxonomy "Tags" to categorize content on this site. This post is tagged with Drupal and Taxonomy (look below at the "Tags" section).

Graphael Business Quadrant Charts

Next step was to produce a (more) polished product. We started to feed real data into our prototype code and quickly spotted some obvious visual issues:

Graphael Prototype Business Quadrant Chart

We needed to produce a Business Quadrant chart and had decided to use the graphael graphing engine to do it.

The first step was to create a skeleton module based upon Drupal Charts design that would allow us to specify and supply the chart data via a View. The initial version only provided the (x,y) data points by selecting a series of nodes.

Open Source Graphing Engines

We came to the conclusion that we needed to roll our own Business Quadrant Charts and started the search for a suitable open source graphing engine that we could easily incorporate into Drupal.

We separated the problem into two distinct architectural areas:

Google Scatter Charts != Business Quadrant Charts

At this point we were a little confused. We did not think our ask was special. All we wanted was to create a simple business graph. Why was it not easy?

Further investigation of the Google Scatter charts revealed they were perfectly suitable for a scientific scatter plot, but highly unsuited for a business quadrant chart. Why was this? A review of requirements revealed that they were fundamentally different animals, they just looked similar on the surface.

A Scientific Scatter Plot has the following attributes:

Pages

Subscribe to RSS - Drupal