When the panels of a displays are saved using panels_display::panels_save_display(), newly added content with a key like 'new-n' is not removed correctly due to a wrongly used id. $id was used instead of $pid to delete the displays content. Please see attached diff.

Comments

mikl’s picture

Version: 7.x-3.3 » 7.x-3.x-dev
Status: Active » Reviewed & tested by the community

To expand on this, this bug manifests itself as causing Panes to be rendered twice, once you save your changes after working with Panels IPE.

So, if those Panes add JavaScript settings to the page, those will be added twice, and thanks to Drupal's habit of merging the arrays with jQuery.extend(), that means the settings will be duplicated, so otherwise scalar values will become arrays of identical strings, causing the JavaScript that reads it to explode. This patch fixes that :)

japerry’s picture

Status: Reviewed & tested by the community » Fixed

Yup, verified the issue with IPE and the patch fixes the nasty JS problem when you continue to edit panes.

Committed here:
http://drupalcode.org/project/panels.git/commit/2be964d

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit 2be964d on 7.x-3.x, 8.x-3.x by japerry:
    Issue #2172403 by adrip: Old display content is not unset correctly in...