Item10164: NOAUTOLINK also disables the author name in the topic's REVINFO and in WebChanges

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: DanDascalescu
Waiting For:
Last Change By: KennethLavrsen
In a web with NOAUTOLINK set to something else than "", the last topic editor in the upper-right corner won't be autolinked. Also in WebChanges, authors aren't autolinked.

Fixes for this would be, in order from core to templates:

  • patch Foswiki::Render::renderRevisionInfo() - that would take care of the author in the view template, and of the author in WebChanges. The downside would be some case in which we wouldn't want to hyperlink the username
  • patch Foswiki::Search::searchWeb() (search for %AUTHOR%) and view.pattern.tmpl (search for %TMPL:DEF{"breadcrumb:annotation"}%)
  • patch PatternSkin's search.pattern.tmpl, searchbookview.pattern.tmpl, and view.pattern.tmpl

It's been said in #foswiki that ArthurClemens might have useful input.

-- DanDascalescu - 16 Dec 2010

We need to fix the search.pattern to use [[bracketed links]], the more tricky question is do we apply the same fix in the default format string of Foswiki::Render::renderRevisionInfo(), or just do it in view.pattern.tmpl

I think any perl code that assumes NOAUTOLINK is off is asking for trouble, but I don't have a strong opinion.

-- PaulHarvey - 16 Dec 2010

I have made the changes to the templates. I don't think changes to core code is needed.

-- ArthurClemens - 18 Dec 2010

Kenneth wrote by mail:
You cannot use the [[][]] format in any of the search results, breadcrumbs.

It is not given that all login name are on a Foswiki where TopicUserMapping maps a login name to a wikiname.

When you use simple LDAP auth people login with a corporate ID which is authenticated outside Foswiki.

And unless they are registered their login is not mapped to an existing WikiName.

You change means that all topics edited by a non registered person are presented with the author linked to a none existing topic with all the none-existing topic features (the ?-mark that invites to creating the new topic).

And it will not take long before the Main web is full of unwanted topics of login names.

These problems can be avoided if first a check is done if the topic exists. Such a call is fast, even 10.000 calls in a topic is barely noticable.

-- ArthurClemens - 18 Dec 2010

Nice fix, but the issue here is you forgot to update the unit tests, and one is failing. I've fixed it for you smile

I took the liberty to test both cases in the unit test Fn_SEARCH::test_no_format_no_shit, so the first test will run without the WikiGuest user, while the following ones (there are like 5 or more searches in this test, will have the user, so both use-cases are covered.

-- OlivierRaginel - 09 Jan 2011
 
Topic revision: r15 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy