Same problem with http://drupal.org/node/1210862

Initial installation with MS SQL give this error mesage SQLSTATE[23000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of PRIMARY KEY constraint 'registry_pkey'. Cannot insert duplicate key in object 'dbo.registry'.

Database on SQLEXPRESS and on same maschine.

Comments

Gideon77’s picture

The following kludge patch will work around the bug. It ignores the PHP exception that is thrown when attempting to insert a duplicate row in the registry table.

*** includes\orig\registry.inc	2011-10-12 03:10:22.000000000 -0400
--- includes\registry.inc	2012-02-29 13:21:03.410406200 -0500
*************** function _registry_parse_file($filename,
*** 176,182 ****
          'weight' => $weight,
        ));
      }
!     $query->execute();
    }
  }
  
--- 176,189 ----
          'weight' => $weight,
        ));
      }
!     //$query->execute();
!     try {
!         // BUG: Ignore exception thrown (see drupal.org thread 1210862)
!         @$query->execute();
!     } catch (Exception $e) {
!         // ignore - AEK
!     }
! 
    }
  }
  

The above patch was applied to Acquia Drupal 7.8.7. Your line numbers might vary.

Note: This is not a proper long-term fix. The developers need to correct the underlying logic that causes the problem.

kostajh’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

Can you reproduce this error with 7.x-2.x-dev? The 1.x branch is not supported.

kostajh’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)