This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the dumb-mistakes-and-gotchas category.
Last Updated: 2024-11-21
I had 40 errors related to MimeType not found
and I saw the word NotesFile
pop out at me in the backtrace. Knowing that this model deals with uploaded
files that have various mime types, I went straight to the code for this
NotesFile
model and started debugging -- without reading a single detailed
line of the backtrace.
I lost about 10 minutes proving there was no error in the code for this model.
Then I read the actual backtrace in detail and saw that the underlying cause
was, in fact, due to the ZipFile
model, which also dealt with uploaded files
(albeit seldomly).
Look at the actual backtrace instead of guessing. It is always faster to go the correct error location from the get-go.