Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item836: view of raw information on a topic that doesn't exist causes BOOM

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine    
see http://foswiki.org/Tasks/ReleaseEnhancements?raw=debug , and you will get

Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.
Can't call method "text" on an undefined value

note that http://foswiki.org/Tasks/ReleaseEnhancements doesn't exist

-- WillNorris - 22 Jan 2009

Do not like Booms. Raising to urgent as this one must be easy to fix.

-- KennethLavrsen - 22 Jan 2009

I just verified this issue and the problem is at View.pm:

    if ($raw) {
        $indexableView = 0;
        $logEntry .= ' raw=' . $raw;
        if ( $raw eq 'debug' || $raw eq 'all' ) {
            $text = $store->getDebugText( $meta, $text );
        }
    }

This code is executed even if the topic doesn't exist ($meta and $text are undefined), then the getDebugText dies. Two notes:
  • getDebugText can't die
  • if a user asks for raw view of a topic that doesn't exist, the "This Topic doesn't exist" page should be displayed.

-- GilmarSantosJr - 22 Jan 2009

Th fix was really simple: set $raw to the null string if the topic doesn't exist, like it's done for other variables. This is enough to fix the reported issue, so Waiting for Release

-- GilmarSantosJr - 22 Jan 2009

ItemTemplate edit

Summary view of raw information on a topic that doesn't exist causes BOOM
ReportedBy WillNorris
Codebase 1.0.0, 1.0.0 beta3, 1.0.0 beta2, 1.0.0 beta1, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:2121
TargetRelease patch
ReleasedIn 1.0.1
Topic revision: r7 - 23 Feb 2009, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License