Little mistake in last drupal version (5.4) , in taxonomy.module, line 1271 :

$result = db_query_range($sql, 0, variable_get('feed_default_items', 10),$args);

should be

$result = db_query_range($sql, $args, 0, variable_get('feed_default_items', 10));
#2 db_query_range.patch752 bytesGábor Hojtsy
Members fund testing for the Drupal project. Drupal Association Learn more


hannesk’s picture

Thank You Very Much For This Solution!

I was struggling with this problem for hours now and this saved my day :)

Thank You

Best Regards


Gábor Hojtsy’s picture

Version: 5.4 » 5.x-dev
Status: Active » Reviewed & tested by the community
752 bytes

Committed this fix to Drupal 6. Will alert Niel Drumm, the Drupal 5 maintainer. Seems like we did not test this use case well, and introduced a bug here. Attached patch is RTBC for Drupal 5.’s picture

4.7 is patched

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 5.x.

chrisschaub’s picture

Ok, can somebody give the line that needs to be changed for 4.7.8? Just want to fix the broken line. Thanks.

jason342’s picture

So the only difference between 5.4 and 5.5 is that one line of code, and nothing else?

Heine’s picture

If you do not update, but just copy the two files, update status will no longer work for your site.

The change:

-      $result = db_query_range($sql, 0, variable_get('feed_default_items', 10), $args);
+      $result = db_query_range($sql, $args, 0, variable_get('feed_default_items', 10));

Please do not further divert this issue.

mercmobily’s picture


Quick question. I don't have time to upgrade right now.
What do you mean by:

"If you do not update, but just copy the two files, update status will no longer work for your site."

What update status?


Gábor Hojtsy’s picture

Update status is a contribtued module which helps you getting informed about available updates for your site.

karthik_admin’s picture

How to run the patch?

mercmobily’s picture


I am a Drupal developer, and yet I don't know the basics. Shame on me.

Thanks for the hint,


smikey’s picture

Version: 5.x-dev » 5.5
Status: Fixed » Active

Any chance of a hotfix for 5.5? Not great running patches as I'm not a dev. Thanks

Heine’s picture

Status: Active » Fixed

5.5 doesn't have this bug. A patch for 5.4 is on #2.

Heine’s picture

Version: 5.5 » 5.4

Restoring the version.

smikey’s picture

Thanks, Heine. I checked the module out, and 5.5 seems to be using the updated code. Anyone know why my Taxonomy module no longer shows up in my module list? Everything seemed to be working until I updated to version 5.5..

smikey’s picture

To answer my own question, the module is no longer in my Drupal db. What caused this, I have no idea. Thanks for your assistance on this.. :)

ron_mahon’s picture

Title: Taxonomy feed : Error in db_range_query arguments order » Taxonomy module & CCK
Version: 5.4 » 5.5

I am having trouble with the taxonomy and CCK lookup field.

These all worked before the 5.4 and then 5.5 update.
The filter selects the proper vocabulary but returns a empty data set.
It i select just a tax term it works fine except all the other vocabulary's are present also.

I installed it with version
"$Id: taxonomy.module,v 1.330.2.14 2007/12/06 18:16:38 drumm Exp $" and it works fine.

"$Id: taxonomy.module,v 1.330.2.11 2007/09/12 07:49:36 drumm Exp $" version is the one with the strange behavior.

I look for the section referenced above, it's not on line 1271

Hope you can help
Many thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

RobRoy’s picture

Title: Taxonomy module & CCK » Taxonomy feed : Error in db_range_query arguments order
Version: 5.5 » 5.4

Restoring correct title and version.