Loading...
 
Features / Usability

Features / Usability


Searching problem...works in one place, not in another

posts: 1

Hi,

I'm very new to tikiwiki, having just installed it. I have created a few test pages and everything seems to be working fine EXCEPT the search capability.

There is a search link in the left column menu of the default installation, and clicking this link takes you to a page named: tiki-searchindex.php

Searching from that page for words that are in the test pages ALWAYS returns 0 results.

But there is also a search box at the top of the page. When I enter the SAME words in THAT search box it finds all the words and returns a list of the pages perfectly. The page that is returned is named: tiki-searchresults.php

If I enter that page name directly in my URL bar and search from there, I get the same good results.

Can anyone explain the difference between these 2 pages and why one works and the other does not? And maybe gimme a clue as to how to fix it?

I'm using a 2.2 installation btw.

posts: 838 United Kingdom

This looks like a bug - I've never noticed this before since I always use the Search box module. Checking an old 1.9.x site I have doesn't seem to have this problem so perhaps some recent changes have introduced this error.

When you use the Search box module you fill in the form and the form 'action' is to run tiki-searchresults.php

The Search link in the column menu (as you say) goes to tiki-searchindex.php - which doesn't seem to work. Having had a 'failed' search you are however now at tiki-searchresults.php so subsequent searches work fine.

A crude workaround would be to change the menu link to go to tiki-searchresults.php - which would give a null search result when the screen first shows but wouldn't give a false impression of no results. There may be a better workaround once I've thought about it some more or perhaps others can suggest alternatives? Meanwhile I'll log it as a bug.

Well spotted smile

posts: 1

My solution was to modify the template for tiki-searchindex.php:

/tikiwiki/templates/tiki-searchindex.tpl

To match the form action of the Search box:

Original line 16:
form class="forms" method="get" action="tiki-searchindex.php"

Modified line 16:
form class="forms" method="get" action="tiki-searchresults.php"

This appears transparent to the user.

Not sure if it was necessary or not but I cleared the template cache as well.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting