nopCommerce 4.10 - Bug fixes and improvements

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Nop-Templates.com wrote:
Can you please wrap it in html

Sure. Done


Nop-Templates.com wrote:
The other question is about the default state of the additional ratings. We were wondering why the admin setting for the main rating ("catalogsettings.defaultproductratingvalue") is not being applied to the additional ratings. So you can choose maximum value for the default rating, but the additional ratings are always set to minimum by default? What is the reason for that, it seems illogical. The logical option would be the admin setting to target all available ratings.
Any information on this will be appreciated.

Hmm. Actually it's being applied. Please see this line (please note that a review should be required)
5 years ago
Hi Andrei,

PrepareCategorySimpleModels() no longer accepts categoryId. There is such a method in the CatalogModelFactory but is now protected and could not be used.

Could you make the protected method public or add an optional parameter to specify the parent category id?

Thanks,
Boyko
5 years ago
Nop-Templates.com wrote:
Hi Andrei,

PrepareCategorySimpleModels() no longer accepts categoryId. There is such a method in the CatalogModelFactory but is now protected and could not be used.

Could you make the protected method public or add an optional parameter to specify the parent category id?

Thanks,
Boyko

Hi Boyko,

PrepareCategorySimpleModels without paramters is invoked anyway (by the core). And it caches results. So what I can suggest you is to invoke "PrepareCategorySimpleModels()" and then apply some filter to load a category by required ID. All category modes will already be loaded and cached

Please also see my reply here
5 years ago
Hi Andrei,

I know we could make some filter but it just doesn't look right to me to duplicate code that is already implemented anyway.
It is just not accessible now while it used to be accessible before.
Why would we need to write extra code while we could use the existing one?

It does makes sense to make some of the protected methods to be public especially for us as plug-in vendors but once you do this you need to make sure you no longer make them protected again as otherwise we will end up in the same situation as this one. Even if you no longer use a certain public method it doesn't mean that some plugin vendor is not already using it.

Code duplication is the root of all evil so the more code we could reuse the better :)

Thanks,
Boyko
5 years ago
Hey Boyko,

OK. You've convinced me =))
5 years ago
I installed latest nopCommerce 4.10 final release on IIS in my system. I was running 4.10 Beta on same place and it was working well.

The installation for 4.10 final release went well and all the tables and other things have created successfully, however, I am facing below mentioned error when I looked in stdout logs..

[code]
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 2.1.1-rtm-30846 initialized 'NopObjectContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (31ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT [t].[Id], [t].[Enabled], [t].[LastEndUtc], [t].[LastStartUtc], [t].[LastSuccessUtc], [t].[Name], [t].[Seconds], [t].[StopOnError], [t].[Type]
      FROM [ScheduleTask] AS [t]
      WHERE [t].[Enabled] = 1
      ORDER BY [t].[Seconds] DESC
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT [s].[Id], [s].[CompanyAddress], [s].[CompanyName], [s].[CompanyPhoneNumber], [s].[CompanyVat], [s].[DefaultLanguageId], [s].[DisplayOrder], [s].[Hosts], [s].[Name], [s].[SslEnabled], [s].[Url]
      FROM [Store] AS [s]
      ORDER BY [s].[DisplayOrder], [s].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (1ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT [s].[Id], [s].[Name], [s].[StoreId], [s].[Value]
      FROM [Setting] AS [s]
      ORDER BY [s].[Name], [s].[StoreId]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (41ms) [Parameters=[@p0='?' (DbType = DateTime2), @p1='?' (DbType = Int32), @p2='?' (Size = 4000), @p3='?' (Size = 200), @p4='?' (DbType = Int32), @p5='?' (Size = 4000), @p6='?' (Size = 4000), @p7='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      INSERT INTO [Log] ([CreatedOnUtc], [CustomerId], [FullMessage], [IpAddress], [LogLevelId], [PageUrl], [ReferrerUrl], [ShortMessage])
      VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7);
      SELECT [Id]
      FROM [Log]
      WHERE @@ROWCOUNT = 1 AND [Id] = scope_identity();
Hosting environment: Production
Content root path: C:\inetpub\wwwroot\nopCommerce410
Now listening on: http://127.0.0.1:28467
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 GET http://localhost/  
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 2.1.1-rtm-30846 initialized 'NopObjectContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (1ms) [Parameters=[@__customerGuid_0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [c].[Id], [c].[Active], [c].[AdminComment], [c].[AffiliateId], [c].[BillingAddress_Id], [c].[CannotLoginUntilDateUtc], [c].[CreatedOnUtc], [c].[CustomerGuid], [c].[Deleted], [c].[Email], [c].[EmailToRevalidate], [c].[FailedLoginAttempts], [c].[HasShoppingCartItems], [c].[IsSystemAccount], [c].[IsTaxExempt], [c].[LastActivityDateUtc], [c].[LastIpAddress], [c].[LastLoginDateUtc], [c].[RegisteredInStoreId], [c].[RequireReLogin], [c].[ShippingAddress_Id], [c].[SystemName], [c].[Username], [c].[VendorId]
      FROM [Customer] AS [c]
      WHERE [c].[CustomerGuid] = @__customerGuid_0
      ORDER BY [c].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__systemName_0='?' (Size = 255)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [cr].[Id], [cr].[Active], [cr].[DefaultTaxDisplayTypeId], [cr].[EnablePasswordLifetime], [cr].[FreeShipping], [cr].[IsSystemRole], [cr].[Name], [cr].[OverrideTaxDisplayType], [cr].[PurchasedWithProductId], [cr].[SystemName], [cr].[TaxExempt]
      FROM [CustomerRole] AS [cr]
      WHERE [cr].[SystemName] = @__systemName_0
      ORDER BY [cr].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p0='?' (DbType = Boolean), @p1='?' (Size = 4000), @p2='?' (DbType = Int32), @p3='?' (DbType = Int32), @p4='?' (DbType = DateTime2), @p5='?' (DbType = DateTime2), @p6='?' (DbType = Guid), @p7='?' (DbType = Boolean), @p8='?' (Size = 1000), @p9='?' (Size = 1000), @p10='?' (DbType = Int32), @p11='?' (DbType = Boolean), @p12='?' (DbType = Boolean), @p13='?' (DbType = Boolean), @p14='?' (DbType = DateTime2), @p15='?' (Size = 4000), @p16='?' (DbType = DateTime2), @p17='?' (DbType = Int32), @p18='?' (DbType = Boolean), @p19='?' (DbType = Int32), @p20='?' (Size = 400), @p21='?' (Size = 1000), @p22='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      INSERT INTO [Customer] ([Active], [AdminComment], [AffiliateId], [BillingAddress_Id], [CannotLoginUntilDateUtc], [CreatedOnUtc], [CustomerGuid], [Deleted], [Email], [EmailToRevalidate], [FailedLoginAttempts], [HasShoppingCartItems], [IsSystemAccount], [IsTaxExempt], [LastActivityDateUtc], [LastIpAddress], [LastLoginDateUtc], [RegisteredInStoreId], [RequireReLogin], [ShippingAddress_Id], [SystemName], [Username], [VendorId])
      VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, @p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22);
      SELECT [Id]
      FROM [Customer]
      WHERE @@ROWCOUNT = 1 AND [Id] = scope_identity();
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p23='?' (DbType = Int32), @p24='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      INSERT INTO [Customer_CustomerRole_Mapping] ([Customer_Id], [CustomerRole_Id])
      VALUES (@p23, @p24);
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__entityId_0='?' (DbType = Int32), @__keyGroup_1='?' (Size = 400)], CommandType='Text', CommandTimeout='30']
      SELECT [ga].[Id], [ga].[EntityId], [ga].[Key], [ga].[KeyGroup], [ga].[StoreId], [ga].[Value]
      FROM [GenericAttribute] AS [ga]
      WHERE ([ga].[EntityId] = @__entityId_0) AND ([ga].[KeyGroup] = @__keyGroup_1)
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      SELECT [l].[Id], [l].[DefaultCurrencyId], [l].[DisplayOrder], [l].[FlagImageFileName], [l].[LanguageCulture], [l].[LimitedToStores], [l].[Name], [l].[Published], [l].[Rtl], [l].[UniqueSeoCode]
      FROM [Language] AS [l]
      WHERE [l].[Published] = 1
      ORDER BY [l].[DisplayOrder], [l].[Id]
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Route matched with {action = "Index", controller = "Home", area = ""}. Executing action Nop.Web.Controllers.HomeController.Index (Nop.Web)
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__customerRoleId_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT [pr].[Id], [pr].[Category], [pr].[Name], [pr].[SystemName]
      FROM [PermissionRecord] AS [pr]
      INNER JOIN [PermissionRecord_Role_Mapping] AS [prcrm] ON [pr].[Id] = [prcrm].[PermissionRecord_Id]
      WHERE [prcrm].[CustomerRole_Id] = @__customerRoleId_0
      ORDER BY [pr].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p23='?' (DbType = Int32), @p0='?' (DbType = Boolean), @p1='?' (Size = 4000), @p2='?' (DbType = Int32), @p3='?' (DbType = Int32), @p4='?' (DbType = DateTime2), @p5='?' (DbType = DateTime2), @p6='?' (DbType = Guid), @p7='?' (DbType = Boolean), @p8='?' (Size = 1000), @p9='?' (Size = 1000), @p10='?' (DbType = Int32), @p11='?' (DbType = Boolean), @p12='?' (DbType = Boolean), @p13='?' (DbType = Boolean), @p14='?' (DbType = DateTime2), @p15='?' (Size = 4000), @p16='?' (DbType = DateTime2), @p17='?' (DbType = Int32), @p18='?' (DbType = Boolean), @p19='?' (DbType = Int32), @p20='?' (Size = 400), @p21='?' (Size = 1000), @p22='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      UPDATE [Customer] SET [Active] = @p0, [AdminComment] = @p1, [AffiliateId] = @p2, [BillingAddress_Id] = @p3, [CannotLoginUntilDateUtc] = @p4, [CreatedOnUtc] = @p5, [CustomerGuid] = @p6, [Deleted] = @p7, [Email] = @p8, [EmailToRevalidate] = @p9, [FailedLoginAttempts] = @p10, [HasShoppingCartItems] = @p11, [IsSystemAccount] = @p12, [IsTaxExempt] = @p13, [LastActivityDateUtc] = @p14, [LastIpAddress] = @p15, [LastLoginDateUtc] = @p16, [RegisteredInStoreId] = @p17, [RequireReLogin] = @p18, [ShippingAddress_Id] = @p19, [SystemName] = @p20, [Username] = @p21, [VendorId] = @p22
      WHERE [Id] = @p23;
      SELECT @@ROWCOUNT;
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Executing action method Nop.Web.Controllers.HomeController.Index (Nop.Web) - Validation state: Valid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
      Executed action method Nop.Web.Controllers.HomeController.Index (Nop.Web), returned result Microsoft.AspNetCore.Mvc.ViewResult in 3.9287ms.
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1]
      Request starting HTTP/1.1 POST http://localhost/scheduletask/runtask application/x-www-form-urlencoded 69
info: Microsoft.EntityFrameworkCore.Infrastructure[10403]
      Entity Framework Core 2.1.1-rtm-30846 initialized 'NopObjectContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer' with options: using lazy-loading proxies
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__systemName_0='?' (Size = 400)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [c].[Id], [c].[Active], [c].[AdminComment], [c].[AffiliateId], [c].[BillingAddress_Id], [c].[CannotLoginUntilDateUtc], [c].[CreatedOnUtc], [c].[CustomerGuid], [c].[Deleted], [c].[Email], [c].[EmailToRevalidate], [c].[FailedLoginAttempts], [c].[HasShoppingCartItems], [c].[IsSystemAccount], [c].[IsTaxExempt], [c].[LastActivityDateUtc], [c].[LastIpAddress], [c].[LastLoginDateUtc], [c].[RegisteredInStoreId], [c].[RequireReLogin], [c].[ShippingAddress_Id], [c].[SystemName], [c].[Username], [c].[VendorId]
      FROM [Customer] AS [c]
      WHERE [c].[SystemName] = @__systemName_0
      ORDER BY [c].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__entityId_0='?' (DbType = Int32), @__keyGroup_1='?' (Size = 400)], CommandType='Text', CommandTimeout='30']
      SELECT [ga].[Id], [ga].[EntityId], [ga].[Key], [ga].[KeyGroup], [ga].[StoreId], [ga].[Value]
      FROM [GenericAttribute] AS [ga]
      WHERE ([ga].[EntityId] = @__entityId_0) AND ([ga].[KeyGroup] = @__keyGroup_1)
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Route matched with {action = "RunTask", controller = "ScheduleTask", area = ""}. Executing action Nop.Web.Controllers.ScheduleTaskController.RunTask (Nop.Web)
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
      Executing action method Nop.Web.Controllers.ScheduleTaskController.RunTask (Nop.Web) with arguments (Nop.Services.Messages.QueuedMessagesSendTask, Nop.Services) - Validation state: Valid
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__type_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [st].[Id], [st].[Enabled], [st].[LastEndUtc], [st].[LastStartUtc], [st].[LastSuccessUtc], [st].[Name], [st].[Seconds], [st].[StopOnError], [st].[Type]
      FROM [ScheduleTask] AS [st]
      WHERE [st].[Type] = @__type_0
      ORDER BY [st].[Id] DESC
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p8='?' (DbType = Int32), @p0='?' (DbType = Boolean), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (Size = 4000), @p5='?' (DbType = Int32), @p6='?' (DbType = Boolean), @p7='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      UPDATE [ScheduleTask] SET [Enabled] = @p0, [LastEndUtc] = @p1, [LastStartUtc] = @p2, [LastSuccessUtc] = @p3, [Name] = @p4, [Seconds] = @p5, [StopOnError] = @p6, [Type] = @p7
      WHERE [Id] = @p8;
      SELECT @@ROWCOUNT;
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__nowUtc_0='?' (DbType = DateTime2), @__maxSendTries_1='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT COUNT(*)
      FROM [QueuedEmail] AS [qe]
      WHERE ([qe].[SentOnUtc] IS NULL AND ([qe].[DontSendBeforeDateUtc] IS NULL OR ([qe].[DontSendBeforeDateUtc] <= @__nowUtc_0))) AND ([qe].[SentTries] < @__maxSendTries_1)
fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
      Failed executing DbCommand (3ms) [Parameters=[@__nowUtc_0='?' (DbType = DateTime2), @__maxSendTries_1='?' (DbType = Int32), @__p_2='?' (DbType = Int32), @__p_3='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT [qe].[Id], [qe].[AttachedDownloadId], [qe].[AttachmentFileName], [qe].[AttachmentFilePath], [qe].[Bcc], [qe].[Body], [qe].[CC], [qe].[CreatedOnUtc], [qe].[DontSendBeforeDateUtc], [qe].[EmailAccountId], [qe].[From], [qe].[FromName], [qe].[PriorityId], [qe].[ReplyTo], [qe].[ReplyToName], [qe].[SentOnUtc], [qe].[SentTries], [qe].[Subject], [qe].[To], [qe].[ToName]
      FROM [QueuedEmail] AS [qe]
      WHERE ([qe].[SentOnUtc] IS NULL AND ([qe].[DontSendBeforeDateUtc] IS NULL OR ([qe].[DontSendBeforeDateUtc] <= @__nowUtc_0))) AND ([qe].[SentTries] < @__maxSendTries_1)
      ORDER BY [qe].[PriorityId] DESC, [qe].[CreatedOnUtc]
      OFFSET @__p_2 ROWS FETCH NEXT @__p_3 ROWS ONLY
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
ClientConnectionId:86bfcba1-174e-4b11-a333-43410be91243
Error Number:102,State:1,Class:15
fail: Microsoft.EntityFrameworkCore.Query[10100]
      An exception occurred in the database while iterating the results of a query for context type 'Nop.Data.NopObjectContext'.
      System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
      Invalid usage of the option NEXT in the FETCH statement.
         at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
         at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
         at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
         at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
         at System.Data.SqlClient.SqlDataReader.get_MetaData()
         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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
         at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
         at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
         at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
         at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
         at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
         at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
         at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider._TrackEntities[TOut,TIn](IEnumerable`1 results, QueryContext queryContext, IList`1 entityTrackingInfos, IList`1 entityAccessors)+MoveNext()
         at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
      ClientConnectionId:86bfcba1-174e-4b11-a333-43410be91243
      Error Number:102,State:1,Class:15
System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   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, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider._TrackEntities[TOut,TIn](IEnumerable`1 results, QueryContext queryContext, IList`1 entityTrackingInfos, IList`1 entityAccessors)+MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
ClientConnectionId:86bfcba1-174e-4b11-a333-43410be91243
Error Number:102,State:1,Class:15
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p8='?' (DbType = Int32), @p0='?' (DbType = Boolean), @p1='?' (DbType = DateTime2), @p2='?' (DbType = DateTime2), @p3='?' (DbType = DateTime2), @p4='?' (Size = 4000), @p5='?' (DbType = Int32), @p6='?' (DbType = Boolean), @p7='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      UPDATE [ScheduleTask] SET [Enabled] = @p0, [LastEndUtc] = @p1, [LastStartUtc] = @p2, [LastSuccessUtc] = @p3, [Name] = @p4, [Seconds] = @p5, [StopOnError] = @p6, [Type] = @p7
      WHERE [Id] = @p8;
      SELECT @@ROWCOUNT;
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@p0='?' (DbType = DateTime2), @p1='?' (DbType = Int32), @p2='?' (Size = 4000), @p3='?' (Size = 200), @p4='?' (DbType = Int32), @p5='?' (Size = 4000), @p6='?' (Size = 4000), @p7='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SET NOCOUNT ON;
      INSERT INTO [Log] ([CreatedOnUtc], [CustomerId], [FullMessage], [IpAddress], [LogLevelId], [PageUrl], [ReferrerUrl], [ShortMessage])
      VALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7);
      SELECT [Id]
      FROM [Log]
      WHERE @@ROWCOUNT = 1 AND [Id] = scope_identity();
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
      Executed action method Nop.Web.Controllers.ScheduleTaskController.RunTask (Nop.Web), returned result Microsoft.AspNetCore.Mvc.NoContentResult in 139.5157ms.
info: Microsoft.AspNetCore.Mvc.StatusCodeResult[1]
      Executing HttpStatusCodeResult, setting HTTP status code 204
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
      Executed action Nop.Web.Controllers.ScheduleTaskController.RunTask (Nop.Web) in 310.4164ms
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
      Request finished in 456.1292ms 204
info: Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor[1]
      Executing ViewResult, running view Index.
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [e].[Id], [e].[AltAttribute], [e].[IsNew], [e].[MimeType], [e].[SeoFilename], [e].[TitleAttribute]
      FROM [Picture] AS [e]
      WHERE [e].[Id] = @__get_Item_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT [e].[Id], [e].[BinaryData], [e].[PictureId]
      FROM [PictureBinary] AS [e]
      WHERE [e].[PictureId] = @__get_Item_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT TOP(1) [e].[Id], [e].[AltAttribute], [e].[IsNew], [e].[MimeType], [e].[SeoFilename], [e].[TitleAttribute]
      FROM [Picture] AS [e]
      WHERE [e].[Id] = @__get_Item_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__get_Item_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='30']
      SELECT [e].[Id], [e].[BinaryData], [e].[PictureId]
      FROM [PictureBinary] AS [e]
      WHERE [e].[PictureId] = @__get_Item_0
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__systemName_0='?' (Size = 4000)], CommandType='Text', CommandTimeout='30']
      SELECT [t].[Id], [t].[AccessibleWhenStoreClosed], [t].[Body], [t].[DisplayOrder], [t].[IncludeInFooterColumn1], [t].[IncludeInFooterColumn2], [t].[IncludeInFooterColumn3], [t].[IncludeInSitemap], [t].[IncludeInTopMenu], [t].[IsPasswordProtected], [t].[LimitedToStores], [t].[MetaDescription], [t].[MetaKeywords], [t].[MetaTitle], [t].[Password], [t].[Published], [t].[SubjectToAcl], [t].[SystemName], [t].[Title], [t].[TopicTemplateId]
      FROM [Topic] AS [t]
      WHERE ([t].[SystemName] = @__systemName_0) AND ([t].[Published] = 1)
      ORDER BY [t].[Id]
info: Microsoft.EntityFrameworkCore.Database.Command[20101]
      Executed DbCommand (0ms) [Parameters=[@__entityId_0='?' (DbType = Int32), @__entityNam
5 years ago
Hello Team,

I downloaded no source version of nopcommerce 4.10 latest stable release.

step to reproduce this issue.

1) I add one language

   Language Name = Vietname

   Language culture = Vietnamese (Vietnam). vi-VN

2) Edit this product www.store.com/Admin/Product/Edit/18

   Go vietname language tab
    
   add this product name = rong-biển-kiểu-hawaii

   go seo tab after go vetname language tab.

   add this biển-kiểu-hawaii  for that language.

    
3)click on preview button  all working fine at product detail front side.

   change language from english to vietname language.

   i got below error.


      

       An unhandled exception occurred while processing the request.
          InvalidOperationException: Invalid non-ASCII or control character in header: 0x1ECB
       Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.
      <UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs, line 83

      


    4.10 beta working fine but at that time seo name is not changed so i reported bug.

    here is the link  https://github.com/nopSolutions/nopCommerce/issues/3174.

    hope you guys understand.

    Awaiting for your response.
5 years ago
sk5202 wrote:
Invalid non-ASCII or control character in header: 0x1ECB

Thanks a lot! We'll check it as soon as possible - https://github.com/nopSolutions/nopCommerce/issues/3192
5 years ago
sk5202 wrote:

      

       An unhandled exception occurred while processing the request.
          InvalidOperationException: Invalid non-ASCII or control character in header: 0x1ECB
       Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions+<>c.
      <UseNopExceptionHandler>b__1_1(HttpContext context) in ApplicationBuilderExtensions.cs, line 83

      


    4.10 beta working fine but at that time seo name is not changed so i reported bug.

    here is the link  https://github.com/nopSolutions/nopCommerce/issues/3174.

    hope you guys understand.

    Awaiting for your response.


Problem solved. Please see this commit for more details
5 years ago
FIX: NopCommerce 4.10 register.cshtml AcceptPrivacyPolicyEnabled accept-consent

In register.cshtml code section AcceptPrivacyPolicyEnabled the accept-consent is not working.

FIX:

@if (Model.AcceptPrivacyPolicyEnabled)



                    @if (Model.AcceptPrivacyPolicyEnabled)
                    {

                        <script asp-location="Footer">
                                    $(document).ready(function() {
                                        $('#register-button').on('click', function() {
                                            if ($('#accept-consent').is(':checked')) {
                                                //do some stuff
                                                return true;
                                            } else {
                                                //just show validation errors, don't post
                                                alert('@Html.Raw(JavaScriptEncoder.Default.Encode(T("Account.Fields.AcceptPrivacyPolicy.Required").Text))');
                                                return false;
                                            }
                                        });
                                    });
                        </script>

                        <div class="form-group row justify-content-center">
                            <div class="col-md-12 text-center">

                                <input id="accept-privacy-policy" type="checkbox" name="accept-privacy-policy" />
                                <label for="accept-privacy-policy">@T("Account.Fields.AcceptPrivacyPolicy")</label>

                                @if (Model.AcceptPrivacyPolicyPopup)
                                {

                                }
                                else
                                {

                                }
                            </div>
                        </div>

                    }



change:

<input id="accept-privacy-policy" type="checkbox" name="accept-privacy-policy" />
<label for="accept-privacy-policy">@T("Account.Fields.AcceptPrivacyPolicy")</label>


to:

<input id="accept-consent" type="checkbox" name="accept-consent" />
<label for="accept-consent">@T("Account.Fields.AcceptPrivacyPolicy")</label>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.