MyBB Community Forums

Full Version: Upload Multiple Attachment Problem!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a problem on my forum.

Whenever you add an attachment to a post in the New Reply page, it goes on fine, but then if you try to add a second attachment the first one disappears from the "Attachments" section bit at the bottom (above Poll options).

Not only that, but the second file fails to attach as well, meaning that only one file can be attached.

You can get multiple files to go up if you upload one, post the message, then edit it and upload another, post...etc, but this takes a load of time.

This really needs to be fixed, but I can't find a topic that deals with this case.

-DrPoodle
Can you please provide me with a list of plugins you have installed?

Also - if you could provide me with some sort of database access (PHPMyAdmin) and FTP access so I can work through it and determine what is causing this, it'd be appreciated.

Chris
Ok, this might take a while, since I am suffering from a rare MyBB illness known as "Plugin Addiction":

Emergency Message System
Advanced Plugins
Automatic PM on Move/Rename/Delete Thread
Attachment Icons
Auto Prune
Board Message
Browse Thread
Cash/Bank/Points Mod
Custom Page
Disallow Admin Banning
Default Avatar and Signature
Downloads Section for MyBB
Easy Adv. Banner
Easy Install
Email Notification on Registration
Last seen online in Postbits
Name BBCode
Permissions box!
Private Message Report System
Cannot send PM's To self
Post Grade
Profile Views Count
Quick Quote
Shoutbox
Smilie Groups
Snow Flakes
Spoiler Tag
Show Unanwsered Threads
Table Tag
Thread Descriptions
Unread PM Notification
WelcomePanel [Index]

I will send you the FTP and database location in a PM.

Thanks for your help.
The problem was the auto prune plugin of Dennis'.

Basically:
- When you upload an attachment to a new thread or post it is stored witha pid of 0 (because the post doesn't exist yet)
- The auto prune plugin appended 0 to the list of pid's to delete from the attachments table - meaning whenever it ran, it deleted the attachments not associated to a post yet.

I've fixed it on your forums and attached is an updated version of the plugin.
Wooo! You ROCK Chris!

Thanks ever so much.

I take it my plugin is now updated to the one shown. Also, I got a weird SQL error when I loaded the forum up at lunch, but you were online at the same time, so I guess you were in the middle of changing something.

The error was:
mySQL error: 1064

and had something to do with posts or something. It went after a minute or so, and hasn't reappeared. If it is anything to worry about, please tell me!

Once again, thanx
-DrPoodle
Sorry for double post, but my girlfriend (who found the problem) forced me into posting her thanks:

Quote:Thank you so much! That problem was a nightmare! You are an amazing programmer thingy! Thank you!

So there you go, Chris has got a new fan Toungue
WoW she even said thingy. I thought that was my thing.
Actually, that error shouldn't be an problem if you don't get it again, since it probably was while he was changing something, because it's an error with an mysql query, example "SELECT * FROM users WHERE username='wee's'" would lead to that error since the ' in the query isen't parsed.
So if it doesen't happen again it's no problem.
Quote:The error was:
mySQL error: 1064
Yes, that was me.

I accidently hit save in the text editor causing the file to upload when I'd only half finished changing it. Wink