DrupalDork.com was shut down on September 18, 2013. This is just a snapshot of the site as it appeared then.

Module Development

DOPE #1: Simplenews Threaded Send

tl;dr: I release Simplenews Threaded Send this weekend.

Let me start by saying that I love working for Jackson River. About a month ago, management anounced that we would be trying out a monthly Day of Personal Enrichment, not unlike Google's 20% time, but more realistic - who can afford to spend a day a week goofing around? We've staggered them so that the whole company doesn't shut down for a day at a time, so my first DOPE was this past Friday and I wrapped up my project over the weekend.

Search Indexing: Published vs. Unpublished

This week, I've learning a thing or two about Drupal search indexing. On the search settings page (admin/settings/search) for a client's site, the percentage of the site that had been indexed remained really low, even after running cron a few times. The search functionality still seemed to be working though, so I knew something weird was going on.

What I found was that the search_dataset table had well over a million records in it, so indexing was definitely happening. After checking the code used to calculate the percentage shown in the admin, I found that it only checks published nodes when determining how much content has been indexed - but, the node module chooses from all nodes when choosig a batch to index during a cron run. Since this site had about a thousand published nodes and over 100,000 unpublished nodes (the reason for that is a different story altogether), thousands of the unpublished nodes had been indexed, but not many of the published nodes had.

Multi SMTP

My first contributed module has its first release:

http://drupal.org/project/multi_smtp

Hurrah!

CVS

"BrockBoland,
We are pleased to inform you that your CVS account request has been approved…"

Hurrah! The notice email included a list of links to documentation pages I want to read before I do anything else, and I need to figure out how to use CVS. I had been using the git migration as an excuse to put off applying for a CVS account, with the hopes that I would never even need to learn CVS, but I think I can master the basics enough to get through the next month or two.

Once I get through that, the first module I post will be Multi SMTP, the one I submitted with my CVS application. It sits on top of the SMTP module and adds the option of managing multiple servers. Then, there are three or four other modules that I want to polish up before I contribute them, and I've got ideas for a couple more that I'll need to find the time to build.

In any case, I'm really excited. I have been trying to get more involved in the Drupal community, and I'm excited to be able to give back some of the work I've been doing.

Xdebug, var_dump, and nested arrays

Xdebug is a must-have for local development, giving you step-through debugging and nicely formatted error messages, among other things. One of the mixed blessings it brings is that it overrides var_dump(). The display is a little nicer than the default, but it also cuts off at the third level of nested arrays or objects. This cuts the legs out from under Drupal developers: everything in Drupal uses nested arrays, and if you're trying to debug a problem or figure out where some data is stored, chances are good that you'll need to go five or six levels deep into an array to find your answer. Thankfully, the Xdebug developers were kind enough to include a configuration settings for this: xdebug.var_display_max_depth. You can increase the depth limit by adding a line to your php.ini file. I bumped the limit to 10 on my machine: xdebug.var_display_max_depth = 10

Subscribe to RSS - Module Development