• Not Answered

Missing ContentTypeID for custom ContentType

I have added a custom content type and also have a plugin that attempts to issue notifications based on this content type.  I had this working on a fresh 7.6 install. I have since moved to a 6.1 -> 7.6 upgraded database and get the following SQL Exception.  Wondering what is missing or didn't get triggered properly.

Additional information: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_te_Content_Contents_te_Content_ContentTypes". The conflict occurred in database "Community", table "dbo.te_Content_ContentTypes", column 'ContentTypeId'.

The statement has been terminated.

3 Replies

  • An error occurred while initializing the plugin: Telligent.Evolution.Api.Content.Plugins.RegisterContentTypeStateNotifier


    System.Data.SqlClient.SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()     at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)     at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()     at System.Data.SqlClient.TdsParserStateObject.ReadByte()     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)     at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)     at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()     at Telligent.Evolution.Data.ContentSqlDataProvider.SetEnabledContentTypes(IEnumerable`1 contentTypeIds)     at Telligent.Evolution.Api.Content.Plugins.RegisterContentTypeStateNotifier.Initialize()     at Telligent.Evolution.Components.PluginManager.()
  • In reply to Luke D:

    Using SQL profiler, I found this sproc being called when I save on the manage plugins page.  My content type ID (guids) do show up, however...they are not in the db...  When executed in management studio, it executes successfully, but takes 1:48 to complete...however all the correct content type guids are now available...

    declare @p1 xml
    set @p1=convert(xml,N'<Contents><Content ContentTypeId="ddd33242-6936-4ec6-8484-6a80c18160d7"/><Content ContentTypeId="4318c657-79cc-4a5a-b356-f420c27f44c0"/><Content ContentTypeId="0a236e15-36ee-4c88-acb0-71dc49191720"/><Content ContentTypeId="56f1a3ec-14bb-45c6-949f-ee7776d68c78"/><Content ContentTypeId="23b05a61-c3e5-4451-90d9-bfa00453bce4"/><Content ContentTypeId="ca0e7c80-8686-4d2f-a5a8-63b9e212e922"/><Content ContentTypeId="f7d226ab-d59f-475c-9d22-4a79e3f0ec07"/><Content ContentTypeId="48f9bad6-9756-4845-ab98-382808c7bced"/><Content ContentTypeId="46448885-d0e6-4133-bbfb-f0cd7b0fd6f7"/><Content ContentTypeId="f586769b-0822-468a-b7f3-a94d480ed9b0"/><Content ContentTypeId="a0753cfb-923b-4975-ad2a-42e5282a6d5d"/><Content ContentTypeId="08ca0da0-e017-4a80-9832-476c74d4f174"/><Content ContentTypeId="393e7426-ce8b-4921-9949-0c0b60cb1f1e"/><Content ContentTypeId="6b577b8c-0470-4e20-9d29-b6772bf67243"/><Content ContentTypeId="e9ed4118-60ed-4f2b-a026-5705b8793d05"/><Content ContentTypeId="df237622-6cc3-4fc2-8555-ef4fb2656444"/><Content ContentTypeId="f1feaab6-85f7-463a-a529-fc2abebc9bca"/><Content ContentTypeId="858a2037-b76c-4898-9365-125879b49843"/><Content ContentTypeId="bda1b85b-d6a0-42dc-84e5-9daf1ea18fa3"/><Content ContentTypeId="68c65af2-aa15-4e4c-9c81-155c6a3159f6"/><Content ContentTypeId="9262536b-49a3-4494-802f-04dff10424ed"/></Contents>')
    exec dbo.[te_Content_ContentTypes_Set] @ContentTypes=@p1
  • In reply to Luke D:

    There were a couple fixes to this stored procedure, one in the December hotfix and one in the January hotfix for 7.6 found here telligent.com/.../36647.hotfixes-for-telligent-community-7-6.aspx

    33505 in December removed the transaction from that stored procedure to avoid blocking.  That will likely resolve your time out issue.  Applying that hotfix should resolve the issue.

Related