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

Item5600: REVINFO format hardcoded in View.pm making displayed format unpredictable

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Urgent Closed   patch 4.2.1, 5.0.0

Edit Form Data

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

Detail

There is something very goofy going on in trunk

If you notice here in Bugs the date is missing in the rev info at the bottom of topics.

First I thought it was a template error but it is not.

If I write %REVINFO% here in the topic I get r4 - 2008-05-04 - 13:05:37 - KennethLavrsen with rev - date - time - wikiname. Just as expected.

If I write %REVINFO{}% in the view.pattern.tmpl I also get the right format when used in the template.

But without the { } I get a wrong value.

Here come the most crazy thing. If I put some poor mans debugging in TWiki.pm printing to STDERR within the function sub REVINFO I can see that the function is not called at all when I have the naked REVINFO in the template.

Why is the subroutine REVINFO not called?

Why is the %REVINFO tag rendered as something anyway?

Something is very goofy in the trunk at the moment.

-- TWiki:Main/KennethLavrsen - 04 May 2008

The error was introduced (or manifested itself) from SVN 16686 which is the change Arthur did for NOAUTOLINK. This was only checked into trunk and that is why we do not see it in TWikiRelease04x02 branch.

Why does View.pm hard code a format?? And why is a substitution done instead of letting REVINFO getting rendered like a normal twiki variable?

-- TWiki:Main.KennethLavrsen - 04 May 2008

OK.

I know the root cause now.

REVINFO is not called because someone decided to hardcode this in View.pm. Crawford did this in a very early checkin. I am pretty convinced a lot of water has run through the river since. It makes no sense that a REVINFO used in a template uses the function defined in TWiki.pm if a format is specified and is replaced by a hardcoded format if not in View.pm.

In my view the correct fix for this is to remove the lines

    my $ri = $session->renderer->renderRevisionInfo( $webName,
                                                     $topicName,
                                                     $meta,
                                                     undef,
                                                     '$rev - $time - [[$wikiusername][$wikiname]]');
    $tmpl =~ s/%REVINFO%/$ri/go;

completely from View.pm

-- TWiki:Main.KennethLavrsen - 04 May 2008

I am convinced this is the case.

I remove the code from View.pm

-- KennethLavrsen - 04 May 2008

Fixed and closed. I close instead of waiting for release because the visible error does not manifext

-- KennethLavrsen - 04 May 2008

ItemTemplate
Summary REVINFO format hardcoded in View.pm making displayed format unpredictable
ReportedBy TWiki:Main.KennethLavrsen
Codebase ~twiki4
SVN Range TWiki-5.0.0, Sun, 04 May 2008, build 16770
AppliesTo Engine
Component

Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16771 TWikirev:16772
TargetRelease patch
ReleasedIn 4.2.1, 5.0.0
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-05-04 - KennethLavrsen
 
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