-
Notifications
You must be signed in to change notification settings - Fork 63
Description
The user is not shown any feedback, but if tries to save page with metadata longer than 255 characters, the publish fails with log entries as shown below.
If this is constrained at database level, I'd suggest add some validation / max length on the control so the user gets visible feedback.
21/01/2026 16:16:19 Error
An error occurred while saving the entity changes. See the inner exception for details.: at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at cloudscribe.SimpleContent.Storage.EFCore.PageCommands.Update(String projectId, IPage page, CancellationToken cancellationToken) at cloudscribe.SimpleContent.Services.PageService.Update(IPage page) at cloudscribe.SimpleContent.Web.Services.UpdateTemplatedPageHandler.Handle(UpdateTemplatedPageRequest request, CancellationToken cancellationToken)
21/01/2026 16:16:19 Error
An exception occurred in the database while saving changes for context type '"cloudscribe.SimpleContent.Storage.EFCore.MSSQL.SimpleContentDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.SqlClient.SqlException (0x80131904): String or binary data would be truncated. The statement has been terminated. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__209_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) ClientConnectionId:33ceae9a-cf88-42b9-b503-ccf59461f51e Error Number:8152,State:30,Class:16 --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
21/01/2026 16:16:19 Error
Failed executing DbCommand ("2"ms) [Parameters=["@P43='?' (Size = 36), @p0='?' (Size = 255), @p1='?' (Size = 500), @p2='?' (Size = 4000), @p3='?' (Size = 50), @P4='?' (Size = 255), @p5='?' (Size = 100), @p6='?' (DbType = DateTime2), @P7='?' (DbType = Boolean), @p8='?' (Size = 255), @p9='?' (Size = 4000), @p10='?' (DbType = DateTime2), @p11='?' (Size = 4000), @p12='?' (Size = 255), @P13='?' (DbType = Boolean), @p14='?' (DbType = DateTime2), @P15='?' (Size = 100), @p16='?' (Size = 500), @p17='?' (DbType = Boolean), @p18='?' (Size = 4000), @p19='?' (Size = 4000), @p20='?' (Size = 4000), @p21='?' (DbType = Int32), @p22='?' (Size = 36), @p23='?' (Size = 255), @p24='?' (Size = 50), @p25='?' (DbType = DateTime2), @P26='?' (Size = 4000), @p27='?' (Size = 4000), @p28='?' (Size = 50), @p29='?' (DbType = Boolean), @p30='?' (DbType = Boolean), @p31='?' (DbType = Boolean), @P32='?' (DbType = Boolean), @p33='?' (DbType = Boolean), @p34='?' (DbType = Boolean), @p35='?' (DbType = Boolean), @p36='?' (DbType = Boolean), @P37='?' (DbType = Boolean), @p38='?' (DbType = Boolean), @p39='?' (Size = 255), @p40='?' (Size = 255), @p41='?' (Size = 255), @p42='?' (Size = 4000)"], CommandType='Text', CommandTimeout='30']" ""SET IMPLICIT_TRANSACTIONS OFF; SET NOCOUNT ON; UPDATE [cs_Page] SET [Author] = @p0, [CategoriesCsv] = @p1, [Content] = @p2, [ContentType] = @p3, [CorrelationKey] = @P4, [CreatedByUser] = @p5, [CreatedUtc] = @p6, [DisableEditor] = @P7, [DraftAuthor] = @p8, [DraftContent] = @p9, [DraftPubDate] = @p10, [DraftSerializedModel] = @p11, [ExternalUrl] = @p12, [IsPublished] = @P13, [LastModified] = @p14, [LastModifiedByUser] = @P15, [MenuFilters] = @p16, [MenuOnly] = @p17, [MetaDescription] = @p18, [MetaHtml] = @p19, [MetaJson] = @p20, [PageOrder] = @p21, [ParentId] = @p22, [ParentSlug] = @p23, [ProjectId] = @p24, [PubDate] = @p25, [Script] = @P26, [SerializedModel] = @p27, [Serializer] = @p28, [ShowCategories] = @p29, [ShowComments] = @p30, [ShowCreatedBy] = @p31, [ShowCreatedDate] = @P32, [ShowHeading] = @p33, [ShowLastModified] = @p34, [ShowLastModifiedBy] = @p35, [ShowLastModifiedDate] = @p36, [ShowMenu] = @P37, [ShowPubDate] = @p38, [Slug] = @p39, [TemplateKey] = @p40, [Title] = @p41, [ViewRoles] = @p42 WHERE [Id] = @P43; SELECT @@rowcount;"