Hi, After upgrading to newer version 8.0, getting an error in all menu which is generated with the RAD tool before.
ERROR 2019-11-14 15:04:01,086 [16 ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'OrderBy<Currency, int>(
source: Where<Currency>(
source: Where<Currency>(
source: DbSet<Currency>,
predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See
https://go.microsoft.com/fwlink/?linkid=2101038
for more information.
System.InvalidOperationException: The LINQ expression 'OrderBy<Currency, int>(
source: Where<Currency>(
source: Where<Currency>(
source: DbSet<Currency>,
predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See
https://go.microsoft.com/fwlink/?linkid=2101038
for more information.
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& )
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0
1.<ExecuteAsync>b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable
1.GetAsyncEnumerator(CancellationToken cancellationToken)
at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable
1 source, CancellationToken cancellationToken)
at ioNob.h2oERP.Base.CurrenciesAppService.GetAll(GetAllCurrenciesInput input) in D:\GitRepo\h2oERPZero\aspnet-core\src\ioNob.h2oERP.Application\Base\CurrenciesAppService.cs:line 82
at lambda_method(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Raising error from these sections in service.
var currencies = await query
.OrderBy(input.Sorting ?? "currency.id asc")
.PageBy(input)
.ToListAsync();
Anythings needs to be changed?
Thanks.
Hi, <span class="colour" style="color: rgb(34, 34, 34);">We are facing an issue in our date picker that shows "invalid date" as well as getting previous day date when we set date to field, we tried many option which found in support, but still we couldn't solve the problem. need a help to move on.</span> We need to set date format as "dd/mm/yyyy" in though out the app regardless of culture. but we cannot set <span class="colour" style="color: rgb(34, 34, 34);">ClockProviders.Local as the users will be from different countries and need to keep UTC.</span> Tried with adding new language as en-GB to get this date format also tried in ngx-bootstrap-datepicker-config.service.ts, but no luck. <span class="colour" style="color: rgb(34, 34, 34);">While we are saving the date, below format will come </span> <span class="colour" style="color: rgb(34, 34, 34);">When we set the value while edit form</span> <span class="colour" style="color: rgb(34, 34, 34);">I changed language to English GB to get date format as 'dd/mm/yyyy'. but format is not changing.</span>
As requested, ngx-bootstrap-datepicker-config.service.ts<span class="colour" style="color: rgb(34, 34, 34);"> code is below:</span>
static getDaterangepickerConfig(): BsDaterangepickerConfig {
return Object.assign(new BsDaterangepickerConfig(), {
containerClass: 'theme-' + NgxBootstrapDatePickerConfigService.getTheme()
});
}
static getDatepickerConfig(): BsDatepickerConfig {
return Object.assign(new BsDatepickerConfig(), {
containerClass: 'theme-' + NgxBootstrapDatePickerConfigService.getTheme()
});
}
static getTheme(): string {
return ThemeHelper.getTheme();
}
static getDatepickerLocale(): BsLocaleService {
let localeService = new BsLocaleService();
localeService.use(abp.localization.currentLanguage.name);
//localeService.use('en-GB');
return localeService;
}
static registerNgxBootstrapDatePickerLocales(): Promise<boolean> {
if (abp.localization.currentLanguage.name === 'en') {
return Promise.resolve(true);
}
let supportedLocale = new NgxBootstrapLocaleMappingService().map(abp.localization.currentLanguage.name).toLowerCase();
let moduleLocaleName = new NgxBootstrapLocaleMappingService().getModuleName(abp.localization.currentLanguage.name);
return new Promise<boolean>((resolve, reject) => {
import(ngx-bootstrap/chronos/esm5/i18n/${supportedLocale}.js)
.then(module => {
defineLocale(abp.localization.currentLanguage.name.toLowerCase(), module[${moduleLocaleName}Locale]);
resolve(true);
}, reject);
});
}
<br> Thanks.
Hello,
Getting an error while loading or sign in the application related to TokenAuth.
ERROR 2019-09-14 23:35:40,694 [75 ] Mvc.ExceptionHandling.AbpExceptionFilter - Can't create component '*.Web.Controllers.TokenAuthController' as it has dependencies to be satisfied.
'*.Web.Controllers.TokenAuthController' is waiting for the following dependencies:
- Service '*.Web.Authentication.JwtBearer.IProjectJwtSecurityStampHandler' which was not registered.
Castle.MicroKernel.Handlers.HandlerException: Can't create component '*.Web.Controllers.TokenAuthController' as it has dependencies to be satisfied.
'*.Web.Controllers.TokenAuthController' is waiting for the following dependencies:
- Service '*.Web.Authentication.JwtBearer.IProjectJwtSecurityStampHandler' which was not registered.
at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency()
at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext)
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) in D:\Github\castle-windsor-ms-adapter\src\Castle.Windsor.MsDependencyInjection\ScopedWindsorServiceProvider.cs:line 55
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
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.InvokeNextExceptionFilterAsync()
Any specific reason for this?. Thanks.
Hello, Getting error wile running the application, there is already one discussion is going on similar to this, tried those steps, but didn't worked. Also tried upgrading to newer version 7.1 to overcome this, but still we are facing the same. Tried downgrading of angular version to 8.0.1 but not able clear the issue.
Unhandled Promise rejection: Cannot read property 'toLowerCase' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'toLowerCase' of undefined
at setLocaleId (core.js:23665)
at core.js:27268
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(zone.js:391)
at Object.onInvoke (core.js:26769)
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(zone.js:390)
at Zone.push../node_modules/
zone.js/dist/zone.js.Zone.run
(zone.js:150)
at NgZone.push../node_modules/@angular/core/fesm5/core.js.NgZone.run (core.js:26683)
at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (core.js:27259)
at core.js:27302
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(zone.js:391) TypeError: Cannot read property 'toLowerCase' of undefined
at setLocaleId (
http://localhost:4200/vendor.js:71000:26
)
at
http://localhost:4200/vendor.js:74603:13
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(
http://localhost:4200/polyfills.js:12618:26
)
at Object.onInvoke (
http://localhost:4200/vendor.js:74104:33
)
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(
http://localhost:4200/polyfills.js:12617:52
)
at Zone.push../node_modules/
zone.js/dist/zone.js.Zone.run
(
http://localhost:4200/polyfills.js:12377:43
)
at NgZone.push../node_modules/@angular/core/fesm5/core.js.NgZone.run (
http://localhost:4200/vendor.js:74018:28
)
at PlatformRef.push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory (
http://localhost:4200/vendor.js:74594:23
)
at
http://localhost:4200/vendor.js:74637:59
at ZoneDelegate.push../node_modules/
zone.js/dist/zone.js.ZoneDelegate.invoke
(
http://localhost:4200/polyfills.js:12618:26
)
Hello,
Is there any way to inject dynamic entity in service to write a common method to get data from any table? or any inbuilt method available? Purpose: We need to create common lookup service which can get data from any entity to reduce repeated code for lookup table/dropdown services.
Thanks
Hello Team,
We are facing some issues with date manipulation, it inserts into DB with UTC format, but when retrieving the data in CRUD table shows in UTC date and while editing the data it shows invalid date, some time shows the wrong value, the menu was generated using RAD Tool.
Gone through the Timing documentation and tried with **ClockProviders **option and timezone settings in the administration settings menu, but no change, we need to save the data in UTC and display the data in local format. Attaching ADD/TABLE/EDIT views for the reference.
Hi,
How we can get the data which has MustHaveOrganisationId including child OU, added a custom filter for OU filter, but we need to get the data only under OU and sub OU which user has permission.
Thanks.
Hello,
We need to get the data from a table which is added under MustHaveTenant entity, some case we need to add data as a seed for all tenants with tenantid as ZERO. we need to get the data which comes under the logged in Tenantid as well as common data which we gave Id as ZERO.
How we can achieve this?
Thanks.