Opened 7 years ago

Closed 7 years ago

Last modified 4 years ago

#1652 closed defect (fixed)

Keine Operationen können durchgeführt werden

Reported by: thomas.daeppen Owned by: michael.ritter
Priority: normal Milestone: Contrexx 3.0 SP5
Component: ContentManager Version: 3.0.4
Severity: normal Keywords:
Cc:

Description

Bei einer Operation im Content Manager erscheint der folgende Fehler:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-372-Cx\Model\ContentManager\Page' for key 'log_class_unique_version_idx'

Siehe auch #1070

Change History (3)

comment:1 Changed 7 years ago by thomas.daeppen

Auf Grund der Umstellung auf den PDO-Treiber funktioniert der Fix von #1070 nicht mehr.

comment:2 Changed 7 years ago by michael.ritter

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 4 years ago by thomas.daeppen

Patch für Version 3:

diff --git a/model/events/PageEventListener.class.php b/model/events/PageEventListener.class.php
index c925423..b3202ad 100644
--- a/model/events/PageEventListener.class.php
+++ b/model/events/PageEventListener.class.php
@@ -195,7 +195,7 @@ class PageEventListener {
         $oldAutoIncrement = $result->fields['oldAutoIncrement'] + 1;
         $result = $database->Execute("SHOW TABLE STATUS LIKE '" . DBPREFIX . "content_page'");
         if ($result !== false && $result->fields['Auto_increment'] < $oldAutoIncrement) {
-            $database->Execute("ALTER TABLE `" . DBPREFIX . "content_page` AUTO_INCREMENT = '" . contrexx_raw2db($oldAutoIncrement) . "'");
+            $database->Execute("ALTER TABLE `" . DBPREFIX . "content_page` AUTO_INCREMENT = " . contrexx_raw2db($oldAutoIncrement));
         }
     }
 }
Note: See TracTickets for help on using tickets.