I have…
- [x] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
- [x] Used code blocks with ``` to format my code examples like JSON or logs properly.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [x] Bug report
- [ ] Performance issue
- [ ] Documentation issue or request
Current behavior
I found this error in the log. It seems to appear when i try browse content sorted by text field which contains empty/null value.
{message: ‘Object reference not set to an instance of an object.’, stackTrace: ’ at Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations.Extensions.<>c.b__6_0(IdOnly x) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs:line 120
at System.Linq.Enumerable.SelectListIterator2.ToList() at Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations.Extensions.QueryContentsAsync(IMongoCollection
1 collection, FilterDefinition`1 filter, ClrQuery query, Q q, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/Extensions.cs:line 132
at Squidex.Domain.Apps.Entities.MongoDb.Contents.Operations.QueryByQuery.QueryAsync(ISchemaEntity schema, Q q, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/Operations/QueryByQuery.cs:line 127
at Squidex.Domain.Apps.Entities.MongoDb.Contents.MongoContentCollection.QueryAsync(IAppEntity app, ISchemaEntity schema, Q q, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities.MongoDb/Contents/MongoContentCollection.cs:line 216
at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.QueryCoreAsync(Context context, Q q, ISchemaEntity schema, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 274
at Squidex.Domain.Apps.Entities.Contents.Queries.ContentQueryService.QueryAsync(Context context, String schemaIdOrName, Q q, CancellationToken ct) in /src/src/Squidex.Domain.Apps.Entities/Contents/Queries/ContentQueryService.cs:line 140
at Squidex.Areas.Api.Controllers.Contents.ContentsController.GetContentsPost(String app, String schema, QueryDto query) in /src/src/Squidex/Areas/Api/Controllers/Contents/ContentsController.cs:line 132
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)’, type: ‘System.NullReferenceException’}
Expected behavior
Minimal reproduction of the problem
Environment
- [x] Self hosted with docker
- [ ] Self hosted with IIS
- [ ] Self hosted with other version
- [ ] Cloud version
Version: 7.8.1.0