Fork me on GitHub
Subscribe 3

Ticket #258 (fixed bug)

Unable to fetch ban list

  • Created: 2011-01-26 23:54:28
  • Reported by: taylorchu
  • Assigned to: Reines
  • Milestone: 1.4.4
  • Component: search
  • Priority: normal

when you search for ban, it shows:

An error was encountered
Error: Unable to fetch ban list.

History

Franz 2011-01-27 08:25:34

  • Priority changed from high to normal.

Which version? What exactly did you search for?

Franz 2011-01-27 08:27:18

Plus, it would help if you enabled debug mode and displayed the query:

define('PUN_DEBUG', 1);
define('PUN_SHOW_QUERIES', 1);

Reines 2011-01-27 12:04:08

  • Milestone set to 1.4.4.

Which DBMS are you using, also, do you have any mods installed? I can't seem to replicate this here at least.

taylorchu 2011-01-29 00:57:07

fluxbb 1.4.4 git master + sqlite2

taylorchu 2011-01-29 01:01:00

File: /home/www/tailinchu.tk/bbs/admin_bans.php
Line: 399

FluxBB reported: Unable to fetch ban list 

Database reported: SQL logic error or missing database (Errno: 1) 

Failed query: SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, b.ban_creator, u.username AS ban_creator_username FROM bans AS b LEFT JOIN users AS u ON b.ban_creator=u.id WHERE b.id>0 ORDER BY username ASC LIMIT 0, 50


LINE 399

    $result = $db->query('SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, b.ban_creator, u.username AS ban_creator_username FROM '.$db->prefix.'bans AS b LEFT JOIN '.$db->prefix.'users AS u ON b.ban_creator=u.id WHERE b.id>0'.(!empty($conditions) ? ' AND '.implode(' AND ', $conditions) : '').' ORDER BY '.$db->escape($order_by).' '.$db->escape($direction).' LIMIT '.$start_from.', 50') or error('Unable to fetch ban list', __FILE__, __LINE__, $db->error());

Reines 2011-01-29 10:17:45

Commit 4e769a5 to fluxbb master

Fixing a SQL error when using SQLite on the admin bans page, spotted by taylorchu. #258

Reines 2011-01-29 10:18:23

  • Owner set to Reines.
  • Status changed from open to fixed.

Thanks, I've commit a fix.