Member
Member
Epsilon   2016-03-26, 03:35
#1

Hi

I have enabled the "mod rewrite" option under "Options > General > URL Options" and for he most part everything works as expected. Unfortunately enabling this option breaks my search.

I have assigned the tag "Test Tag" to a single album and 6 images.

When I search for "Test Tag" with "mod rewrite" enabled nothing will show. However, if I disable this option and search for "Test Tag" the album and 6 images show as intended.

I checked the debug log but there are no entries logged for today.

My site can be found here: southsmuseumofpostcards.nz

Any help with this would be greatly appreciated.

Administrator
Administrator
fretzl   2016-03-26, 11:22
#2

Try to "Purge search cache" on the [i]Admin > Overview[/i] page.
Also on [i]Admin > Options > Search[/i], set [i]Cache expiry[/i] to 0 (zero) for the time being.

Member
Member
Epsilon   2016-03-26, 20:58
#3

I have set the "cache expiry" option to 0 and enabled the "cacheManager" plugin, I then used the "purge search cache" option.

Unfortunately the search still returns no results.

I noticed the search works (even with mod_rewrite enabled) if I type the keywords into the URL manually, for example:

After submitting a search the URL is:
https://southsmuseumofpostcards.nz/page/search

The above returns no results. If I change the URL to this:
https://southsmuseumofpostcards.nz/page/search/%22test%20tag%22

The album and images are displayed.

I'm not sure if this will be helpful in finding out why my search isn't working but I thought I'd mention it just in case.

Administrator
Administrator
acrylian   2016-03-26, 21:48
#4

I think something might not be right on your site. I assume you have the correct 'htaccess' file and your server really supports modrewrite.

On using the search I shortly see the url https://southsmuseumofpostcards.nz/index.php?p=search before it switches to the actualy https://southsmuseumofpostcards.nz/page/search.
That's the correct url without modrewrite but if you have modrewrite this should never happen.

A few general things to try:

  • Disable https
  • Check the search field options
  • Try a official theme
  • check error logs
Member
Member
Epsilon   2016-03-26, 22:51
#5

Thank-you very much for your help, I found the problem and now the search works.

There was a problem with my search form's action which was still pointing to "index.php?p=search" even if "mod_rewrite" was enabled. I added a check to change the action depending on whether or not "mod_rewrite" is enabled and it now works as expected.

Thanks again for your help

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.