Duplicate Upload of File Produces General Error

Bug #366361 reported by Anthony
2
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Shane Hathaway

Bug Description

Submitting a duplicate file to the same folder produces a General KARL Error screen. I will include the page source in the ticket.

Tags: file-upload
Revision history for this message
Anthony (agalietti) wrote :
Changed in karl3:
assignee: nobody → paul-agendaless
tags: added: file-upload
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Shane, the behavior on this is right, the problem is the handling of the error.

On many content types, we allow duplicates by implicitly adding and increment (e.g. "-1") to the __name__. However, File instances get their __name__ from the uploaded filename, which we aren't to munge.

I suspect the solution is to convert this from a ValueError to a form validation error. That way, when the user uses the Add File form to upload a duplicate, we put them back on that form with a friendly error message.

I realize that the form machinery (as it is) might be new territory for you. So feel free to assign it back to me, and I/ChrisR/Balazs can tackle it.

This probably reveals a flaw in my "pretty error handler." Perhaps it should try to show the exception name and value on "General KARL Error" screens.

Changed in karl3:
assignee: paul-agendaless → shane-hathawaymix
importance: Undecided → Medium
milestone: none → m12
Revision history for this message
Shane Hathaway (shane-hathawaymix) wrote :

Fixed in revision 2437. The code that does the right thing already existed, but was being masked by another error handler.

Changed in karl3:
status: New → Fix Committed
Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.