Hi all,
Not sure if this is one for this forum or not but I am pretty desperate so thought I would ask the question!
Basically, I have a search function on my Home Page which enables the user to obtain results based on info in up to 8 fields of a collection. The results are shown in one of 5 pages (depending on which section the user decides to search in) using a repeater on each page and all has been working fantastically well since I got this up and running many months ago. It was working well earlier in the week when I was ‘showcasing’ what it offers to someone but then yesterday I noticed it was not providing the correct results - in all cases it appears to be simply showing the very first item from the relevant dataset collection.
I’m finding this ultra strange as I have done no maintenance to any of these pages since I got them up and running and have not touched any of the coding I have for them. I’ve done the following checks to try and ascertain where the problem lies:
-
I ran a test search earlier knowing that there are 10 results for the search I was doing and the result page showed up 10 results but all of them showing the data for the first item in the dataset.
-
Checked the dev console for any errors - none showing!
-
Added a console log to my code on the results page to check what results were being obtained using
console.log(`queryResults is ${JSON.stringify(queryResults)}`);
and found that it was returning all of the correct results but just not displaying them in the repeater, instead choosing to show the first item in the dataset collection over and over again!
- Because the code seems to be working correctly, I have tried removing the connections between the dataset and the repeater and then re-connecting them. I also deleted the dataset altogether from the page before reinstating it and re-connecting it to the repeater - neither of these changed the outcome!
The only other thing I have in my mind to try on top of the above is to literally rebuild the page in question but having to rebuild pages whenever there is a bug just doesn’t seem like an efficient way of website building to me.
I’m no expert on coding, but based on the tests I have conducted, I am pretty sure this is not a code issue but I thought I would post here in the hope that someone may have experienced something similar or can spot what the issue may be. It’s a really important feature of my site and one that is a bit unique in the market I am in and so without it, it may be costing me visitors
If anyone can offer any assistance as to why this is happening it would be appreciated