Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eric Brown 5 posts 25 karma points
    Oct 24, 2012 @ 22:56
    Eric Brown
    0

    Server Error in '/' Application. Duplicate entry '0' for key 1

    A former client has contacted us for help with the following error:

     

    Server Error in '/' Application.

    Duplicate entry '0' for key 1

    They receive this error when they try to update any content through the umbraco interface. I get the same results.

    This looks like a MySQL error caused by a primary key that does not auto-increment. I am in the process of comparing the problematic database with a "good" Umbraco database, but I wanted to get this post out here early, because I'm not exactly sure what I'm looking for.

    Does this error look familiar to anyone else? Does Umbraco expect MySQL to auto-increment keys? Any thoughts on how to fix?
    Thanks.
    Eric

  • Eric Brown 5 posts 25 karma points
    Oct 24, 2012 @ 23:12
    Eric Brown
    0

    Sorry, here's the rest of the error:

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: MySql.Data.MySqlClient.MySqlException: Duplicate entry '0' for key 1

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace: 

    [MySqlException (0x80004005): Duplicate entry '0' for key 1]
       MySql.Data.MySqlClient.MySqlStream.OpenPacket() +238
       MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) +60
       MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() +50
       MySql.Data.MySqlClient.MySqlDataReader.NextResult() +565
       MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +923
       MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() +43
       MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters) +125
       MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(String connectionString, String commandText, MySqlParameter[] parms) +80
       umbraco.DataLayer.SqlHelpers.MySql.MySqlHelper.ExecuteNonQuery(String commandText, MySqlParameter[] parameters) +15
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +85
    
    [SqlHelperException: Umbraco Exception (DataLayer): SQL helper exception in ExecuteNonQuery]
       umbraco.DataLayer.SqlHelper`1.ExecuteNonQuery(String commandText, IParameter[] parameters) +140
       umbraco.cms.businesslogic.property.Property.MakeNew(PropertyType pt, Content c, Guid versionId) +245
       umbraco.cms.businesslogic.Content.createNewVersion() +317
       umbraco.cms.businesslogic.web.Document.PublishWithResult(User u) +239
       umbraco.cms.presentation.editContent.Publish(Object sender, EventArgs e) +237
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       umbraco.controls.ContentControl.savePublish(Object Sender, ImageClickEventArgs e) +46
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +115
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +120
       System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Please Sign in or register to post replies

Write your reply to:

Draft