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

Item4931: CompareRevisionsAddOn no longer works with 4.2 and PatternSkin

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension CompareRevisionsAddOn Urgent Closed   n/a  

Edit Form Data

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

Detail

CompareRevisionsAddOn no longer works with 4.2 and PatternSkin.

Easy to see.

Install it.

Do a diff (which now points to the compare bin instead of diff).

You end up with a blank page.

This plugin seems to work in classic skin.

The fix is to change templates/compare.pattern.tmpl and templates/interweave.pattern.tmpl

I have not tested with the undocumented _cra templates. They are not really needed.

This plugin works in 4.1.2.

Example. Look at http://www.lavrsen.dk/twiki/bin/compare/Motion/FrequentlyAskedQuestions?rev1=52;rev2=51 to see how it looks like when it works

Note that CompareRevisionsAddOn distribution contains a small plugin called CompareRevisionsAddonPlugin. You will not find this on t.o. or SVN. This plugin is simply included with CompareRevisionsAddOn which is on SVN.

-- TWiki:Main/KennethLavrsen - 05 Nov 2007

There are also code errors I think. I get this in error log.

[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in pattern match (m//) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 143., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in pattern match (m//) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 144., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in pattern match (m//) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 145., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in pattern match (m//) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 146., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 224., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in print at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 225., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 257., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 258., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 259., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 260., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 261., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 262., referer: http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome
[Tue Nov 06 01:28:22 2007] [error] [client 192.168.1.9] [Tue Nov  6 01:28:22 2007] compare: Use of uninitialized value in substitution (s///) at /usr/local/apache2/twiki42/lib/TWiki/UI/Compare.pm line 263., referer: [[http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome][http://merlin.lavrsen.dk/twiki42/bin/view/Myweb/WebHome]]

HOWEVER same errors are not when you use classic skin so it is related to skin changes.

KJL

Strange.

Line 127 in compare

    my $tmpl = TWiki::Func::readTemplate
          ($interweave ? 'interweave' : 'compare');

returns nothing but a few empty lines when skin is pattern.

If I put another template name than interweave like rdiff then the TWiki::Func::readTemplate returns something. There seems to be a core bug that fails to read certain templates.

I will continue debugging.

-- TWiki:Main.KennethLavrsen - 06 Nov 2007

I have debugged. It is not a core bug.

When I analyse what happens in lib/Templates.pm is that the interweave.pattern.tmpl is correctly parsed and all the %TMPL:DEF are correctly parsed.

But in sub readTemplate the variable $result is empty before it reaches $result =~ s/(%TMPL\:P{.*?}%)/_expandTrivialTemplate( $this, $1)/geo;

The templates read are simply nothing but TMPL:DEFs and nothing is actually surfacing to the top.

Something changed in the 4.2 pattern skin so the sequence

%TMPL:P{"htmldoctype"}%
%TMPL:P{"head"}%
%TMPL:P{"bodystart"}%
%TMPL:P{"main"}%
%TMPL:P{"bodyend"}% 

produces no output anymore.

-- TWiki:Main.KennethLavrsen - 07 Nov 2007

Adding %TMPL:INCLUDE{"twiki"}% to interweave.pattern.tmpl brings the plugin back to life. But the layout is not correct. For example the title is double.

I cannot overview what is wrong. There are so many template files that includes each other.

-- TWiki:Main.KennethLavrsen - 07 Nov 2007

Some rigorous refactoring was needed to remove pattern skin dependent code from the lib code. The good news is that a specific pattern template is no longer needed.

I have also renamed CompareRevisionsAddonPlugin to CompareRevisionsAddOnPlugin.

-- TWiki:Main.ArthurClemens - 07 Nov 2007

I have reverted the name change.

-- TWiki:Main.ArthurClemens - 08 Nov 2007

ItemTemplate
Summary CompareRevisionsAddOn no longer works with 4.2 and PatternSkin
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Extension
Component CompareRevisionsAddOn
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:15511 TWikirev:15512 TWikirev:15515 TWikirev:15516 TWikirev:15517 TWikirev:15518 TWikirev:15535
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2007-11-08 - ArthurClemens
 
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