Jump to content

Odd results with setHiddenFilter


rgf100

Recommended Posts

Posted

I'm trying to get an approval queue count on the userbar. Part of this involves the following code:

$approvalQueueCount = \IPS\Content\Search\Query::init()->setHiddenFilter( \IPS\Content\Search\Query::HIDDEN_UNAPPROVED )->count();

As I understand it, this should return the number of as-yet unapproved content items and comments. For some reason which I cannot make sense of, this consistently returns a number 2 higher than what's actually in the queue.

I went hunting for phantom unapproved content. It's not status updates or replies. It's not blogs, or Pages databases, or gallery, or club, or anything else I can think of. And anyway, if it was any of those things, it should be appearing in the queue. 

Where's the extra 2 coming from? What code (I'm very much at the edge of my capabilities here) do I need to see what the above code is 'finding'. 

Posted

I am, and I'll try that now...

Ok, that's reset it to the correct value. Will see if it stays that way as indexing progresses...

Posted
13 minutes ago, rgf100 said:

I am, and I'll try that now...

Ok, that's reset it to the correct value. Will see if it stays that way as indexing progresses...

Great, thanks for the confirmation that this fixed it.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...