Skip Navigation

[Resolved] Impossible to launch search on mobile

This support ticket is created 3 years, 9 months 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+01:00)

This topic contains 20 replies, has 2 voices.

Last updated by romanB-3 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1687051

Hi,
I have a view with filters and search auto launch after one filter have been changed.
It works more or less good on desktop, but not at all on mobile ; it's impossible to launch search on a smartphone.
Thank you.

#1687397

Jamal
Supporter

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

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

Hello and thank you for contacting the Toolset support.

To better assist with this issue, I'll need to take a closer look at that view and check why this is happening.

What page/URL can we see the issue in?

If you would agree to allow me temporary access to your admin area, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

#1687593

Jamal
Supporter

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

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

Sorry for the French reply.
I was able to reproduce the issue on my mobile and on the browser mobile simulator. I'll investigate this issue today and get back to as soon as possible. I might need to take a copy of your website for further local analysis. Let me know if that's ok with you.

#1690197

Jamal
Supporter

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

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

I suspect that a compatibility conflict is causing this issue on your website, I'll need to test it with a default theme and only Toolset plugins. As this is a live site, would it be possible for you to have a staging site or to provide a Duplicator copy of your website so I can analyze it locally?

#1690461

Please feel free to edit the site while testing; just don't forget to restore it afterwards please.

#1691581

Jamal
Supporter

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

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

I am still working on this issue as it turns out to be hard to debug. The issue is randomly reproduced on your website and on my local copy. Some times it is not reproduced at all.

I suspect that it came from how Select2 is loaded because when the filter does not work, we can see a Javascript error about select2 function missing.
Select2 is defined on the child theme functions.php at lines 47-52. I suggest to change lines 49-50 from:

  wp_enqueue_style('select2style', '//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css'); 
  wp_enqueue_script('select2script','//cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js');

To:

  wp_enqueue_style('select2style', '//wp-content/plugins/types/vendor/toolset/toolset-common/res/lib/select2/select2.css'); 
  wp_enqueue_script('select2script','//wp-content/plugins/types/vendor/toolset/toolset-common/res/lib/select2/select2.min.js');
#1691659

Thank you very much; that solved the problem!
My issue is resolved now. Thank you!

#1691719

Ouch, it worked for mobile but broke the codes to load select2.
Now the selects are all mixed up.

#1691845

Jamal
Supporter

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

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

I can see the issue. This means that there is a difference between Select2 that was loaded before and Select2 from Toolset plugin. I tried locally to copy the files from Cloudflare CDN to the child theme folder and it worked.

I then uploaded the files to your site in the child theme folder. Just add modify the lines with the following code and it should work:

    wp_enqueue_style('select2style', get_stylesheet_directory_uri() . '/select2.min.css'); 
    wp_enqueue_script('select2script',get_stylesheet_directory_uri() . '/select2.min.js');
#1691863

Ouch ; now I got the same problem as initial ticket subject. On mobile it's impossible to lauch the search...

#1691865

Ouch ; now I got the same problem as initial ticket subject. On mobile it's impossible to launch the search...

#1692721

Jamal
Supporter

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

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

I just tried again with my mobile phone and with the browser simulator and it seems to work.

This is a very weird issue, as it appears and disappears randomly.

Can you try again from your side?

#1692725

Multiselects work great; but the search field doesn't. On my side, I never could make it work if select2 is enabled.

#1692957

Jamal
Supporter

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

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

When we try the search box, it just stuck there without loading any results or returning an error. When we check the network traffic, it turns out that the search request returns a 307 response code(307 Temporary Redirect). This kind of error is usually tight to the server configuration. In fact, I do not get this error on the local copy that I have.

To confirm that, I created another installation on our online platform and I hoped you will migrate your website on it. Then check if the issue is reproduced on our server or not. Please follow the steps on my previous private reply() to migrate your website.

#1693219

Hi,
I'm not sure where to find your message about migrating.
But please feel free to migrate yourself with duplicator or any other plugin.
Thanbk you.

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