Open fengqi opened 1 year ago
Hello @fengqi. Thank you for your issue.
If I understand, it's an iOS issue?
Hello @nicosomb
I think there is a both issue with iOS and the server side,
When iOS call "/api/entries.json?page=1&perPage=50&order=desc", the given data is reversed(sort=create is the default)
When iOS get the data from the server, it uses the id to sort, even if the data given by the server is correct or not, the display is also reversed.
Environment
My
``` parameters: database_driver: pdo_mysql database_host: '********' database_port: 3306 database_name: 'wallabag' database_user: 'wallabag' database_password: '********' database_path: '%kernel.project_dir%/data/db/wallabag.sqlite' database_table_prefix: wallabag_ database_socket: null database_charset: utf8mb4 domain_name: 'https://***.example.com' server_name: WallbagPocket mailer_dsn: 'smtp://127.0.0.1' locale: zh secret: ******* twofactor_auth: true twofactor_sender: no-reply@wallabag.org fosuser_registration: true fosuser_confirmation: true fos_oauth_server_access_token_lifetime: 3600 fos_oauth_server_refresh_token_lifetime: 1209600 from_email: no-reply@wallabag.org rss_limit: 50 rabbitmq_host: localhost rabbitmq_port: 5672 rabbitmq_user: guest rabbitmq_password: guest rabbitmq_prefetch_count: 10 redis_scheme: tcp redis_host: 127.0.0.1 redis_port: 6379 redis_path: null redis_password: null sentry_dsn: null ```app/config/parameters.yml
is:What steps will reproduce the bug?
Usually, the data is inserted into the database sequentially, and the id is from small to large. When you need to query positive and negative by time(created), you can use id instead, but I encountered a special situation.
I imported some data from Pocket, and then I found that the display in iOS Client order is reversed.
I checked the query code and found that when $sort == "created" the id is actually used, but the data import order of Pocket is reversed.
So in this case, we can only use createdAt query, not id