I don't know who you guys have hired as a developer, but I think it's time you thought about hiring a professional. Your code is a friggin' mess. That being said, I've attempted to upload files a few times and the posts always go through. My Title, Date and Notes fields are stored just fine (woohoo!), but the file itself never uploads. Whenever I click to view images from my ‘My Account’ section, I get a 404 error. I've tried in Safari and Firefox and had the same results.
A major problem is your choice of uploading script. It may have seemed like a huge time saver to use 3rd party prewritten code like Uploadify to speed up the development of your new uploader, but ultimately your laziness has come back to bite you in the ass. The biggest problem with entrusting portions of your site to code that you yourself have not written is that when something goes wrong you have to waste huge amounts of time reverse engineering someone else's code.
From my testing however, Uploadify is working fine and doing everything that it's supposed to, which is a miracle considering how many overlapping javascript frameworks you guys have on this site.
What you're missing is a callback error!Once the user clicks the ‘Upload Pages’ button, your steps should be:
1. Javascript Checks Data is filled out
2. Post Data to PHP
3. PHP Checks to ensure file uploads.
4. Insert Data into Database
5. Alert Javascript of Success or Error
6. If Success Remove Element from Page
7. If all Elements have been removed, redirect.
Currently you're skipping steps 3 and 5. Here is your current step 6, where you will need to insert step 5:
onComplete: function(event, id) {
jQuery('fieldset.' + id).remove();
},
Which basically says, once the data is posted to the PHP file, drop the feilds (title, notes, date) associated with that file.
But, if your PHP file throws an error, you're ignoring it and just moving along to the next file! I'd say it's a 99% chance your error is in your PHP file or can be identified with you PHP file (like a server error). So tell your onComplete function to get the callback, and simply echo a response on your PHP script. Whatever is echoed on that page will be passed along to the onComplete function. If it's not “Success” (or whatever phrase you want to use) then alert the user of the error and keep the progress bar from disappearing by throwing a ‘return false’ in there.
onComplete: function(event, id, file, message){
if (messsage != "Success") {
alert('File: ' + file.name + ' failed to upload. \nError: ' + message);
return false;
} else {
jQuery('fieldset.' + id).remove();
}
},
Now, this is only for error checking and alerting your users that errors occur before they waste their time. This won't solve your problem, but it will help you better identify where the problem lies.
However, I am not at all condoning that your process as correct. If you use a site like Flickr, they are using a similar Ajax+Flash solution for multi-file upload. The difference is, that they check to ensure the file is uploaded first before allowing you to add things like titles, dates, notes, or whatever to it. You're making your users do all of their work ahead of time before they even know if their files will upload, which is just adding more fuel to the fire and why you're seeing so much user frustration. If I write a 4 paragraph update on a page and then hit upload and it fails, I have to start all over again. Don't waste your users time or they will leave.
On the subject of javascript frameworks in general, you really should
choose one and stick with it. If you're going to use prototype, use prototype. I you want to use jQuery, use jQuery. There's no reason to load two big frameworks that do many of the same things. And when you do use them, load them from Google's AJAX Library:
http://code.google.com/apis/ajaxlibs/documentation/ … The chances of you users already having the file cached from another website are extremely high if everyone who uses these libraries links to a single source. This will speed up initial loading times and lower some of your bandwidth usage.
I could go on and on about how this site doesn't use valid html, over uses tables for non-tabular design elements, loads 12 .js files (most of which aren't used) for every single page loaded, loads 4 css files, adds ?cache= the current date and time to every one of these files to keep users browsers from caching these files (which means my browser loads these external flles as if they are new files for every single page I go to) etc..