It is necessary to add a check for a empty result in attached view. If after checking that the result we get the attached view has empty result, do not create a markup.

it would be really helpful when you use Field Group Module. If there was such a check, it would not create an empty tab, as is happening now because of that generated markup.

CommentFileSizeAuthor
Eva-Filed-View-Empty.png26.86 KBzombirus

Comments

zombirus’s picture

Status: Active » Needs work
zombirus’s picture

Title: doesnt create markup if Attached View is empty? » doesnt create markup if Attached View is empty
redndahead’s picture

Title: doesnt create markup if Attached View is empty » Do not create markup if Attached View is empty

After reading the request I think I have fixed the title to what you are actually looking for. Funny how Does not and Do not are two completely opposite things.

scotwith1t’s picture

Oh geez, this module is so awesome yet so sadly under-maintained... :(

So this affects a couple things based on what I'm experiencing at the moment. If you select to show the title, it shows no matter whether results are found or not. In particular, my view is a list of related records' using a contextual filter (not sure if that's relevant).
I tried getting around this by using the header instead and not showing unless there is a result, but alas the header markup is added regardless as well...bummer. Guess I'm stuck with a block display and views_embed_view in my template?

geek-merlin’s picture

Issue tags: +Novice

Yes this suggestion totally makes sense.

swhitters’s picture

I'm running into this issue as well. The EVA view is the only thing in the sidebar region, so it's populating the entire empty sidebar even when empty... which I'd like to avoid.

geek-merlin’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Assigned: zombirus » Unassigned
Status: Needs work » Active

"needs work" means ther is already a patch.
assigning yourself means you are actively working on it and provide a patch in some hours or days.

geek-merlin’s picture

@scotself #4:
> Oh geez, this module is so awesome yet so sadly under-maintained... :(

Maintaining means moderating, picking up, and committing contributions.
It may or may not include solving everybody's problems.
Feel free to code a patch or pay someone to do it for you.

scotwith1t’s picture

To be fair, at the time of my comment, it had been more than a year since any commits and more than a year since this issue was raised without any maintainer input/feedback. I'm sure things are much better now that you've jumped in :)

swhitters’s picture

If it helps anyone, I am using the View in a View Reference field on my content type and checking off "Do not output view if no rows are detected" (in field settings) solved my problem and prevented the view from making a block on the pages with empty views.

scotwith1t’s picture

https://www.drupal.org/project/viewreference sounds like a good potential alternative then. Thanks, I'll take a look at that.

geek-merlin’s picture

Category: Support request » Feature request
Status: Active » Postponed (maintainer needs more info)
Issue tags: -Novice

I also had that problem in D7 and it's really an annoyance.
Thought a bit abolut this. This issue needs a lot more information:
* What does empty *mean*? What render array is returned by Views / EVA and how does it render? Dependent on this we can decide which of the involved subsystems (at least EVA, VIews, Fieldgroup) should do what.

scotwith1t’s picture

IMHO, empty = no rows returned by the query.