I have a File field for uploading pdfs. When editing the page, I remove the current pdf and upload a new pdf. The new pdf is uploaded to the server and add to the /sites/default/files folder and I can access the new pdf. However, the page still references the previous pdf that was uploaded.
I check the database and noticed that the new pdf was added to the files_managed and the files_usage tables but NOT the files table. Any idea why this would be and how I can get the File field to reference the latest uploaded pdf?
In a template, I have a db query for the file id, when I print the fid on the page, it shows the outdated file id instead of the new file id.