How to not hack core
Okay, so you are ready to start customizing your Drupal installation. Before you get started, there are some things you should know and follow.Drupal provides a directory structure that is designed to...
View ArticleRules is cool until it makes you a fool
From the Rules project page:The rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules). It's a replacement with more...
View ArticleDrupal on AWS with RDS - PDOException
I am running a Drupal 7 site on AWS with an EC2 micro instance and RDS on Ubuntu 12.04. When I navigated to the URL patterns for Pathautoadmin/config/search/path/patterns I was getting a nasty white...
View ArticleWays to shoot yourself in the foot: Custom module and theme names
I was writing an extremely simple custom module (for a D6 site) to make use of hook_block. Every time I enabled the module the blocks no longer displayed on the pages. Since it had been a long time...
View ArticleWTF: Why is variable_get not pulling the value from the variable table?
What's that Feature?When your code executes a variable_get what actually happens is that Drupal inspects the $conf global array variable to see if it contains an index with the variable name. It does...
View ArticleWTF: How can I find out what information is available in the node table?
What's that File (layout)?There are many different ways to figure out what information the node table contains.You could use dsm($node); in an appropriate place in your code, assuming you have the...
View ArticleWTF: How do I get Drupal to put placeholder text inside my textfield?
What's that feature: the #attributes key.Perhaps you have written your own javascript code to determine that an empty textfield does not have focus, and in such a situation place some placeholder text...
View ArticleWays to shoot yourself in the foot: Submit "buttons"
I was writing custom forms that needed a validate handler and a submit handler. So, I followed the standard approach of function my_module_menu(){ $items = array(); $items['my/module/custom-form'] =...
View ArticleWays to shoot yourself in the foot: Renaming directories
I was having trouble getting a feature to enable correctly. It wasn't creating all the fields for the content type it defined. It built some of the fields but not others. I was pretty certain that it...
View ArticleWays to shoot yourself in the foot: element validation
I needed to do some custom validation of fields on a form. So, I decided to use #element_validate. One of the fields I was validating appeared a bit strange to me, though. When I displayed its...
View Article
More Pages to Explore .....