Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Seems that you are trying to pass an URL to ID variable, or you have already defined in the DB a file with an URL inside the ID and it fails when you are trying to sort files by ID and it finds the Url there.