• 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.

Item7486: When uploaded file names are changed, the name changes are not shown

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   patch 6.0.1

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


The problem

This is about the behavior of TWiki::UI::Upload::upload(). If the name of an attached file contains problematic characters, they are replaced or removed and the file is saved with a different file name. When that happens, the original and changed names are supposed to be shown on the oopsattention page. But after TWiki::UI::execute() was modified to call TWiki::UI::Oops::oops() rather than redirecting to the oops script, the name change listed stopped working.

The fix

  • The "uploaded_name_changed" message in templates/messages.tmpl
    • It assumed the oops script to be executed and was referring to %URLPARAM{param1}%, %URLPARAM{param2}%, ..., which need to be replaced with %PARAM1%, %PARAM2%, ...
  • TWiki::UI::Oops::oops()
    • %IF{"'%PARAM1%'=''" then="..." else="...}% didn't work. To make it work...
    • $session->handleCommonTags(...) before %PARAM1%, %PARAM2%, ... replacement needs to be removed
    • Remaining %PARAM\d+% needs to be replaced with a null string

-- TWiki:Main/HideyoImazu - 2014-04-17

Summary When uploaded file names are changed, the name changes are not shown
ReportedBy TWiki:Main.HideyoImazu
Codebase ~twiki4, 6.0.0
SVN Range TWiki-6.0.1-trunk, Wed, 16 Apr 2014, build 27287
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins TWikirev:27291 TWikirev:27292
TargetRelease patch
ReleasedIn 6.0.1
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r6 - 2014-10-06 - PeterThoeny
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback