Keep search query when search returns no results

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
dhruv.goel92
Registered User
Posts: 22
Joined: Sun Mar 18, 2012 9:30 pm

Keep search query when search returns no results

Post by dhruv.goel92 »

Currently when No results are found for a search query, trigger_error function is called which results in search box being empty.
The search box in my opinion should contain the keywords even if no results were found.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: [RFC] Keep search query when search returns no results

Post by naderman »

Yup, I agree. Don't think there's much need for an RFC for this, I'll move it to discussion. Just create a ticket and implement it :)

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: Keep search query when search returns no results

Post by bantu »

Absolutely.

dhruv.goel92
Registered User
Posts: 22
Joined: Sun Mar 18, 2012 9:30 pm

Re: Keep search query when search returns no results

Post by dhruv.goel92 »

What should be the correct thing to do in case user tries to go to a result page which doesn't exist by changing start = parameter in the link,
an error like - "This Search Result Page is not valid" ? or maybe redirection to the last result page?

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Berlin, Germany
Contact:

Re: Keep search query when search returns no results

Post by naderman »

I would go with the error.

Senky
Extension Customisations
Extension Customisations
Posts: 315
Joined: Thu Jul 16, 2009 4:41 pm

Re: Keep search query when search returns no results

Post by Senky »

Error is better IMO - otherwise they can be confused.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: Keep search query when search returns no results

Post by Oleg »

The problem with error return there is the user did nothing to provoke the error - search result set changed under the user, probably without any actions on user's part.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: Keep search query when search returns no results

Post by DavidIQ »

Looks to me like the question is if the user messes around with the query string what should the result be:
dhruv.goel92 wrote:What should be the correct thing to do in case user tries to go to a result page which doesn't exist by changing start = parameter in the link,
an error like - "This Search Result Page is not valid" ? or maybe redirection to the last result page?
So yes, the user did provoke the error and error message should be shown.
Image

User avatar
bantu
3.0 Release Manager
3.0 Release Manager
Posts: 557
Joined: Thu Sep 07, 2006 11:22 am
Location: Karlsruhe, Germany
Contact:

Re: Keep search query when search returns no results

Post by bantu »

DavidIQ wrote:Looks to me like the question is if the user messes around with the query string what should the result be:
dhruv.goel92 wrote:What should be the correct thing to do in case user tries to go to a result page which doesn't exist by changing start = parameter in the link,
an error like - "This Search Result Page is not valid" ? or maybe redirection to the last result page?
So yes, the user did provoke the error and error message should be shown.
No.

Oleg's concern is as follows:
1. User searches and finds 2 pages of search results.
2. Moderator deletes a few posts. The search index changes.
3. User navigates to the second pages and gets the error (unprovoked).

dhruv.goel92
Registered User
Posts: 22
Joined: Sun Mar 18, 2012 9:30 pm

Re: Keep search query when search returns no results

Post by dhruv.goel92 »

We can in that case display a link to the last page perhaps with the error something like " This page was not found/deleted" Click Here to go back to page 1 ?

Post Reply