I have a form on my site where students can upload a PDF of their work for evaluation.
This has been working until very recently - and now all of a sudden, there is an upload error for some PDFs.
If I open the PDF and print it to a new PDF, it uploads just fine.
Is this something to do with the PDF codex? Why will it upload some PDFs and not others?
I have two files - the one that won't upload and the one I re-printed that does upload - and, in fact, the one that DOES work is BIGGER than the one that doesn't. (2.05 MB vs 92kb).
I can send them to you ... how would I dropbox them to you?
If it helps - one of my students told me that he creates his documents in Google docs, and then downloads them from there as a PDF before uploading them through my website form.
So maybe it has something to do with the Google doc codex?
I tested both PDF files on a local site in a front-end form.
I tested with both settings in the form for whether to use the Media Uploader or not.
In all cases the PDFs uploaded without problem.
So the issue seems particular to your set-up or server.
When trying and failing to upload the problem PDF, can you double check your browser console and your PHP debug logs for errors that might indicate why the upload failed?
If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:
That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor. Try submitting the form again and then inspect the log. If you don't find the debug.log file it means it didn't generate any warnings or errors.
If there are no errors showing that indicate why, it would be time to look for conflicts with other plugins or your theme that may be interfering. Hopefully you have a staging site to try disabling plugins and switching theme.
I updated the Toolset plugins as you suggested (I don't know why I hadn't been alerted that they needed updating in the usual way?) - and when I tried again to upload the file that wouldn't upload before - it worked.
I'm going to ask my students to test it out to make sure this has fixed the problem ...and I will let you know.
We've introduced a system to release major updates in stages so that if serious problems occur they can be identified before all users are affected, so it may be that the system hadn't flagged you for an update yet.
But at any time you can use the "Check for updates" button to force a refresh.