I've found a change in behaviour between 4.1.2 and 4.2 when displaying the list of attachments on a topic. Attachments that were uploaded under 4.1.2 (or earlier) have the META:FILEATTACHMENT user set in the format "Main.TWikiName", but with 4.2 it is in the format "loginname". 4.2 uploaded attachments show the 'Who' as a a proper TWiki link, but topics from a 4.1.2 install show as 'MainTWikiUser?' (no dot between Main and
TWikiName). This is using {LoginManager}ApacheLogin with {AllowLoginName} checked and {UserMappingManager}TwikiUserMapping.
Another 4.2 system I have that uses {LoginManager}TemplateLogin, {AllowLoginName} unchecked and {UserMappingManager}TwikiUserMapping has META:FILEATTACHMENT user set as 'TWikiName', not 'Main.TWikiName' as 4.1.2 did. The links show correctly for both 4.1.2 & 4.2 uploaded attachments.
--
TWiki:Main/MartinRowe
- 08 Feb 2008
mmm, ok, this is quite odd. I just created a test setup in 4.2.x, with
{AllowLoginName}
= 1; and with a user loginname = sven, wikiname=SvenDowideit
I attached a file, and then hand edited (from the command line) the topic, replacing "sven" with "Main.SvenDowideit". This displayed a correct link, as expected. I also logged out, but even then it rendered as it should.
This bug report worries me, because we spent so much time making sure that it displays the 4.1.2 users (and before too) correctly. The only way I was able to get a link to
MainSvenDowideit (without the dot) was to set user="MainSvenDowideit".
Martin - we need more info :/
--
TWiki:Main.SvenDowideit
- 31 Mar 2008
I can confirm this. I just upgraded 2 of my corporate TWikis from 4.1.2 to 4.2.0 and all Attachment "who" columns now show 'MainTWikiUser', even though the %META:FILEATTACHMENT{ use="Main.TWikiUser" }
I am attaching my configuration file, it sounds like this has to do with a specific configuration...
# Local site settings for TWiki. This file is managed by the 'configure'
# CGI script, though you can also make (careful!) manual changes with a
# text editor.
$TWiki::cfg{DefaultUrlHost} = 'https://my.domain.com';
$TWiki::cfg{PermittedRedirectHostUrls} = '';
$TWiki::cfg{ScriptUrlPath} = '/twiki/bin';
$TWiki::cfg{PubUrlPath} = '/twiki/pub';
$TWiki::cfg{PubDir} = '/srv/www/htdocs/twiki/pub';
$TWiki::cfg{TemplateDir} = '/srv/www/htdocs/twiki/templates';
$TWiki::cfg{DataDir} = '/srv/www/htdocs/twiki/data';
$TWiki::cfg{LocalesDir} = '/srv/www/htdocs/twiki/locale';
$TWiki::cfg{WorkingDir} = '/srv/www/htdocs/twiki/working';
$TWiki::cfg{ScriptSuffix} = '';
$TWiki::cfg{Password} = 'I2Wv8nrQVFotQ';
$TWiki::cfg{SafeEnvPath} = '/bin:/usr/bin';
$TWiki::cfg{UseClientSessions} = 1;
$TWiki::cfg{Sessions}{ExpireAfter} = 21600;
$TWiki::cfg{Sessions}{ExpireCookiesAfter} = 0;
$TWiki::cfg{Sessions}{IDsInURLs} = 0;
$TWiki::cfg{Sessions}{UseIPMatching} = 1;
$TWiki::cfg{Sessions}{MapIP2SID} = 0;
$TWiki::cfg{LoginManager} = 'TWiki::LoginManager::ApacheLogin';
$TWiki::cfg{LoginNameFilterIn} = '^[^\\s\\*?~^\\$@%`"\'&;|<>\\x00-\\x1f]+$';
$TWiki::cfg{DefaultUserLogin} = 'guest';
$TWiki::cfg{DefaultUserWikiName} = 'TWikiGuest';
$TWiki::cfg{AdminUserLogin} = 'admin';
$TWiki::cfg{AdminUserWikiName} = 'TWikiAdminUser';
$TWiki::cfg{SuperAdminGroup} = 'TWikiAdminGroup';
$TWiki::cfg{UsersTopicName} = 'TWikiUsers';
$TWiki::cfg{AuthScripts} = 'attach,edit,manage,rename,save,upload,viewauth,rdiffauth,rest';
$TWiki::cfg{AuthRealm} = 'Enter your TWiki.LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. !JohnSmith, unless you chose otherwise). Visit TWiki.TWikiRegistration if you do not have one.';
$TWiki::cfg{UserMappingManager} = 'TWiki::Users::TWikiUserMapping';
$TWiki::cfg{Register}{EnableNewUserRegistration} = 1;
$TWiki::cfg{Register}{HidePasswd} = 1;
$TWiki::cfg{PasswordManager} = 'none';
$TWiki::cfg{MinPasswordLength} = 6;
$TWiki::cfg{Htpasswd}{FileName} = '/etc/apache2/passwd';
$TWiki::cfg{Htpasswd}{Encoding} = 'crypt';
$TWiki::cfg{OS} = 'UNIX';
$TWiki::cfg{DetailedOS} = 'linux';
$TWiki::cfg{DenyDotDotInclude} = 1;
$TWiki::cfg{AllowInlineScript} = 1;
$TWiki::cfg{UploadFilter} = '^(\\.htaccess|.*\\.(?i)(?:php[0-9s]?(\\..*)?|[sp]htm[l]?(\\..*)?|pl|py|cgi))$';
$TWiki::cfg{NameFilter} = '[\\s\\*?~^\\$@%`"\'&;|<>\\[\\]\\x00-\\x1f]';
$TWiki::cfg{AccessibleENV} = '^(HTTP_\\w+|REMOTE_\\w+|SERVER_\\w+|REQUEST_\\w+|MOD_PERL)$';
$TWiki::cfg{AntiSpam}{EmailPadding} = '';
$TWiki::cfg{AntiSpam}{HideUserDetails} = 1;
$TWiki::cfg{AntiSpam}{RobotsAreWelcome} = 1;
$TWiki::cfg{Log}{view} = 1;
$TWiki::cfg{Log}{search} = 1;
$TWiki::cfg{Log}{changes} = 1;
$TWiki::cfg{Log}{rdiff} = 1;
$TWiki::cfg{Log}{edit} = 1;
$TWiki::cfg{Log}{save} = 1;
$TWiki::cfg{Log}{upload} = 1;
$TWiki::cfg{Log}{attach} = 1;
$TWiki::cfg{Log}{rename} = 1;
$TWiki::cfg{Log}{register} = 1;
$TWiki::cfg{ConfigurationLogName} = '/srv/www/htdocs/twiki/data/configurationlog.txt';
$TWiki::cfg{DebugFileName} = '/srv/www/htdocs/twiki/data/debug.txt';
$TWiki::cfg{WarningFileName} = '/srv/www/htdocs/twiki/data/warn%DATE%.txt';
$TWiki::cfg{LogFileName} = '/srv/www/htdocs/twiki/data/log%DATE%.txt';
$TWiki::cfg{Languages}{es}{Enabled} = 1;
$TWiki::cfg{Languages}{cs}{Enabled} = 1;
$TWiki::cfg{Languages}{pt}{Enabled} = 1;
$TWiki::cfg{Languages}{fr}{Enabled} = 1;
$TWiki::cfg{Languages}{ru}{Enabled} = 1;
$TWiki::cfg{Languages}{sv}{Enabled} = 1;
$TWiki::cfg{Languages}{it}{Enabled} = 1;
$TWiki::cfg{Languages}{da}{Enabled} = 1;
$TWiki::cfg{Languages}{jp}{Enabled} = 1;
$TWiki::cfg{Languages}{'zh-cn'}{Enabled} = 1;
$TWiki::cfg{Languages}{bg}{Enabled} = 1;
$TWiki::cfg{Languages}{pl}{Enabled} = 1;
$TWiki::cfg{Languages}{nl}{Enabled} = 1;
$TWiki::cfg{Languages}{'zh-tw'}{Enabled} = 1;
$TWiki::cfg{Languages}{de}{Enabled} = 1;
$TWiki::cfg{DisplayTimeValues} = 'gmtime';
$TWiki::cfg{DefaultDateFormat} = '$day $month $year';
$TWiki::cfg{Site}{Locale} = 'en_US.ISO-8859-1';
$TWiki::cfg{Site}{LocaleRegexes} = 1;
$TWiki::cfg{UpperNational} = '';
$TWiki::cfg{LowerNational} = '';
$TWiki::cfg{PluralToSingular} = 1;
$TWiki::cfg{StoreImpl} = 'RcsWrap';
$TWiki::cfg{RCS}{ExtOption} = '';
$TWiki::cfg{RCS}{dirPermission} = 493;
$TWiki::cfg{RCS}{filePermission} = 420;
$TWiki::cfg{Store}{RememberChangesFor} = 2678400;
$TWiki::cfg{RCS}{asciiFileSuffixes} = '\\.(txt|html|xml|pl)$';
$TWiki::cfg{RCS}{initBinaryCmd} = '/usr/bin/rcs -i -t-none -kb %FILENAME|F%';
$TWiki::cfg{RCS}{initTextCmd} = '/usr/bin/rcs -i -t-none -ko %FILENAME|F%';
$TWiki::cfg{RCS}{tmpBinaryCmd} = '/usr/bin/rcs -kb %FILENAME|F%';
$TWiki::cfg{RCS}{ciCmd} = '/usr/bin/ci -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%';
$TWiki::cfg{RCS}{ciDateCmd} = '/usr/bin/ci -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%';
$TWiki::cfg{RCS}{coCmd} = '/usr/bin/co -p%REVISION|N% -ko %FILENAME|F%';
$TWiki::cfg{RCS}{histCmd} = '/usr/bin/rlog -h %FILENAME|F%';
$TWiki::cfg{RCS}{infoCmd} = '/usr/bin/rlog -r%REVISION|N% %FILENAME|F%';
$TWiki::cfg{RCS}{rlogDateCmd} = '/usr/bin/rlog -d%DATE|D% %FILENAME|F%';
$TWiki::cfg{RCS}{diffCmd} = '/usr/bin/rcsdiff -q -w -B -r%REVISION1|N% -r%REVISION2|N% -ko --unified=%CONTEXT|N% %FILENAME|F%';
$TWiki::cfg{RCS}{lockCmd} = '/usr/bin/rcs -l %FILENAME|F%';
$TWiki::cfg{RCS}{unlockCmd} = '/usr/bin/rcs -u %FILENAME|F%';
$TWiki::cfg{RCS}{breaklockCmd} = '/usr/bin/rcs -u -M %FILENAME|F%';
$TWiki::cfg{RCS}{delRevCmd} = '/usr/bin/rcs -o%REVISION|N% %FILENAME|F%';
$TWiki::cfg{RCS}{SearchAlgorithm} = 'TWiki::Store::SearchAlgorithms::Forking';
$TWiki::cfg{RCS}{QueryAlgorithm} = 'TWiki::Store::QueryAlgorithms::BruteForce';
$TWiki::cfg{RCS}{EgrepCmd} = '/bin/grep -E %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{RCS}{FgrepCmd} = '/bin/grep -F %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$TWiki::cfg{EnableHierarchicalWebs} = 1;
$TWiki::cfg{SystemWebName} = 'TWiki';
$TWiki::cfg{TrashWebName} = 'Trash';
$TWiki::cfg{UsersWebName} = 'Main';
$TWiki::cfg{EnableEmail} = 1;
$TWiki::cfg{WebMasterEmail} = 'webmaster@domain.com';
$TWiki::cfg{WebMasterName} = 'TWiki Administrator';
$TWiki::cfg{MailProgram} = '/usr/sbin/sendmail -t -oi -oeq';
$TWiki::cfg{SMTP}{MAILHOST} = 'mailhost.domain.com';
$TWiki::cfg{SMTP}{SENDERHOST} = '';
$TWiki::cfg{SMTP}{Username} = '';
$TWiki::cfg{SMTP}{Password} = '';
$TWiki::cfg{RemoveImgInMailnotify} = 1;
$TWiki::cfg{NotifyTopicName} = 'WebNotify';
$TWiki::cfg{SMTP}{Debug} = 0;
$TWiki::cfg{PROXY}{HOST} = '';
$TWiki::cfg{PROXY}{PORT} = '';
$TWiki::cfg{Stats}{TopViews} = 10;
$TWiki::cfg{Stats}{TopContrib} = 10;
$TWiki::cfg{Stats}{TopicName} = 'WebStatistics';
$TWiki::cfg{TemplatePath} = '/srv/www/htdocs/twiki/templates/$web/$name.$skin.tmpl, /srv/www/htdocs/twiki/templates/$name.$skin.tmpl, /srv/www/htdocs/twiki/templates/$web/$name.tmpl, /srv/www/htdocs/twiki/templates/$name.tmpl, $web.$skinSkin$nameTemplate, TWiki.$skinSkin$nameTemplate, $web.$nameTemplate, TWiki.$nameTemplate';
$TWiki::cfg{LinkProtocolPattern} = '(file|ftp|gopher|https|http|irc|mailto|news|nntp|telnet)';
$TWiki::cfg{SiteWebTopicName} = '';
$TWiki::cfg{SitePrefsTopicName} = 'TWikiPreferences';
$TWiki::cfg{LocalSitePreferences} = 'Main.TWikiPreferences';
$TWiki::cfg{HomeTopicName} = 'WebHome';
$TWiki::cfg{WebPrefsTopicName} = 'WebPreferences';
$TWiki::cfg{NumberOfRevisions} = 4;
$TWiki::cfg{ReplaceIfEditedAgainWithin} = 3600;
$TWiki::cfg{LeaseLength} = 3600;
$TWiki::cfg{LeaseLengthLessForceful} = 3600;
$TWiki::cfg{MimeTypesFileName} = '/srv/www/htdocs/twiki/data/mime.types';
$TWiki::cfg{Plugins}{CommentPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{EditTablePlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{InterwikiPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{PreferencesPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SlideShowPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SmiliesPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{SpreadSheetPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TablePlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TinyMCEPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{TwistyPlugin}{Enabled} = 1;
$TWiki::cfg{Plugins}{WysiwygPlugin}{Enabled} = 0;
$TWiki::cfg{PluginsOrder} = 'SpreadSheetPlugin';
$TWiki::cfg{ExtensionsRepositories} = 'TWiki.org=(http://twiki.org/cgi-bin/view/Plugins/,http://twiki.org/p/pub/Plugins/)';
$TWiki::cfg{MailerContrib}{EmailFilterIn} = '';
$TWiki::cfg{Register}{AllowLoginName} = 1;
$TWiki::cfg{Site}{CharSet} = 'iso-8859-1';
$TWiki::cfg{Site}{Lang} = 'en';
$TWiki::cfg{Site}{FullLang} = 'en-us';
$TWiki::cfg{Plugins}{ActionTrackerPlugin}{Enabled} = 1;
1;
--
TWiki:Main.JacobChamplin
- 03 May 2008
I can confirm this bug. I noticed this recently on our Motorola TWiki and I have had to constantly hack topics that shows the
MainWikiName links.
I have attached a file that shows the problem on my test TWiki. So I see this on two different TWiki installations.
Raising to urgent.
--
TWiki:Main.KennethLavrsen
- 03 May 2008
I have been looking at this bug and I know I can fix it.
But I am not sure what is the right way.
I can either fix it in Attach.pm in the function sub _expandAttrs where the USERS attribute is being translated to a WikiName. The problem is that when the topic is of the old format where the user name is represented as Main.WikiName the $user->webDotWikiName() returns Main.MainWikiName.
It is simply wrong to send the user name including Main. to the $user->webDotWikiName(). So I can regex away a prefixed web name if it matches the name of the user web as defined in the config.
But maybe it should be fixed earlier in the code.
Maybe we should attack it already in getRevisionInfo
It seems to return the raw content of the meta also for the user. Maybe it should remove a prefixed web name if it matches the user web name?
Advice please before I continue.
--
KennethLavrsen
- 21 May 2008
Since I get no feedback I will checkin the easy hack solution then. At least it solved my own problem
--
TWiki:Main.KennethLavrsen
- 23 May 2008
Easy fix checked in. Works on my installation.
--
KennethLavrsen
- 23 May 2008
That works for me too. Thanks Kenneth.
--
TWiki:Main.MartinRowe
- 09 Jun 2008