Skip Navigation

[Resolved] can not get the search results page to work

This thread is resolved. Here is a description of the problem and solution.

Problem:
Search was not working on mobile phones.

Solution:
The user was putting the search form and search results in Elementor templates. They are meant to be used in Regular pages instead of Elementor templates.

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 12 replies, has 2 voices.

Last updated by johnh-18 3 years ago.

Assisted by: Jamal.

Author
Posts
#2016183
Screenshot 2021-04-09 at 15.13.06.png
Screenshot 2021-04-09 at 15.13.02.png
Screenshot 2021-04-09 at 15.12.58.png
Screenshot 2021-04-09 at 15.12.51.png
Screenshot 2021-04-09 at 15.12.44.png
Screenshot 2021-04-09 at 15.12.34.png

Hi,

First of all, please be aware that you may have already received this request - I submitted an identical request in a chat earlier this afternoon but the page went down before I heard anything back. That request is not included in the list of previous tickets so not sure if the request actually was sent or not.

Tell us what you are trying to do?
I am creating a general search results page and have used the following page as a guide (Custom search in a widget)
https://toolset.com/documentation/legacy-features/views-plugin/front-page-filters/#vfmh-displaying-just-your-filter

I have attached screen shots of the view I have created

I have then used the following two short codes for the input form and the search results

[wpv-form-view name="search5" target_id="17191"]

[wpv-view name="search5" view_display="layout"]

The input form sits in the header section of the site and the id17191 is the search results page.

So far so good but the problem is that it does not work. I have tried all kinds of ways and either I get totally inaccurate search results or it simply redirects to the home page.

What am I doing wrong?

Is there any documentation that you are following?
https://toolset.com/documentation/legacy-features/views-plugin/front-page-filters/#vfmh-displaying-just-your-filter

Is there a similar example that we can see?

What is the link to your site?
hidden link

#2016329

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting the Toolset support.

I was logged into the chat today and I did not receive any chat session, I assume there was some server glitch at that time.

It seems to me that you have set up the shortcodes correctly. Let's exclude any possible conflict with another component of the site first. Please check if this issue appears when:
- Only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin.
- The theme is set to a WordPress default like Twenty-Twenty. It will tell us if there is an interaction issue with your theme.
If the problem disappears, start activating one at a time to track where the incompatibility is produced.

If this does not help, please allow me temporary access to your website to check this further. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#2018141

Hi Jamal,
It would be interesting to know what kind of results you get when doing a search as somehow I believe that there may be some kind of caching problem.
Even before I followed your advice and deactivated all plugins (except elementor as I can not see the search field when deactivating this plugin), the search generates good results on my computer but when trying other computers and devices the search does not work. Same thing when using another theme. I get good results on my computer (but only in one browser). I have cleared the cache but same problem.
If you want to have a look backstage, I created temporary login details
(credentials moved to private reply)
Please let me have your thoughts.
Have a nice day / jan

#2018259

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I confirm the credentials are working for me. Can you tell me where the view is used?
Can you also give an example of a test scenario when it returns wrong results?

#2018281
Screenshot 2021-04-12 at 13.39.35.png

Hi,
I made a brief video that shows where the view is used - let me know if this is OK or if you have any other questions.
hidden link
Re results, on all computers and devices I have tested it on, it currently simply redirects to the homepage.
I have also attached a screenshot that shows the result I get on my computer when doing a search for 'deciem' (which is a skin care brand we have featured on the site)
Please let me know if there is anything else you need.
Best regards / jan

#2018603

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello Jan, thank you for the screencast, but I still do not see what is the issue.

Searching using the keyword "deciem" returns the expected results. Check the results of the search in the backend hidden link

However, I see that you put the view inside the Elementor template for search results. The search results page does not have a special URL, it is always rendered in the homepage URL with URL parameters.

I am sorry, I am confused. Can you explain the issue is simple steps like:
1. I go to xxx
2. I do xxx
3. I expect to have xxx
4. Instead, I get xxx

#2019239
Screenshot 2021-04-13 at 10.01.13.jpg

Good morning Jamal,
Thank you for getting back to me.
Considering that you say that I am using the views coded correctly, I am beginning to think that this may be an Elementor issue rather than Toolset. As mentioned before, the search functionality worked on my machine but not this morning, I get search results but the results I get are not really relevant. Well, I get relevant results with lots of other stuff - see attachment (and the search URL)
Suggest that I check with Elementor to see what they say and depending on their response, I may get back to you. What do you think?
jan

#2019305

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello Jan

The posts that appear on the results with the keywords (cape town) do include these keywords("cape" or "town" or both). Check this screenshot for searching the same keywords in the admin area hidden link

I would say these results are expected.

In the meantime, I'll set this ticket as waiting for your feedback, which should keep it open for 3 weeks. You will receive an email notification before the system closes the ticket.

#2019327

Hmm, think you are right. But that does not explain why the search only works in my browser but not on any other computer or device. Appreciate you keeping it open - will keep you posted.
Best regards / jan

#2019783

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

I tested this on my Android mobile phone and I was able to see the issue, the search does not return any results, and the URL points to the homepage.

I don't believe this is an issue within Toolset. It is rather an issue in the integration with Elementor. I used the same view in two private pages to test it. You will need to be an administrator to see these pages or use the same user as I.
The search form resides here hidden link
And the search results are here hidden link
I tested it on my mobile phone and it works as expected. That's why I think that the integration is not done correctly.

The Toolset feature of splitting the search filters from the results of the view is meant to be used within WordPress regular pages. And you have tried to use it with an Elementor template instead of a regular page.

I believe that the Elementor template assigned to search results is meant to be used for the default WordPress search instead of a Toolset view. The default WordPress search can be customized with Toolset using an archive template, but in that case, you will need to use the default WordPress search input instead of filters from the archive template. Does it make sense?

Please check if having results on a separate page(Example: /search) is a viable solution for you. If yes, update the search form shortcode to point to that page's ID instead of the Elementor template ID.

I hope this helps. Let me know if you have any questions.

#2020375

Good morning Jamal,
Thank you for checking. I have not yet tried your idea of using a separate page but will certainly do. I agree with you, this is not a toolset issue so suggest that you close the ticket.
A final question - do you have an example where WordPress search has been customized with Toolset using an archive template? I will try to figure it out but if you have anything that may help, that would be ideal.
Thank you very much for all your help and assistance - much appreciated.
Have a nice day / jan

New threads created by Jamal and linked to this one are listed below:

https://toolset.com/forums/topic/how-to-create-an-archive-to-customize-search-results/

#2023173

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello Jan and thank you for your feedback. However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created another ticket to answer your last question. I'll be posting my replies there.

#2023231

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.