• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue Creating two resources at once will mix up the files

Affected version
Current xenforo.com version.

katsulynx

Well-known member
#1
When creating two resources at the same time in different tabs, the resource file that has been uploaded to the second tab will be chosen for the resource in the first tab upon submitting the resource. Trying to save the second resource afterwards will result in a "You must upload a file or provide an external download URL." error, but the file will stay listed on the creation page. The file originally uploaded for the first form seems to be lost in the process.
 

Mike

XenForo developer
Staff member
#2
When you started the second resource, did you have to delete draft data from the first one? If so, that would generally be expected then (and would apply in XF1 too) as you're actually working on the same set of draft data, which would include the unique key for attachments.
 

katsulynx

Well-known member
#3
When you started the second resource, did you have to delete draft data from the first one? If so, that would generally be expected then (and would apply in XF1 too) as you're actually working on the same set of draft data, which would include the unique key for attachments.
I've clicked the 'Add resource...' button twice when I started, so there wasn't anything to be shown to begin with. Attachments have been mashed together too though, so I'd say that's likely the case. It kinda caught me by surprise because there wasn't any visible indication (like the draft data).
 

Mike

XenForo developer
Staff member
#4
I couldn't reproduce this.

I have to guess that a draft was involved. However, what's confusing is that there shouldn't be a draft at all unless there's content in the main "message" body (the description in the RM case), so something should normally have to be deleted at least. I suppose there could potentially be some non-viewable content (like an empty set of BB code), though that certainly shouldn't be common.

On that basis though, I'm not sure there's necessarily a great way to solve this seamlessly (without essentially removing drafts). I don't think there's an especially large expectation that you'd be drafting two distinct resources/threads/replies to one thread simultaneously, though it could happen. However, I don't think there's any change to make here.