Copied to clipboard

Flag this post as spam?

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


  • Dennis Öhman 32 posts 177 karma points c-trib
    Apr 29, 2016 @ 13:07
    Dennis Öhman
    0

    Umbraco 7.4 + azure + ClearDb MySQL = constraint errors?

    Can anyone som shed light on this matter for me =)

    Cannot add or update a child row: a foreign key constraint fails (`DB`.`cmspropertydata`, CONSTRAINT `cmspropertydata_ibfk_1` FOREIGN KEY (`contentNodeId`) REFERENCES `umbraconode` (`id`))
    
     at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
       at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
       at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
       at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
       at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteScalar()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar()
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy)
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command)
       at Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco)
    
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 29, 2016 @ 15:31
    Jan Skovgaard
    0

    Hi Dennis

    Could it perhaps be an issue with uppercase/lowercase settings?

    I don't have that much experience with running Umbraco on MySQL but I've seen many posts where people have had issues - It's seem that the most common solution is to set the schema to be using lowercase - So setting lowercasetable_names = 1 somewhere in a config (sorry, have not tried myself) should solve it.

    This was something that changed back in version 6 at some point - And it's still valid for 7 - So Try reading the "Update" part in this comment perhaps https://our.umbraco.org/forum/getting-started/installing-umbraco/38002-Installing-Umbraco-6-on-UnoEuro-web-hotel#comment-137396

    Hope this helps.

    /Jan

  • Dennis Öhman 32 posts 177 karma points c-trib
    Apr 29, 2016 @ 17:08
    Dennis Öhman
    0

    That was my first thought, but the error occurs after you add a node under a parent node with list view. Then umbraco can't find the node when you click on it and if you url-navigate to by its Id you get another error that it can't find the parent node.

    I don't get the error when running the site locally to the ClearDB database.

    I don't get the error when running the site locally with a our local dev MySQL 5.6.

    I don't get the error when running the site locally with a copy of the ClearDB on our local server.

    At the moment I'm using uSync to move it over to a SQL =)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies