In the admin/config/content/panelizer screen I have enabled "Allow panel choice" and defined several choices for my content type Default. When I click the "list" link I can see my list of default panels. If I try to delete one of these via the Operations drop-down, I get the following error:

Fatal error: __clone method called on non-object in /opt/development/mpotter/drupal/sites/all/modules/contrib/panelizer/plugins/export_ui/panelizer_defaults_ui.class.php on line 104

Comments

merlinofchaos’s picture

Status: Active » Fixed

Good catch! I introduced a bug in there yesterday. I pushed a fix just now.

Status: Fixed » Closed (fixed)

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

fadgadget’s picture

hello forgive my ignornce but where would i find this fix? Ive had a look on the pending patches but nothing there. Thanks

merlinofchaos’s picture

I directly committed it to git. Any version published after the date I said I committed it will contain it.

andi-d’s picture

Status: Closed (fixed) » Needs work

The Bug still exist in Version 7.x-3.x-dev from May 25.

I have a Full Pager Override from a Taxonomy.

When I try to delete one of my default panels I get this error message.

[Wed Jun 19 15:49:00 2013] [error] [client 127.0.0.1] PHP Fatal error: __clone method called on non-object in /modules/panelizer/plugins/export_ui/panelizer_defaults_ui.class.php on line 104

This is the same bug as described in #1 and still applies to the current version.

dagomar’s picture

Issue summary: View changes
Status: Needs work » Active

This bug is still persistent. I saw the fix in the commit log, but the problem persists.

[Edit]

I have this bug, BUT it happens on a Vocabulary and User panels, NOT on a Content type.

gable’s picture

@merlinofchaos

I've still got this error in Panelizer 7.x-3.1. Where did you fix it? Please write some details. Was the error correction here, in function delete_page or somewhere else? I've even tried to analyse your commits and find solution, but I couldn't.

dagomar’s picture

@gable

I'd recommend trying a dev version first to see if the problem persists. If you are trying to work with taxonomy or user pages, the bug is still not fixed. As far as I know it is only fixed for nodes.

uzlov’s picture

StatusFileSize
new551 bytes

fixed issue with clone, export, delete of panels templates for taxonomy terms
issue in not correct loading of page arguments
*can be fixed in the same for user entity

damienmckenna’s picture

Status: Active » Postponed (maintainer needs more info)

Please check the latest dev release, I just ran through the process of cloning the default display for a vocabulary view mode and deleted it again, all without any problems.

damienmckenna’s picture

PS, the patch is incorrect anyway, the admin path for modifying a vocabulary is "admin/structure/taxonomy/[vocabularyname]", not "admin/structure/taxonomy/manage/[vocabularyname]".

uzlov’s picture

StatusFileSize
new8.88 KB

removed incorrect way (with changing of the admin path for modifying a vocabulary)

issue not only in clone of default display
issue with almost all ui_menu - export, clone, delete, disable of taxonomy (and I'm sure - the same issue for user entity)
fixed in bad way( overiden for taxonomy public function add_admin_links

fix of issue
+ if ($key == 'export' || $key == 'delete' || $key == 'clone' || $key == 'disable') {
+ // Change page argument only for taxonomy term.
+ $ui_items[$key]['page arguments'][2] = 6;
+ }

+fixed not correct redirect after adding new "default" template

one more patch :)

dagomar’s picture

I just fired up a simplytest.me to check it out and I found that it does seem to work as expected for Taxonomy. However, for users its still broken.

m.lebedev’s picture

On dev version = "7.x-3.2-beta1+11-dev" from 2015-02-08

Fatal error: __clone method called on non-object in /sites/all/modules/panelizer/plugins/export_ui/panelizer_defaults_ui.class.php on line 122

patch not work.

Was performed a clean install of drupal. Panelizer turned on for node. I added panel choice . When I click delete panel choice, an error occurs.

m.lebedev’s picture

// Simplest way to override the drupal_goto from parent.
// Why isn't delete using the redirect system everything else is?
function delete_page($js, $input, $item) {
  $clone = clone($item);
  // Change the name into the title so the form shows the right value.
  // @todo file a bug against CTools to use admin title if available.
  $clone->name = $clone->title;
  ...
}

$Item - variable contains a string.
Expected value - the object.

damienmckenna’s picture

Status: Postponed (maintainer needs more info) » Active

@m.lebedev: Just to confirm it - were you using Overlay? What URL was the browser showing? How many displays were there when you selected to delete one?

m.lebedev’s picture

StatusFileSize
new27.59 KB
new51.38 KB
new76.87 KB

Hi DamienMcKenna,

Overlay off.

1. Panelizer settings
Panelizer settings

2. Panel choice
Panel choice

3. Delete choice
Delete choice

P.S.: Button to disable the panel choice too does not work.

damienmckenna’s picture

@m.lebedev: Thanks for providing those details, I've been able to reproduce the issue and will take a look at it.

m.lebedev’s picture

This is a big problem. I can not delete the configuration panel choice. I created a new version of the panel choice, and it does not work. As a result, I messed up the configuration of the view mode =(

damienmckenna’s picture

Can you please test the latest -dev release, I believe #2445769: Unable to clone a display may have fixed this.

damienmckenna’s picture

Status: Active » Fixed

Yep, I'm pretty certain #2445769: Unable to clone a display fixed this, but feel free to reopen if the problem persists.

m.lebedev’s picture

Yes, the problem is solved. everything works

damienmckenna’s picture

@m.lebedev: \o/

Status: Fixed » Closed (fixed)

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