CiviCRM Mailing Not Being Sent To All In Group

If you create a CiviCRM group with, say, 1,000 contacts in it and then go to create a mailing using the same group and it only says it will send it to 750, it's likely because some of those contacts are "on hold." On hold simply means that the system has determined the email address associated with the contact to be not worth sending to (i.e., dead). This could be caused by the emails bouncing for any number of reasons.

To avoid unnecessary continued bouncing, CiviCRM flags them as On Hold and prevents them from being included on future mailings.

Proud to Sponsor DrupalCamp Boone

We here at Redfin Solutions are proud to be Platinum sponsors of the inaugural DrupalCamp Boone. Western North Carolina's Blue Ridge Mountains are a thing of beauty, and we're excited to get down there and breathe in the fresh air. What better place for a giant blue drop than a Blue Ridge?

We also want to call attention to the other great sponsors obtained. For anyone new to Drupal, it's the community that makes Drupal such a powerful force in this world, and it wouldn't be possible without you.

Registration is open, so get on over to http://drupalcampboone.com and get involved!

Create a Redirect in Drupal's .htaccess For The Base URL

I recently needed to redirect a client's traffic from their old URL to a new one. In this case, they wanted any traffic going to plain example1.com to go to example2.com/blog and all other traffic to go to example2.com/[equivalent URI] (e.g., example1.com/about --> example2.com/about).

To do this, I messed around with rewrite rules and conditions for a while, until I decided on what seems to be a fairly straight forward solution:


# Redirect example1.com to example2.com/blog
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule ^$ http://example2.com/blog [r=301,L]

Redirect

Redfin Launches two new Drupal sites!

It's been a crazy Saturday here at Redfin Solutions, what with getting a new server and immediately having at least one client to launch on it!

Redfin is happy to announce the redesign of Chapman Construction's new site at http://Chap-Con.com. The people at Chapman have been really great to work with. The design is by Jon Sachs, who we always enjoy working with. Living in the mountains of North Carolina, I'm happy to say Chapman has a very green focus, which brings out both the geek *AND* the hippie in me.

A GTD "trusted system" -- todo.sh

The Rave

Yesterday was the birthday of a shell script that Gina Trapani uses to (her words) "run her life." I am a huge Lifehacker fan, and when Gina started Smarterware I subscribed to its RSS as well. Though a lot of posts overlap, some do not - and it's good to keep up with what else Gina is doing. She's a very smart woman.

Uh-oh, I upgraded to Lucid Lynx but need PHP 5.2 for Drupal!

Last night I hastily decided to upgrade to Lucid Lynx on my main development machine. Generally, I try and wait a few months till things settle, but nearly 100% of the time that doesn't work. After a short battle with my wireless and some other small things, I finally settled back into "work mode" and wanted to get started working on a project I'm working on for Appalachian State University.

Redfin Now Maintains The uc_profile Module!

Have you ever wanted a user purchasing something from ubercart to fill out their user profile at the same time? uc_profile module allows you to do just that. This becomes especially handy if users are purchasing memberships on your site using uc_roles and you'd like to collect additional profile information from them at the same time.

Thanks to cooperation from indytechcook, the uc_profile module's original maintainer, Redfin Solutions now manages it and is looking forward to releasing improvements in the near future.

Network At DrupalCon

Networking in most social situations is difficult enough, but when you throw thousands of (often) socially awkward and introverted geeks together, the task becomes even more overwhelming. And these aren’t just any geeks, these are Drupal geeks, which means you’ve got a ton of smart, dedicated and interesting people to meet -- it’s just that some might need a little nudge. If you haven’t already, I highly recommend “Work the Pond!” by Darcy Rezac -- it, along with my own experiences, is what powers the following advice:

Introduce Yourself

Drupal notifications that don't work for ___ (comments, nodes, whatever)?

I spent a few hours wading through something yesterday that I hope will save some other people some headaches.

I had the notifications module on, and it was sending notifications for node creations and updates just fine, but it seemingly wasn't sending anything when I commented on a node. It would TELL ME it did ("notification sent to x other users") but I would never get an email.

PHP DateTime object has no reflection!

For hours I've been banging my head against a wall trying to figure out why Drupal's date_make_date "wasn't working." I was always getting back an empty PHP DateTime object. I traced it back down to PHP's date_create. I suspected that there was no reflection capabilities, but searching against date_create really didn't yield me much.

Eventually I decided "let's just search up a level (date_make_date empty object)" and in seconds I came across this thread: http://drupal.org/node/514560. This is just proof to me that the Drupal community is super awesome.

Theming Webform Emails

Wow, it seems that Drupal's Webform module has come a long way since I last used it (which I believe was Drupal 5.x). It's so convenient and really latches onto the new template hints and stuff from Drupal 6 (here I am talking about it while Webchick announced yesterday the D7 criticals queue is under 200, w00t!).

Happy Holidays from Redfin Solutions!

Patrick is I'm sure somewhere while all of his and Elyse's extended family brood over Madeline, their latest addition. My family was awestruck by my nephew's second Christmas. We're off to do some of that typical holiday traveling, but want to with the Drupal community and all of our clientele a happy and joyous holiday season, spent with their families or friends.

Help save Bement Camp and Conference Center!

I basically grew up at summer camp, and it has without a doubt made me who I am today (just refer to the ACA's new marketing campaign "because of camp," there's a lot of things you could fill in about me!). Redfin did some pro-bono work to develop the web site at http://savebement.org, making heavy use of CiviCRM - the open source constituent relationship management software originally developed to fill the need of grassroots movements like this one.

Redfin launches Lives in the Balance, Dr. Ross Greene's Collaborative Problem Solving

Thanks to a design provided by Jon Sachs, Redfin was able to recently launch www.livesinthebalance.org, a site aimed at providing resources and help to children and parents who struggle with their relationships, sometimes to the point of Oppositional Defiant Disorder. Collaborative Problem Solving is an approach to these unique situations, pioneered by Dr. Ross Greene.

Private and Public File Access in Drupal

If you're like us, we usually only want to have SOME files "private" and not ALL files as Drupal is limited to all-or-nothing out of the box. There are some modules out there that do this, but honestly it's pretty easy to do yourself.

Let's say you don't want anonymous users (or search engines) to download any files in your sites/default/files/private folder. Create a .htaccess file in the folder you wish to protect and add the following and save (this is for Apache, but similar for Windows systems):


RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET$ [NC]

Presentation at the American Camping Association Southeast (ACASE) Conference

Redfin had the pleasure of Co-Presenting with John Paul McNeal about the utility of Drupal in the camp website world. In addition to its features as a content management system, giving the camps the power to manage their own content, Drupal also has great support for integrating with the latest social media applications, such as Twitter and Facebook, via Ping.FM and directly.

Below are the slides from that presentation.
http://docs.google.com/present/view?id=dfnh54xz_89fb7kt5r9

Using drupal_execute vs. node_save

There seems to be much debate regarding when to use node_save versus drupal_execute. Personally, I like the idea of drupal_execute, since it's just like the regular form executing--it handles validation for you, for example. This is an example of where I had to use node_save, but still needed validation.

DrupalCamp Atlanta Presentation: There's a Hook for That! Extending Drupal, Beginning Module Development

Today (Sept 19, 2009) I had the great honor of being able to present to DrupalCamp Atlanta on something that I think is a major (mostly mental) hurdle in beginning to develop for Drupal. There are a lot of developers out there, people who are familiar with PHP or other programming languages, who clearly know how to program, but don't know the right way to program for Drupal.

IE 7 and IE 8 Impose 31 CSS File Limit - Drupal Beware!

While debugging a client's site this weekend, I came across a rather dumbfounding issue. The site would look great in Firefox, but not in IE. In fact, IE seemingly ignored any CSS statements I would add to layout.css (part of a Zen-based custom theme).

If we look at the page source, Zen likes to add on a considerable number of CSS files along with several contributed modules -- over 40 CSS files total!

Resolving Drupal CVS Merge Conflicts

We manage our sites via SVN by first checking core and contributed Drupal modules from cvs.drupal.org. An explanation for this deserves its own post (coming soon...), but basically we check out from cvs.drupal.org and then import that into our SVN repository.

SVN add Updated Drupal Modules With Ease

With modules such as CCK, you'll often notice that after updating it via CVS that you are left with a bunch of new objects (new translation, css, and other files) in folders and subfolders. Rather than svn add'ing each file and/or subfolder independently, try this in the root folder of the module you updated:

svn add * --force

That will add all the new files you acquired with your most recent CVS update.

Hide The Drupal Files Folder From SVN

It's best practice to hide your "files" folder from SVN since you probably don't want to inundate your repository with and endless number of updates. If you do this:


svn propset svn:ignore "*" sites/default/files
svn commit -m "Hide the files folder"

Then you should be all set, and you won't see any more "?" when you do a svn status command.

Merlin, you the man.

I can't speak highly enough of Earl Miles, aka merlinofchaos. Despite the puppet act at DrupalCon, which I'm willing to forgive, ;) this guy is awesome. I have been using views for a long time, and Views in Drupal 4.7 and 5 was just awesome. Then Views2 came out, and while the learning curve was a little steep, it continues to blow my mind.

Why Can't I Edit a Drupal Node That I Have Permission to Edit?

Okay, this one gets me all the time. I grant a role the ability to edit certain nodes and when they log in and try to edit a page, there's no edit tab!

Chances are that if you've tried everything else, you need to grant that role permission to use whichever input type you've set for that node or set of nodes. To do so:

  1. Edit your node and check what input type it is set to use
  2. Go to Site Configuration > Input Formats and then make sure that the corresponding input type is configured to allow the role to use that type.

Database Migration Script

Here's a handy BASH script I wrote to pull down one copy of a database to a local version using an SSH tunnel. It's not super-secure, so it kind of assume that you have the script hosted on a local machine, securely (the DB password is in the script!).

First, go put a host named "tunnel" in your hosts file (usually /etc/hosts on *nix-type environments), that points to localhost 127.0.0.1 (mysql can get cranky when you try to connect to "localhost" - it always tries to use a local socket when you say that, so this is a bit of a workaround to make it work through the tunnel.

Remove CiviCRM Contacts From One Group Who Have Unsubscribed From Another

We run several CiviCRM instances with our Drupal sites. One issue we ran into recently concerned contacts who unsubscribe from one group which was a subset of a larger group of contacts (of which they also belonged). When they would unsubscribe from one, they would still be subscribed to the other and thus were still receiving the newsletter. Aside from the fact that the group/newsletter setup was a bit un-ideal, we had to address the issue and manually unsubscribe the contacts from the other group. Here's how we did it:

DOTGO Integration for Drupal!

Redfin Solutions is proud to announce the availability of a -dev branch of code for integrating with the DOTGO SMS service.

Replicate MySQL's MD5() Function in SQL Server 2005 Using HASHBYTES()

MySQL and PostgreSQL's MD5() functions are nice, simple, ways to hash your data. Unfortunately, SQL Server 2005 and up (sorry, in order to get it working in SQL Server 2000, you'll need to try a stored proceedure), you can use the HASHBYTES() function.

In a recent SQL Server port of the Actions module for Drupal 5, I ran into the following MySQL query:


SELECT aid FROM {actions} WHERE MD5(aid) = '%s'

Why I Hate Microsoft