[NOT_REPRODUCIBLE] OrderBy doesn't work property with Id filtering

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [X] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

I have

  • An app that has users schema.
  • Users schema has username property.

I query users content with

  • a filter $filter that excludes predefined user ids.
  • sorted by username
  • (it may have $skip option).

In the end, the query looks like

$filter=id ne '<guid>'&$orderby=data/username/iv&$skip=10

Current behavior

The content is returned in a random order (not by username).

Expected behavior

The content is returned in the correct order by username.

Note, the $orderby is working correctly if the $filter doesn’t have id filtering.
E.g, this query will work perfectly

$filter=data/uid/iv ne '<uid>'&$orderby=data/username/iv&$skip=10

Environment

  • [ ] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [4.4.0.0]

Browser:

  • [X ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [X ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
.Net Client Library 4.2.0

Have you tried adding ascendingt explicitely? Perhaps there is the bug, e.g.

$filter=data/uid/iv ne '<uid>'&$orderby=data/username/iv asc&$skip=10

I don see why it should be related to the filter.

asc or desc doesn’t help.

Request

{{squidex_url}}/users?$filter=(id ne '123' and data/fullName/iv ne null)&$orderby=data/fullName/iv asc&$skip=1

Response

    "total": 16,
    "items": [
        {
            ...
            "data": {
                ...
                "fullName": "Khoa",
                ...
            },
            ...
        },
        {
            ...
            "data": {
                ...
                "fullName": "Cy New",
                ...
            },
            ...
        },
        {
            ...
            "data": {
                ...
                "fullName": "Khoa Dang",
                ...
            },
            ...
        },
        ....

There are 2 more notices:

  1. Even I repeat the same query URL twice, the response I got is different.
  2. I tried with a pretty old instance of Squidex (1.0.0), it’s working fine ;).
    Then, it seems some updates cause the issue.

fyi @Sebastian.

I tried it locally and cannot reproduce it. I also have some integration tests running for each build.

Strange! I tried to do the test on different projects in the same Squidex instance, the result is the same.
Anyway, I will check the version of Squidex again as well as looking into the integration test cases.

1 Like