Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
rgf100 Posted March 25, 2019 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'.
Daniel F Posted March 25, 2019 Posted March 25, 2019 Are you using elastic search? Have you tried to rebuild the search index?
rgf100 Posted March 25, 2019 Author 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...
Daniel F Posted March 25, 2019 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.