Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
If I delete a field that was previously sorted/ordered in Parse Dashboard, when I try to load the records from that class, returns a 500 error.
Steps to reproduce
I created a column (named ‘s’) in the Contact class to test the schema, then I deleted it via Dashboard and via JS SDK but when I click on the dashboard Contact Class, no records are showing, and parse server log complains with error:
error: column "s" does not exist {"code":1,"stack":"Error: error: column \"s\" does not exist\n at /Users/Martin/Dev/Parse-Server/node_modules/parse-server/lib/Controllers/DatabaseController.js:1164:21\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"}
If I create the field again (via dashboard or via JS) the error goes away and the records appear
I found the cause in the POST request when I select the Contact Class that returns a 500 error
XHRPOST http://localhost:1337/parse/classes/Contact
[HTTP/1.1 500 Internal Server Error 6ms]
_ApplicationId "appId"
_ClientVersion "js3.4.1"
_InstallationId "8ad5475f-30e5-4a1"
_MasterKey "masterKey"
_method "GET"
limit 200
order "s" //<-- here is where I realize the problem
where {}
Actual Outcome
Error 500
Expected Outcome
Not get the error and load the records
Environment
Local environment
Server
- Parse Server version:
5.3.2
- Operating system:
macOS Monterrey
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
Postgres
- Database version:
14.3
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
(I did not tried in remote)
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
JavaScript
- SDK version:
3.4.2