On the latest distro I get this error when trying to clone a panel variant:

Fatal error: Call to undefined method panels_display::clone_pane() in /var/www/html/sitename/profiles/wetkit/modules/contrib/panels/panels.module on line 804

In looking at the code, it indeed looks like the function is missing... it used to be just under duplicate_pane:

691
692 function duplicate_pane($pid, $location = FALSE) {
693 $pane = $this->clone_pane($pid);
694 $this->add_pane($pane, $location);
695 }
696
697 function clone_pane($pid) {
698 $pane = clone $this->content[$pid];
699 $pane->uuid = ctools_uuid_generate();
700 return $pane;
701 }
702
703 /**
704 * Clones the whole display and takes care of creating new uuids.
705 *
706 * @return panels_display
707 */
708 public function clone_display() {
709 $clone = clone $this;
710 if (!empty($clone->content)) {
711 // Iterate over all panes and clone them.
712 foreach ($clone->content as $pane) {
713 if (isset($pane->uuid)) {
714 $location = $pane->panel;
715 $pid = $pane->pid;
716 $clone->duplicate_pane($pid);
717 $key = array_search($pid, $clone->panels[$location]);
718 // Remove the old version.
719 unset($clone->panels[$location][$key], $clone->content[$pid]);
720 }
721 }
722 }

It looks like something introduced in panels upstream and not wetkit specific.

Comments

joel_osc created an issue. See original summary.

sylus’s picture

It looks like in this commit clone_pane got removed...

http://cgit.drupalcode.org/panels/commit/?id=f400a1d0d025262d05d497cf326...

sylus’s picture

I'm pretty annoyed there was no QA on this in panels and functionality got removed in what is supposed to be a stable release. Created an associated issue.

sylus’s picture

Status: Active » Fixed

Committed the patch for now to latest dev. Thanks a bunch!

Status: Fixed » Closed (fixed)

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