Duplicate key inserting into page_manager_handlers

Created on 14 October 2014, over 10 years ago
Updated 16 May 2025, 3 days ago

No idea why this has started happening but am receiving the following:

Integrity constraint violation: 1062 Duplicate entry 'page_leadership_panel_context' for key 'name': INSERT INTO {page_manager_handlers} ...

In page.inc's page_manager_page_save(&$page), the following line is returning no pid so the subsequent drupal_write_record() thinks it's an insert instead of an update. The pid is the primary key for that table:

$update = (isset($page->pid)) ? array('pid') : array();

...

drupal_write_record('page_manager_pages', $page, $update);

I've looked around and it's not clear to me why the pid is missing in the code leading up to this point.

πŸ› Bug report
Status

Closed: outdated

Version

3.4

Component

Panel pages

Created by

πŸ‡ΊπŸ‡ΈUnited States aangel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024