Attaching file A then file B then file A again causes some problems

gmayes - February 29, 2008 - 01:33
Project:Attachment
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Howdy,

I'm running Drupal 5.2 with filemanager-5.x-1.x-dev and attachment-5.x-1.x-dev, and core "Upload" disabled.

I know people shouldn't be uploading the same file twice, but it's hard to be picky about our end-users...

Steps to reproduce (I tried this with several combinations of file extensions):
- Start creating a new node
- Attach any file (file A)
- Attach any other file (file B)
- Attach file A again

What happens:
- The filename, URL and size, but not the title, of file B are overwritten with the specs of file A.

What I expected to happen:
- Ideally, that attaching file A again is completely ignored.

Thanks, Geoff

#1

gmayes - February 29, 2008 - 03:14
Title:Attaching file A then file B then file A again overwrites file B» Attaching file A then file B then file A again causes some problems

More bug cases, including the one from the node description:

1. The first case from this node's description: Creating/editing a node
- Attach file A
- Attach file B
- Attach A again and submit
- The filename, URL and size, but not the title, of file B are overwritten with the specs of file A.
* Attaching file A again should be ignored and not overwrite file B's info

2. Editing a node
- Attach file A and submit
- Edit the node again
- Attach file A again
- No errors occur and it seems as if nothing happens
- Clicking "Preview" does not show a second file A
- Clicking "Submit", and after the node is loaded, shows two of file A
- steps 3-6 can be repeated indefinitely, adding file A once per time
* If the edit page and preview page do not show the second (or third or fourth, etc) file A, then it shouldn't be lingering behind-the-scenes and get attached when submitted. This is my ideal behavior: trying to upload the same filename is completely ignored by the UI, POST/GET vars, db, etc. And perhaps a message letting the user know that a file with the same filename cannot be attached to a single node.

3. Creating/editing
- Attach file A
- Attach file B
- Attach file A again
- Click the "Delete" checkbox for the first (should be the only one available) file A
- Clicking "Submit" borks the URL for file B (and files C-Z if they too are attached) from, for example, http://url/files/active/6/filename to http://url/files/active//
* File A should just be deleted and not affect the URLs for any other attachments

Regards, Geoff

#2

samo - March 4, 2008 - 00:09

Subscribing. We have also seen this issue.

 
 

Drupal is a registered trademark of Dries Buytaert.