The required column 'Value' was not present in the results of a 'FromSql' operation.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anos atrás
Hi again.
I tried replying to an old topic but I think it may have been closed.

Anyway, my problem is I followed instructions exactly on updating the site from 3.9 to 4.2 and all seemed to go fine until I tried to access Configuration > Settings > General Settings. It now just displays an internal error page. I can access all other settings including Advanced Settings, but I just cannot work out why it will not work for that one page? I tried rolling back and re-upgrading twice, but the same result happens every time.

The error message in the log is as follows:

System.InvalidOperationException: The required column 'Value' was not present in the results of a 'FromSql' operation.
   at Microsoft.EntityFrameworkCore.Query.Sql.Internal.FromSqlNonComposedQuerySqlGenerator.CreateValueBufferFactory(IRelationalValueBufferFactoryFactory relationalValueBufferFactoryFactory, DbDataReader dataReader)
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Query.Internal.ShaperCommandContext.NotifyReaderCreated(DbDataReader dataReader)
   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 System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method(Closure )
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ResultEnumerable`1.GetEnumerator()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass15_1`1.<CompileQueryCore>b__0(QueryContext qc)
   at Nop.Services.Common.FulltextService.IsFullTextSupported() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Common\FulltextService.cs:line 35
   at Nop.Web.Areas.Admin.Factories.SettingModelFactory.PrepareFullTextSettingsModel() in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Factories\SettingModelFactory.cs:line 579
   at Nop.Web.Areas.Admin.Factories.SettingModelFactory.PrepareGeneralCommonSettingsModel() in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Factories\SettingModelFactory.cs:line 1459
   at Nop.Web.Areas.Admin.Controllers.SettingController.GeneralCommon() in C:\andrei\nopcommerce\sources\src\Presentation\Nop.Web\Areas\Admin\Controllers\SettingController.cs:line 1188
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
   at WebMarkupMin.AspNetCore2.WebMarkupMinMiddleware.Invoke(HttpContext context)
   at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 94
   at Nop.Services.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Authentication\AuthenticationMiddleware.cs:line 79
   at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Nop.Services.Installation.InstallUrlMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Installation\InstallUrlMiddleware.cs:line 52
   at Nop.Services.Common.KeepAliveMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Common\KeepAliveMiddleware.cs:line 49
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.Invoke(HttpContext context)

The thing that is more frustrating is that I did the exact same upgrade on another NopCommerce store from 3.9 to 4.2 situated on the same server and it updated without any problems. I have crossed check settings and everything is identical, so why does this one not want to play?

Any help is highly appreciated.

Cheers
3 anos atrás
Topic here don't "close".  Did you try what Woon Cherk suggested on the other topic?

 ...error message, it's related to FullText search.

Try using All Settings (Advanced) and look for these 2 settings: UseFullTextSearch and FullTextMode . And make sure they have appropriate values. :)
3 anos atrás
Hi New York. Thanks for your reply and the info on the topics not closing, I will keep that in mind next time before starting a new topic (and I apologise for this one).

As for what you mentioned about the other solution, I can access those settings of course and tried both setting them to True and False, but it changed nothing. Also, what would the "Appropriate" setting be in this case anyway?
3 anos atrás
Are you using SQL Server?  What version?
3 anos atrás
Sorry for the delayed reply...

SQL web 2016
3 anos atrás
These are the default settings.  Use All Settings page, set these values, restart the site, and try again.

commonsettings.fulltextmode            ExactMatch    
commonsettings.usefulltextsearch    False
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.