How is it possible to show the user that no results were found ? Currently, is shows a blank page, no results.

Thanks for the help,
Phil

Comments

alexkessler’s picture

Go to Administer / Site building / views.

Select 'edit' views_fastsearch.

Under page you will found a option 'empty text'.

This text will only be displayed if a view returns no nodes or in this case no search result!

alex

doc2@drupalfr.org’s picture

Status: Active » Closed (fixed)

Oups, I shouldn't have close this...

The problem of this method is that the "no results" message is displayed as soon as the view shows up, while no search has yet been made...

Any workaround?

doc2@drupalfr.org’s picture

Status: Closed (fixed) » Active
douggreen’s picture

@doc2, I presume that you're referring to a standard view with an exposed filter, and that the "no results" message displays on the view page before any exposed filter options have been submitted. I haven't setup a test case for this, but don't think that I've seen this problem before. Could you please elaborate on exactly what you're doing. What options are you using for the "search" filter in the view.

doc2@drupalfr.org’s picture

Hi Doug,

This is as simple as what you wrote:

referring to a standard view with an exposed filter, and that the "no results" message displays on the view page before any exposed filter options have been submitted.

Actually, I get the problem with the default search/fast view cloned with just an added "no result" empty text.

You said:

I haven't setup a test case for this, but don't think that I've seen this problem before.

I don't think this is an isolated case (drupalers, anything to say?!)

Thus, considering the need for a "no result" message in case of "no result" only, that is to say the case for any fastsearch view with a "no result" empty text, is there just a simple view setting to make that I missed?

About

Could you please elaborate on exactly what you're doing. What options are you using for the "search" filter in the view.

I get the problem both on a cloned default view of fastsearch and on a custom view using the fastsearch view_field. This is independent from my other post. Yet it is still effectively assigned to the 5.x-1.x-dev version.

I'll try the 5.x-2.x-dev version but I don't feel confident as there are no public release notes or any other kind of info about it...

pepemty’s picture

Hello all!

I have this exact problem. Any advance here? Any workaround, please?

José

eliza411’s picture

I work around this by evaluating the URL to see if a search has been performed. In the empty text, change the Input type to PHP and do the following:

<?php 
if('/view/url/whenempty' === request_uri()) { 
return; 
} else { ?>
<p>Your search did not return any results.</p>
 <?php } ?>
pomliane’s picture

Status: Active » Closed (won't fix)

This version of Views Fast Search is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.