rgf100 Posted March 25, 2019 Share Posted March 25, 2019 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'. Link to comment Share on other sites More sharing options...
Daniel F Posted March 25, 2019 Share Posted March 25, 2019 Are you using elastic search? Have you tried to rebuild the search index? Link to comment Share on other sites More sharing options...
rgf100 Posted March 25, 2019 Author Share Posted March 25, 2019 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... Link to comment Share on other sites More sharing options...
Daniel F Posted March 25, 2019 Share Posted March 25, 2019 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.