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.

Comments

jonskulski’s picture

Status: Active » Needs review
StatusFileSize
new865 bytes
new722 bytes

Well 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.

  • IPE shouldn't be adding arbitrary panes
  • IPE might want to announce that it's going in that mode so region style plugins have a chance to re render with a default renderer. I have a feeling that the IPE interacts poorly with other region style modules as well.
jonskulski’s picture

Here is the issue I opened with panels: http://drupal.org/node/923720

smoothify’s picture

Jon, 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

smoothify’s picture

Status: Needs review » Postponed (maintainer needs more info)
danmuzyka’s picture

Version: 6.x-1.0-rc5 » 7.x-2.x-dev
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new984 bytes

Here's a patch I created that seems to fix the issue for me in the 7.x-2.x branch.