Download & Extend

Panels does not hide an empty mini panel

Project:Panels
Version:7.x-3.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I set out to reproduce the problem of a mini panel being included when it's empty. I am using the most recent dev's of panels and ctools.

In my panels display I have a mini panel that has no content in it and no title.
screenshot: http://www.diigo.com/item/image/1ks4o/gqb8?size=o
export: http://pastebin.com/7ArS97wt

I add that mini panel to the panel layout and choose to override the title.
screenshot: http://www.diigo.com/item/image/1ks4o/68pq?size=o


This is the mini panel's output on the page.

<div class=?"panel-pane pane-panels-mini pane-blank-mini-panel">?<div class="panel-pane pane-panels-mini pane-blank-mini-panel">
<div class="pane-content">
<div class="panel-display panel-1col clearfix" id="mini-panel-blank_mini_panel">
<div class="panel-panel panel-col">
<div></div>
</div>
</div>
</div>
</div>

*There appears to be a missing closing div


If I choose not to override the title, this is the mini panel's output on the page.
<div class="panel-pane pane-panels-mini pane-blank-mini-panel">
<div class="pane-content">
<div class="panel-display panel-1col clearfix" id="mini-panel-blank_mini_panel">
<div class="panel-panel panel-col">
<div></div>
</div>
</div>
</div>
</div>



REF: #400332: Hide mini panels when empty
REF: #1367154: Empty mini-panels does not hide when title being overridden.

Comments

#1

Status:active» closed (duplicate)

Really you just duplicated an issue that you referenced, and my response is here: http://drupal.org/node/400332#comment-2219542

I could type it again, but that doesn't serve anybody's interests.

#2

I take it back, it does serve:

Panel layouts are not smart enough to hide if there are no visible panes. It's not part of the layout system to do that. Unless a specific layout were to be smart enough to do that (it's possible with a preprocess), that is.

#3

Thanks for responding Merlin. I opened up a new issue because of Letharion's comment in #26 "@R.hendel Thanks for clearly describing the problem. Again, this issue contains to many loose ends. New issue based on #23 here: #1367154: Empty mini-panels does not hide when title being overridden.. Closing this one, hoping I can get rid of it."

I was a bit confused about why it was closed if there were still "many loose ends" but I figured Letharion wanted to split the issue off into more targeted discussions.

I remembered the comment your referencing, but you later re-opened the issue and followed it up with "Re-opening. With the new render pipeline, I think this is much more possible now. We could slide a check into panels_renderer_standard::render_layout() and set a flag on the display (or renderer) to abort the rendering if there is no rendered content at all." So I figured that this was indeed possible and I was hoping to help in any way I could.

#4

Category:bug report» feature request
Status:closed (duplicate)» active

Hm. I had forgotten saying that.

In that case, not a bug, but a feature request.

#5

In response to #3, yeah, I just wanted to close an issue that had no clear instructions for how to reproduce the error, and probably contained several different errors in itself. More targeted was indeed the goal, like this one :)

@merlinofchaos, that missing does look like a bug, though, right?

nobody click here