RogueWolves

Rogue Wolves is the personal site of .

I'm currently a research scientist with Oculus Info Inc. in Toronto, Ontario Canada.

My research interests include: adaptive user interfaces, machine learning, Bayesian reasoning and distributed artificial intelligence.

Duplicate Links in Drupal Article Module

I noticed that the last article I posted was showing up twice in the "Latest Articles" block on the left. After a bit of investigation I found it was showing up more than once because I applied two categories to the article, "Open Source" and "Firefox". The SQL statement that builds this block was returning multiple rows for that post, one for each category assigned. If this was a closed source system I would have to live with this bug until the developers of the software posted a patch to fix this. However, Drupal is an open source system and the Article Module is open source as well so I had several possibilities here:

  1. Wait until the developer of the module posts a fix
  2. Since it's open source a third party might have fixed the bug themselves and posted the fix online somewhere
  3. Look through the code and fix this myself.

I ended up taking advantage of option number 2. I remembered my friend Evan Wise had discovered this bug also and he chose option 3 and fixed the problem himself. He posted a fix for the bug on his website and also posted the fix on the Drupal site for the module maintainer and for any others that might want the fix ASAP. It turns out it's a simple code fix that adds a DISTINCT to the SQL.

This is one of the major benefits of open source software. It's a distributed and collaborative effort to improve the integrity and quality of software. You can benefit from the hard work of others and contribute back to that community. This environment not only benefits end users but it can benefit companies that leverage the software or build on top of it.