Update is not working, getting the following error

Drupal 7.44
Postgress 9.3 with a database prefix

Performed update: panelizer_update_7114                                     [ok]
SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "did" violates not-null constraint
DETAIL:  Failing row contains (null, radix_sutro, a:0:{},a:1:{s:14:"style_settings";a:6:{s:7:"default";N;s:3:"top";N;s:4:...,a:0:{}, %node:title, 1, 0, 9a886a06-512b-4f17-bd71-497d1e758f2a, , ).
Performed update: panelizer_update_7115                                     [ok]
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

attiks created an issue. See original summary.

attiks’s picture

Priority: Major » Critical

Offending code in function panelizer_update_7115(&$sandbox) {

      $display->did = db_insert('panels_display')
        ->fields(array(
          'did' => NULL,
          'layout' => $display->layout,
          'layout_settings' => serialize($display->layout_settings),
          'panel_settings' => serialize($display->panel_settings),
          'cache' => serialize($display->cache),
          'title' => $display->title,
          'hide_title' => $display->hide_title,
          'title_pane' => $display->title_pane,
          'uuid' => $display->uuid,
        ))
        ->execute();

And did is defined as

      'did' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'no export' => TRUE,
      ),

So inserting NULL isn't working

attiks’s picture

Status: Active » Needs review
FileSize
533 bytes

Patch removing the NULL insert

attiks’s picture

FYI patch in #4 is working for us

DamienMcKenna’s picture

Thanks attiks, I appreciate it, and I'm sorry about letting that bug slip through.

I fixed the module's tests so drupalci can run these tests.

DamienMcKenna’s picture

DamienMcKenna’s picture

So... 14 failures? :(

DamienMcKenna’s picture

Rerunning.

DamienMcKenna’s picture

Issue tags: +PostgreSQL

I didn't have any branch tests for Panelizer on PostgreSQL, so I've turned them on to see how it's doing.

DamienMcKenna’s picture

The branch tests are failing with 14 errors, so lets move this problem into another issue: #2785923: Fix PostgreSQL compatibility

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed. Thanks. Lets move to #2785923 for other problems with PostgreSQL.

Status: Fixed » Closed (fixed)

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