The moderation block does not show the number of items in queue.
I get a bunch of php type errors in the log related to this.

CommentFileSizeAuthor
patch_84.txt862 bytesrobin t

Comments

robin t’s picture

Title: SQL error in query to get @ posts in queue » SQL error in query to get # posts in queue
pwolanin’s picture

Well, I'm not sure why the change you suggest would make any difference - what database server are you using?

Of course, there is no reason to order when doing the count, so this is a good change.

pwolanin’s picture

Status: Reviewed & tested by the community » Fixed

committed to 5.x and HEAD

robin t’s picture

I'm using postgres. I get a feeling that it might work in mysql?

The syntax is wrong: you cannot sort by something when using an aggregate function without also grouping.

# SELECT COUNT(*) FROM node n WHERE n.status = 1 AND n.moderate = 1 ORDER BY n.changed DESC;
ERROR: column "n.changed" must appear in the GROUP BY clause or be used in an aggregate function
# SELECT COUNT(*) FROM node n WHERE n.status = 1 AND n.moderate = 1;
count
-------
0
(1 row)

And yes, in this case it is unnecessary to sort.

pwolanin’s picture

Status: Fixed » Closed (fixed)