• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5130: Clicking "Upload" when changing properties gives sub-optimal result

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

The attachments management screen has two buttons; "Upload" and "Change Properties".

If you click "manage" in the attachments table, you get a screen with an empty file path. if you then click "Add link" or "Hide file" and click "Upload" by mistake, then you get a stack dump.

Use of uninitialized value in hash element at (eval 95) line 3.
 at /home/twiki/MAIN/lib/TWiki/UI.pm line 84
   TWiki::UI::__ANON__('Use of uninitialized value in hash element at (eval 95) line 3.\x{a}') called at (eval 95) line 3
   CGI::tmpFileName('CGI=HASH(0x8247af8)', '') called at /home/twiki/MAIN/lib/TWiki/UI/Upload.pm line 193
   TWiki::UI::Upload::upload('TWiki=HASH(0x847e2cc)') called at /home/twiki/MAIN/lib/TWiki/UI.pm line 159
   TWiki::UI::__ANON__() called at /usr/local/share/perl/5.8.8/Error.pm line 426
   eval {...} called at /usr/local/share/perl/5.8.8/Error.pm line 418
   Error::subs::try('CODE(0x814ed30)', 'HASH(0x881b708)') called at /home/twiki/MAIN/lib/TWiki/UI.pm line 197
   TWiki::UI::run('CODE(0x82da534)') called at /home/twiki/MAIN/bin/upload line 32.

-- TWiki:Main/CrawfordCurrie - 14 Dec 2007

You do? I get the message Either you did not specify a file name, or the file you are trying to upload "" has no content. You may not upload an empty file.

-- TWiki:Main.ArthurClemens - 14 Dec 2007

It is trivial to reproduce in this topic.

  1. Click "manage" for the attachment "afa.mid" in the attachments table
  2. Click "Upload file"
Boom

CC

See also Item5133, which has the same stack trace.

-- TWiki:Main.CrawfordCurrie - 15 Dec 2007

Fixed by wrapping an exception handler around the tmpFileName call.

CC

ItemTemplate
Summary Clicking "Upload" when changing properties gives sub-optimal result
ReportedBy TWiki:Main.CrawfordCurrie
Codebase

SVN Range TWiki-4.3.0, Sun, 25 Nov 2007, build 15790
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16001 TWikirev:16002
TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Waveform sound filemid afa.mid r1 manage 0.2 K 2007-12-15 - 08:52 CrawfordCurrie  
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-12-15 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback