You are here

Drupal 7

Drupal Cron: A Better Way

Corey Pennycuff's picture
BenBois_Clock.png
cron: The Unix clock daemon that executes
commands at specified dates and times according to
instructions in a "crontab" file.
Image from openclipart.org.

Drupal is an amazing system, there is no denying it. Every once in a while, however, small problems come up that no one anticipates, and your entire system grinds to a halt. This recently happened with me when needing for Drupal to run some heavy processes in cron. It croaked. Drupal got stuck in a loop of trying to run the same ill-fated task over and over, and my site stopped updating. Drupal needs cron, and all the normal ways of running cron were failing me.

Cron is an interesting creature. Many new sysadmins are mystified by its cryptic symbology and voodoo-like power, so they avoid it. Some shared hosting environments don't even allow users to set cron jobs! Back in the old days (Drupal 5 & 6), we solved this problem by using the Poorman's Cron module, which worked by starting the cron jobs at the end of a page load, after information was already sent to the user. It was virtually transparent to the end user, and this method was so popular that it made its way into Drupal 7 as a core module.

DMARC Policies are eating my Drupal emails!

Corey Pennycuff's picture
Spam_Mail.png
Spam is bad! Kill it with fire!
Image from openclipart.org.

Due to the irritating nature of spam email, companies have started hardening their policies for how they handle emails that originate from various sources. A recent change that has hurt a lot of sites and mailing lists lately is that email providers have begun to make their DMARC policies very strict. Specifically, email providers are saying, "If the email says that it is from one of our email servers, but it didn't come from our server, then deny the message." (I'm looking at you, Yahoo! and AOL!) This in and of itself is not the whole problem. The recipient email service must agree to respect DMARC policies. When they do, emails that say that they are from a domain, but are from somewhere else, are silently rejected.

"But wait," you say, "this sounds totally reasonable!" You're right. And wrong. And right. Let's just get this sorted out.

Moving Files Around A Node

Corey Pennycuff's picture
plupload.png
plupload image
Image from drupal.org.

When building websites, we use a lot of smoke-and-mirrors to get things accomplished, and we often do it by re-purposing preexisting functionality and code. Once the page is themed, who will be the wiser, right? Unfortunately, a seemingly straightforward idea can become unwieldy when you are unfamiliar with the underlying APIs involved. Such was the case for me when I needed to be able to programmatically move a file from one file field to another in Drupal 7.

My Latest Project: Integrating Drupal and DreamHost DreamObjects

Corey Pennycuff's picture
dreamobjects-diskicon.png
DreamHost DreamObjects image
Image from DreamHost.

For a recent project, I needed to find a good, reliable, and inexpensive cloud storage solution to integrate with my Drupal site. As we know, developers are creatures of habit, and we often reuse the same solutions for similar problems. In looking for cloud storage solution, I first went to the two main competitors: Amazon S3 and Rackspace.

I don't want to spend a lot of time on this topic, but I will say, first of all, that both companies are excellent choices and well-respected providers of cloud storage service. Both of them even have similar pricing. As it turns out, pricing was the major issue and the Achilles' heel of my project. In the worst case scenario, it was just too expensive to use either of them for cloud storage, and in the best case profits would be too slim to offset the worst-case threat.

Pruning the Taxonomy Term Tree Widget

Corey Pennycuff's picture
taxonomy_term_tree_widget.png
Taxonomy Term Tree Widget
Image from drupal.org

Taxonomy is a great tool in Drupal for categorizing information, unfortunately it is not often very "pretty" for the end user to interact with. Taxonomy Term Tree Widget addresses this deficiency by generating a pleasant, familiar tree structure from the target vocabulary's terms and their corresponding hierarchies. There is one problem, however, and that is that it is very difficult to filter the visible terms programmatically. The list can be filtered using a view (a setting accessible in the widget configuration form) however such a simplistic approach may not be flexible enough for most applications.

Pages

Subscribe to RSS - Drupal 7