Bug: Rename Loses Skin Info
- The rename script picks the rename.tmpl instead of rename.FOO.tmpl
- The skin is set to FOO in TWikiPreferences.
It appears the contents of the the $skin variable are not set with the call to TWiki::Prefs::getPreferencesValue("SKIN") because it is called before the call to TWiki::Initialize() which initializes the preferences.
I moved the call to TWiki::Initialize() to just after the setting the five parameters it needs.
*** /c/twiki-20021206alpha/bin/rename Thu Nov 28 17:17:08 2002
--- /twiki/bin/rename Sat Dec 7 10:24:10 2002
***************
*** 37,45 ****
my $thePathInfo = $query->path_info();
my $theRemoteUser = $query->remote_user();
my $theTopic = $query->param( 'topic' );
my $newWeb = $query->param( 'newweb' ) || "";
my $newTopic = $query->param( 'newtopic' ) || "";
- my $theUrl = $query->url;
my $lockFailure = "";
my $breakLock = $query->param( 'breaklock' );
my $theAttachment = $query->param( 'attachment' );
--- 37,49 ----
my $thePathInfo = $query->path_info();
my $theRemoteUser = $query->remote_user();
my $theTopic = $query->param( 'topic' );
+ my $theUrl = $query->url;
+
+ my ( $oldTopic, $oldWeb, $scriptUrlPath, $userName, $dataDir ) =
+ &TWiki::initialize( $thePathInfo, $theRemoteUser, $theTopic, $theUrl, $query ); # DRKW difference to core
+
my $newWeb = $query->param( 'newweb' ) || "";
my $newTopic = $query->param( 'newtopic' ) || "";
my $lockFailure = "";
my $breakLock = $query->param( 'breaklock' );
my $theAttachment = $query->param( 'attachment' );
***************
*** 56,64 ****
$theAttachment = "";
}
- my ( $oldTopic, $oldWeb, $scriptUrlPath, $userName, $dataDir ) =
- &TWiki::initialize( $thePathInfo, $theRemoteUser, $theTopic, $theUrl, $query ); # DRKW difference to core
-
my $wikiUserName = &TWiki::userToWikiName( $userName );
# justChangeRefs will be true when some topics that had links to $oldTopic
--- 60,65 ----
Test case
Environment
| TWiki version: |
alpha20021206 |
| TWiki plugins: |
TigerSkin, SessionPlugin |
| Server OS: |
WinXP 2.0 |
| Web server: |
Apache |
| Perl version: |
5.6.1 |
| Client OS: |
n/a |
| Web Browser: |
n/a |
--
JonLambert - 07 Dec 2002
Follow up
Thanks for the patch - if you can do one following the
PatchGuidelines it will make it much easier to apply this to other versions of the alpha release. I'm not sure exactly what this is fixing - can you be more specific?
--
RichardDonkin - 07 Dec 2002
I changed the above. Is that closer to what you need.
--
JonLambert - 07 Dec 2002
Fix record
Thanks for the patch. Is now fixed and in
TWikiAlphaRelease.
--
PeterThoeny - 05 Jan 2003
I missed Jon's response due to
ConversationTracking issues... Thanks for updating the patch.
--
RichardDonkin - 05 Jan 2003