You are here: Foswiki>Tasks Web>Item836 (23 Feb 2009, KennethLavrsen)Edit Attach

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

pencil
Priority: Urgent
Current State: Closed
Released In: 1.0.1
Target Release: patch
Applies To: Engine
Component:
Branches:
Reported By: WillNorris
Waiting For:
Last Change By: KennethLavrsen
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 distro:8440ba859a12
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 Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy