Drupal

Do not forget to make your module blocks Configurable

 

We needed to perform some regression testing on a production server of a Drupal module.  The Drupal module output a block and we needed to display this block on a simple Testing page so as not to affect other parts of the site.  I uploaded my changed module and proceeded to configure the block so it would only appear on this specific page.  ERROR.  Total white screen of Drupal death.

The evil block cacher

There are two things that I have learned recently with Drupal

1) Caching of blocks can be enabled/disabled.  It is highly recommended to turn on this caching for production sites.  Your site can be heavily hammerered if you don't enable this.  I learned this firsthand. It would triple the time to execute a page.

2) Even if you enable the block cache, individual blocks that your custom module exposes can opt out of being cached (more on this later)

Testing drupal with grails webtest

I was implementing a Drupal site with a custom module that uses a custom mysql database.  The client reported problems with a custom module.  I tried reproducting the problem, but after trying 20 some combinations out of 1000+ test elements, I wasn't able to reproduce the questionable behavior.

Enter grails with webtest.

simplenews bounce, i give up

I have spent some time installing a configuring the simplenews bounce module.  It does say up front that it's experimental, so can't be mad at anyone but myself here.  However,  I am giving up.

1) I am using mime-mail, since I am sending html email, so I had to patch that to that my return-to path was set

Login Security:Call to undefined function ctype_alnum()

After installing Login Security, I attempted to configure it in the Drupal administration screens.  I was unable to perform any configuration due to the following error.

[Wed Oct 21 11:02:53 2009] [error] [client xxx] PHP Fatal error:  Call to undefined function ctype_alnum() in /opt/sites/xxx/sites/all/modules/login_security/login_security.admin.inc on line 214, referer: http://xxx/admin/settings/login_security

Change tab names

Needed to rename the tab on the user form.  Found a nifty way to do this by using the hook_menu_alter function.  I added this to my custom module:

function gl_customizations_menu_alter(&$items) {
 $items['user/password']['title'] = t('Email Password Request');
}

 

 

style.css media="all" causing conflicts with print.css

When the $stylesheets variable is output in my template, it contains a reference to my theme's stylesheet with a media="all" that is conflicting with the print.css.  I did a lot of searching and found several people who proposed different solutions

why pay for a theme?

In every drupal cms that I have implemented, the design was done up-front and we do a custom theme for the design.  That's the way we roll.

However, for my personal site, since I am not a designer, I was considering upgrading my theme by purchasing one of the commercially available themes.  Then I discovered there are a multitude of free themes at http://drupal.org/project/Themes

While this may be super-obvious to other Drupal folk, as I said, I am coming to Drupal as a programmer, not a UI person so this "discovery" was good to make for me.

adding a reset button to a exposed filter

One issue for views when you have an exposed filter is that once the selection is made (e.g. category selected), there is no way to unselect your category.  Your users will have to hit the back button, it's not intuitive to the user.

Simplenews- unsubscribing from test newsletter

I was taking care of some last issues for my wife's website related to the newsletter (an email list managed by Drupal simplenews).  My last issue that was outstanding was when I tried to unsubscribe from the newsletter that i just sent out for a test, I got a 404 error.

I did a 2nd test in which I actually sent out the list (not a test), had to create a another newsletter for that!  When I sent out the email blast for real (as opposed to a test), the unsubscribe worked!

Syndicate content