In the attached screen shot, you can see there are two extra tabs with no content or title in the last two tabs. The first three render correctly and are the only three present when the IPE is off. However two more show up as blank tabs.
I also included a dpm() of the panes that are being rendered. You can see two empty placeholder panes that IPE adds to preform it's magic.
This done on sites/all/modules/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php, lines 101 and 104 (of 3.7)
<?php
100 // Wrap the placeholder in some guaranteed markup.
101 $panes['empty_placeholder'] = '<div class="panels-ipe-placeholder panels-ipe-on panels-ipe-portlet-marker panels-ipe-portlet-static">' . $empty_ph . "</div>";
102
103 // Generate this region's add new pane button. FIXME waaaaay too hardcoded
104 $panes['add_button'] = theme('panels_ipe_add_pane_button', $region_id, $this->display, $this);
?>
Now, I feel like this is wrong that Sam is adding panes when they are not really panes. The easy answer doesn't seem to work:
100 // Wrap the placeholder in some guaranteed markup.
101 //$panes['empty_placeholder'] = '<div class="panels-ipe-placeholder panels-ipe-on panels-ipe-portlet-marker panels-ipe-portlet-static">' . $empty_ph . "</div>";
102
103 // Generate this region's add new pane button. FIXME waaaaay too hardcoded
104 //$panes['add_button'] = theme('panels_ipe_add_pane_button', $region_id, $this->display, $this);
105
106 $output = parent::render_region($region_id, $panes);
108
109 $output .= '<div class="panels-ipe-placeholder panels-ipe-on panels-ipe-portlet-marker panels-ipe-portlet-static">' . $empty_ph . "</div>";
110 $output .= theme('panels_ipe_add_pane_button', $region_id, $this->display, $this);
111
112 $output = theme('panels_ipe_region_wrapper', $output, $region_id, $this->display);
Anyway, it'll be easy enough to patch panels_tabs to just render those panes with numeric pane ids, but that's not entirely correct either. I'll post an issue with the panel_ipe that this is screwing with things that expect real panels.
Patch forthcoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | panels-ipe-extra-tabs-923712-5-7.x-2.x-dev.patch | 984 bytes | danmuzyka |
| #1 | panels_tabs-923712.patch | 722 bytes | jonskulski |
| #1 | panels_tabs-923712-2.patch | 865 bytes | jonskulski |
| Welcome to the Inceptum | Here we stand and here we are - Mozilla Firefox_018.png | 151.12 KB | jonskulski |
Comments
Comment #1
jonskulski commentedWell here was my first attempt. I realize that it doesn't render the extra panes that IPE uses to allow users to add new panes to the panel are not rendered.
You _could_ do something like my second patch, but you'll see quickly that things are very broken (panes added are added twice, adding a pane and moving it causes the duplicate pane to start moving as well) and even if they were fixed. Panels Tabs don't really fit into the gestalt of the IPE. E.g. you can't move one pane from one tab to another.
My recommendation is to cause IPE to not work on panel panes (e.g. the first patch, don't render the IPE controllers), keep this issue open and let's talk to Sam about possible solutions.
Comment #2
jonskulski commentedHere is the issue I opened with panels: http://drupal.org/node/923720
Comment #3
smoothify commentedJon, Thanks for reporting this so thoroughly and for your patches.
I haven't looked into IPE much yet, so I hadn't noticed this issue. I will follow the issue on the panels queue and see what Sam's response is.
Thanks again
Comment #4
smoothify commentedComment #5
danmuzyka commentedHere's a patch I created that seems to fix the issue for me in the 7.x-2.x branch.