Hello,
first VERY GREAT module, thanks

just litle thing :
When i rewrite a node refer field, if the field is empty, there is rewrite result.
i check "hide if empty"

Cyrille

CommentFileSizeAuthor
#2 screenshot.png30.71 KBmiprof

Comments

drunken monkey’s picture

And what is the output that is rewritten, an empty string?
What is the module offering node references?

In principal, the Search API uses Views' default field handler for providing the "rewrite output" and "hide if empty" options, so things should work normally. (If the module providing the node reference field returns correct data.)

miprof’s picture

StatusFileSize
new30.71 KB

ok, more simple screenshot,

you can see the third line, there is no result, but we can display a star !!

Cyrille

drunken monkey’s picture

Looked into this, but it seems this is the fault of the basic Views field handler (from which the Search API field handlers inherit) which first applies the alteration and only afterwards checks for the "Hide if empty" option and for whether the field is empty. I have no idea why it works the right way for base tables provided by Views itself.
You could either create an issue in the Views queue for fixing this, or you can wait for #1089758: Make use of new flexibility for Views field handlers and see if that fixes it. (Or, rather, after that is done I could more easily just fix it on my own.)

miprof’s picture

thanks for reply.

Thanks again for your module and your spent time.

drunken monkey’s picture

Title: Problem with node refer result » "Hide if empty" doesn't work with field rewrite
drunken monkey’s picture

Status: Active » Closed (won't fix)