Really, really weird problem. So, I can’t get query results count to return a correct result. Here’s what’s happening:
I’ve got an old section template that contains a query. I copied the entire section to a fresh page, converted it into a component, and it runs - except the query results count always returns 0. No matter what I do, the results are zero:
Here’s the code for it:
Results vsisnb: {query_results_count:vsisnb}
Results 03b798: {query_results_count:03b798}
The vsisnb is the id of the new query. The query works, it returns results just fine and shows content.
However, the 03b798 is what the query was called before I copied it and converted it into a component - it is the query from a template that was never part of the page I’m working on. And yet, it displays the query results. (The template still exists among my templates, but it shouldn’t be loaded if its never been part of the page.)
So my thoughts are that there’s a mismatch somewhere, that the query itself thinks its got a different name from the name it displays. Either that, or there are gremlins that live inside my computer.
I can replicate the query_results_count issue showing 0 and have added it to the internal bug tracker. We will update this thread as soon as it is fixed.
It doesn’t matter whether the query is on the page or not—it exists anyway.
I thought my issue was fixed but it turns out it was not.
I can get the query count to work in one component instance but the count in all future components will count the query results of the first component. So the query count unfortunately is not correct in all others.
Hi @timmse,
could you give some insight here? It would come very handy if this issue would be fixed soon because it would make a current project much easier.