I am getting this error when cloning a variant. I was using 7-x-3.1. I upgraded to 7.x-3.2-beta1 but didn't resolve the issue.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'site_template__frontpage' for key 'name': INSERT INTO {page_manager_handlers} (name, task, subtask, handler, weight, conf) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => site_template__frontpage [:db_insert_placeholder_1] => site_template [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => panel_context [:db_insert_placeholder_4] => 2 [:db_insert_placeholder_5] => a:12:{s:5:"title";s:7:"Others2";s:9:"no_blocks";i:0;s:8:"pipeline";s:8:"standard";s:22:"body_classes_to_remove";s:0:"";s:19:"body_classes_to_add";s:0:"";s:6:"css_id";s:0:"";s:3:"css";s:0:"";s:8:"contexts";a:0:{}s:13:"relationships";a:0:{}s:4:"name";s:9:"frontpage";s:6:"access";a:2:{s:7:"plugins";a:0:{}s:5:"logic";s:3:"and";}s:3:"did";s:2:"27";} ) in drupal_write_record() (line 7239 of /_website/includes/common.inc).

Any idea?

Comments

DamienMcKenna’s picture

That's completely weird because "site_template" things are from Panels Everywhere, not Panelizer, and Panelizer doesn't use the {page_manager_handlers} table at all. I'm not discounting the bug report, just.. weird.

Out of interest, what page were you on when you cloned the variant?

jessicakoh’s picture

/admin/structure/pages

:)

I guess I am in the wrong section. How do I switch to the right section?

DamienMcKenna’s picture

What type of thing was the variant for? node_view? site_template?

jessicakoh’s picture

Site Template (/admin/structure/pages/edit/site_template)

DamienMcKenna’s picture

Project: Panelizer » Panels Everywhere
Version: 7.x-3.2-beta1 » 7.x-1.x-dev
Component: Miscellaneous » User interface
Issue tags: -error, -PDOException, -clone

Ok, that indicates it's a bug with Panels Everywhere. When did you last update it?

jessicakoh’s picture

7.x-1.0-rc2.

I am on Omega 4 theme.

jessicakoh’s picture

One more thing. I can't export and reimport a variant (hoping to workaround the duplicate issue).

fluxline’s picture

having the same issue when cloning a view without using panalizer nor panels everywhere. both seem to be duplicate entry issues. some info from error removed.

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node_view__' for key 'name': INSERT INTO {page_manager_handlers} (name, task, subtask, handler, weight, conf) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => node_view__ [:db_insert_placeholder_1] => node_view [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => panel_context [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => a:12:{s:5:"title";s:5:"Print";s:9:"no_blocks";i:0;s:8:"pipeline";s:8:"standard";s:22:"body_classes_to_remove";s:0:"";s:19:"body_classes_to_add";s:0:"";s:6:"css_id";s:0:"";s:3:"css";s:0:"";s:8:"contexts";a:1:{i:0;a:6:{s:10:"identifier";s:4:"User";s:7:"keyword";s:4:"user";s:4:"name";s:4:"user";s:4:"type";s:7:"current";s:3:"uid";s:0:"";s:2:"id";i:1;}}s:13:"relationships";a:1:{i:0;a:6:{s:10:"identifier";s:60:"Content from Content (on Content: [field_])";s:7:"keyword";s:6:"node_2";s:4:"name";s:45:"entity_from_field:field_-node-node";s:5:"delta";i:0;s:7:"context";s:25:"argument_entity_id:node_1";s:2:"id";i:1;}}s:4:"name";s:5:" ";s:6:"access";a:2:{s:7:"plugins";a:1:{i:0;a:4:{s:4:"name";s:9:"node_type";s:8:"settings";a:1:{s:4:"type";a:1:{s:5:"";s:5:"";}}s:7:"context";s:25:"argument_entity_id:node_1";s:3:"not";b:0;}}s:5:"logic";s:3:"and";}s:3:"did";s:1:"7";} ) in drupal_write_record() (line 7239 of /htdocs/includes/common.inc).

DamienMcKenna’s picture

DamienMcKenna’s picture

Priority: Normal » Major

With the current -dev versions of all relevant modules, I noticed that when you try to clone a variant you end up editing the existing one, not a clone. Darn.

DamienMcKenna’s picture

This absolutely must be fixed before we hit 1.0, i.e. soon.

fluxline’s picture

please note in #8 that i'm not using panels everywhere, and it is an issue.

DamienMcKenna’s picture

DamienMcKenna’s picture

I opened a new issue for dealing with being unable to clone a variant: #2443579: Unable to clone a variant

jessicakoh’s picture

I have tested #9. It didn't work.

fluxline’s picture

@damian: got bigger dogs to hunt at the moment, alternative export/import worked for the one I needed. will do and let you know. thx

DamienMcKenna’s picture

Status: Active » Closed (duplicate)

FYI this appears to be a bug in Panels: #2445203: Error trying to clone a variant

DamienMcKenna’s picture

Status: Closed (duplicate) » Postponed
Related issues: +#2445203: Error trying to clone a variant

Rather than closing it, lets leave it "postponed" until the other issue is resolved.

DamienMcKenna’s picture

Status: Postponed » Closed (duplicate)