Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Double search result and autocomplete on mobile
- This topic has 9 replies, 2 voices, and was last updated 3 years, 9 months ago by
Ernest Marcinko.
-
AuthorPosts
-
August 30, 2022 at 10:10 pm #39127
Jarek Wityk
ParticipantHello
Not sure what had happened but I think that I recently changed some setting and now when doing search on https://www.projectdesign.io/knowledgehub/
The first result appears twice – any Idea what can cause this?the second query I have is how to use the auto complete on mobile device? On desktop when I start typing the autocomplete works perfect and before finish typing I can just click on right arrow to accept the sugestion. But on mobile although the auto suggestions works, I am not sure how to select/accept the suggestion. Any advice on how should I use the function on mobile device would be great.
Thank you and have a great day.
Jarek
August 31, 2022 at 12:52 pm #39138Ernest Marcinko
KeymasterHi Jarek,
Thank you for the details!
I tried a few phrases, but everything seems to be okay on our ends: https://i.imgur.com/gLajgGS.png
Is there a specific phrase we can try?As for the mobile autocomplete – there is currently no way to finish them, it is more of a visual tool only. It will be reworked eventually for a drop-down style autocomplete, but we need to be careful with implementation, because the default search results are also working that way, and can very easily turn into a UI nightmare.
August 31, 2022 at 5:43 pm #39148Jarek Wityk
ParticipantYes looks like is not happening with all terms,
Please try searching for:
BIM
LeadI also attached screenshots
What do you think?
Regards
JarekSeptember 1, 2022 at 11:35 am #39158Ernest Marcinko
KeymasterOkay – I recall someone a few months ago had a very similar issue. Then we found, that he was using the wrong widget, as he wanted to filter an archive page – which is not possible.
Make sure, that you are using the search in combination with the Elementor Posts Widget (not the Posts Archive widget), and not on an Archive page (like category, taxonomy, tag etc.. archives, except for the actual search results page) via a custom template of some sort. Archive pages are very problematic, and will not work for most cases.September 1, 2022 at 11:10 pm #39176Jarek Wityk
ParticipantErnest
Thank you. I understood the Archive page is the one to go if you want to display all your posts, and I wanted to use your search to navigate through. I have used the Post Widget not the Posts Archive widget but I used it on Archive page.
So if I understand correctly I would have to create a Page and insert the Post Widget with Ajax search instead?
September 2, 2022 at 8:49 am #39179Jarek Wityk
ParticipantErnest
I created a new page as a test, and on the page added the post widget.
https://www.projectdesign.io/hub/
Here I have posts, on page and using past widget, and still have the same issue.It wasn’t like this before, it is something I changed in the settings but I don’t remember what …
Any ideas?
September 2, 2022 at 11:35 am #39181Ernest Marcinko
KeymasterThe proble is, that the search can not produce duplicate results at all, it is not possible. The query has a distinctive directive on the Post IDs, so there is no way for the databse to output the same item twice.
If you try the live search on the back-end, you can see that there are no duplicates, and these same results are “pushed” for Elementor to display. For example this filter agains the back-end.I feel like this might be some sort of a conflict within Elementor somewhere, something gets mixed up, but I can’t see why. My guess is, that maybe the custom template has something in relation with the problem.
Can you please try what happens, if you put this into an Elementor page, which does not use a custom template?
Also, can you please add temporary FTP access? I would love to debug the query itself, to see what exactly is going on.
September 3, 2022 at 10:55 am #39197Jarek Wityk
ParticipantYou cannot access this content.
September 6, 2022 at 8:01 pm #39221Jarek Wityk
ParticipantErnest
I found what was happening. When I had one post set as ‘sticky’ then search for any phrase which happened to be first term/phrase in the given category would appear twice. I guess the first instance instead of the sticky post and the second as the result of the search.
I now removed the ‘sticky’ option from my post re-indexed the page and everything works
Hopefully it makes sense ?
Please let me know if you coud fix it, so I can use the sticky option
Regards
Jarek
September 7, 2022 at 9:16 am #39225Ernest Marcinko
KeymasterOh thank you, that is fantastic to know.
Was this sticky option set within Elementor somewhere, or in WordPress, if I may ask? I would like to know for future references.
-
AuthorPosts
- You must be logged in to reply to this topic.