You are here: Foswiki>Tasks Web>Item9781 (03 Oct 2010, GeorgeClark)Edit Attach

Item9781: rdiff type=last broken

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: KennethLavrsen
Waiting For:
Last Change By: GeorgeClark
Try any topic. E.g. System.WebHome

Then change the URL do view becomes rdiff and append with ?type=last

Example

http://trunk.foswiki.org/bin/rdiff/System/WebHome?type=last

This is supposed to show the change between current and last rev.

This works in 1.0.10. Also when you only have one rev where no changes are shown in a valid web page.

But 1.1.0 code shows a code error

Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.

Can't "last" outside a loop block

Code errors are serious and often express more issues. So release blocker.

-- KennethLavrsen - 02 Oct 2010

On foswiki.org we get more errors.

Use of uninitialized value in substitution (s///) at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/RDiff.pm line 532.
 at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 314
   CGI::Carp::realdie('Use of uninitialized value in substitution (s///) at /usr/hom...') called at /usr/local/lib/perl5/5.8.8/CGI/Carp.pm line 385
   CGI::Carp::die('Use of uninitialized value in substitution (s///) at /usr/hom...') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki.pm line 144
   Foswiki::__ANON__('Use of uninitialized value in substitution (s///) at /usr/hom...') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI/RDiff.pm line 532
   Foswiki::UI::RDiff::diff('Foswiki=HASH(0xdc8528)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 316
   Foswiki::UI::__ANON__() called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 415
   eval {...} called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 407
   Error::subs::try('CODE(0xd8e848)', 'HASH(0xdc8208)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 435
   Foswiki::UI::_execute('Foswiki::Request=HASH(0xdc1198)', 'CODE(0xe09498)', 'diff', 1) called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/UI.pm line 277
   Foswiki::UI::handleRequest('Foswiki::Request=HASH(0xdc1198)') called at /usr/home/trunk.foswiki.org/core/lib/Foswiki/Engine/CGI.pm line 37
   Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x901fb8)') called at /home/trunk.foswiki.org/core/bin/rdiff line 24.

-- KennethLavrsen - 02 Oct 2010

perlcritic has lots of red marks against this .pm. And then there's this, from perldoc -f last:

"last" cannot be used to exit a block which returns a value such as "eval {}", "sub {}" or "do {}", and should not be used to exit a grep() or map() operation.

-- PaulHarvey - 02 Oct 2010
 
Topic revision: r3 - 03 Oct 2010, GeorgeClark
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