Copied to clipboard

Flag this post as spam?

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


  • Lucy Foster 10 posts 82 karma points
    Sep 20, 2017 @ 10:12
    Lucy Foster
    0

    Error when adding a Partial Macro

    Hi All,

    I'm getting an error when trying to create a new Partial View Macro. All of our umbraco sites are on Azure, but none of the others have this error. I cannot go into the Macro folder either. I'm not sure when I need to proceed with this or if there is anything within the database that I can change.

    The site is using version 7.5.4. I've put the full error below.

    Cannot insert the value NULL into column 'uniqueId', table 'VOXSB160817.dbo.cmsMacro'; column does not allow nulls. INSERT fails. The statement has been terminated.

    Stack Trace:

    [SqlException (0x80131904): Cannot insert the value NULL into column 'uniqueId', table 'VOXSB160817.dbo.cmsMacro'; column does not allow nulls. INSERT fails.
    The statement has been terminated.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2440374
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5765244
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4169
       System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
       System.Data.SqlClient.SqlDataReader.get_MetaData() +89
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) +409
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2127
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +911
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +64
       System.Data.SqlClient.SqlCommand.ExecuteScalar() +271
       StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() +60
       Umbraco.Core.Persistence.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9() +55
       Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction(Func`1 func) +170
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy) +103
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy) +52
       Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command) +48
       Umbraco.Core.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) +2157
       Umbraco.Core.Persistence.Database.Insert(Object poco) +51
       Umbraco.Core.Persistence.Repositories.MacroRepository.PersistNewItem(IMacro entity) +135
       Umbraco.Core.Cache.DefaultRepositoryCachePolicy`2.CreateOrUpdate(TEntity entity, Action`1 persistMethod) +223
       Umbraco.Core.Persistence.Repositories.RepositoryBase`2.PersistNewItem(IEntity entity) +237
       Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit(Action`1 transactionCompleting) +114
       Umbraco.Core.Persistence.UnitOfWork.PetaPocoUnitOfWork.Commit() +7
       Umbraco.Core.Services.MacroService.Save(IMacro macro, Int32 userId) +141
       umbraco.PartialViewTasksBase.PerformSave() +762
       Umbraco.Web.UI.LegacyDialogTask.Save() +26
       Umbraco.Web.UI.LegacyDialogHandler.Create(HttpContextBase httpContext, User umbracoUser, String nodeType, Int32 nodeId, String text, Int32 typeId) +56
       umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +105
       Umbraco.Web.UI.Umbraco.Create.PartialViewMacro.SubmitButton_Click(Object sender, EventArgs e) +200
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9819334
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639
    

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft