Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-01-24 13:01:50

reinharw
Member
Registered: 2013-04-19
Posts: 32

Search on Safari

Has anyone else experienced the search function working perfectly on IE and Chrome but NOT working on Safari, specifically Safari on the iPad?  Any feedback or suggestions would be appreciated.

Offline

#2 2015-01-24 13:05:51

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search on Safari

Can you elaborate?

Offline

#3 2015-01-25 16:26:26

reinharw
Member
Registered: 2013-04-19
Posts: 32

Re: Search on Safari

Sure.  I'm designing my website (www.williphotos.com) with CE4.  I have included a search function which is working perfectly with Internet Explorer and Chrome on a PC.  I tried the same searches on my iPad and iPhone using Safari.  Neither returned any results.  I thought the problem might be Safari so I tried the searches on a Mac Pro and again, as on the PC with IE and Chrome, everything worked fine.

My conclusion is that the problem isn't Safari but maybe IOS.

Any ideas?

Thanks.

Offline

#4 2015-01-25 18:19:39

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search on Safari

Thanks for the further explanation.  This has arisen from optimisations for search in Publisher 2.2.0.
Previously, the search results were held between page views, so that if you returned to search/ the old results would still be there.
The new version clears the results if there is no q=searchTerm paramater.  The mobile redirect is losing the parameter and therefore losing the search results.

I'll need to look further into this to find a good solution.    For now, the problem can be avoided by changing a single line in the file template_index.php within the template used by search.

From this:

window.location.replace('mobile.php'); }

To this:

window.location.replace('mobile.php<?php echo $_SERVER['QUERY_STRING'] ? '?'.$_SERVER['QUERY_STRING'] : ''; ?>'); }

That just passes the search parameter to mobile.php during the redirect.

Offline

#5 2015-01-26 00:30:55

reinharw
Member
Registered: 2013-04-19
Posts: 32

Re: Search on Safari

Ben - I'll give what you suggest a try and thanks for the help.  I appreciate it.

Offline

#6 2015-01-26 00:52:51

reinharw
Member
Registered: 2013-04-19
Posts: 32

Re: Search on Safari

Ben - another quick question regarding your suggestion.  I'm a bit confused where and which file you're suggesting changing.  You indicate changing my search template_index.php.  In my search folder I only see 3 files; index.php, lib.php, and mobile.php.  I looked in the index.php file and didn't see the line you suggested changing so I'm confident I'm looking at the wrong file.  Can you help point me to the correct one?  Thanks.  Bill

Offline

#7 2015-01-26 01:00:26

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Search on Safari

the search template_index.php file is the template_index.php file for the gallery export you're using for Search.

In the ttg-be Publisher set up you choose a template to use for Search. This is the search template Ben is referring to.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#8 2015-01-26 02:41:43

reinharw
Member
Registered: 2013-04-19
Posts: 32

Re: Search on Safari

Ron & Ben - Got it.  I found the file you were referring to and made the change. All searches now seem to be working now on my iPad and iPhone on Safari.  Thanks.

Offline

#9 2015-02-13 19:07:36

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Search on Safari

This has been fixed with the latest update to Gallery.  Any newly-created templates used by Publisher should now correctly work with the mobile redirect.

Offline

Board footer

Powered by FluxBB