Item1591: "LINKTOOLTIPINFO = on" causes apache error message about uninitialized value in Render.pm

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
Reported By: PhilippLeufke
Waiting For:
Last Change By: KennethLavrsen

Description

Setting Set LINKTOOLTIPINFO = on will generate lots of error messages in apache2's error.log like this:
[Fri May 08 13:23:19 2009] [error] [client XXX.XXX.XXX.XXX] [Fri May  8 13:23:19 2009] view: ...
Use of uninitialized value in substitution iterator at /var/lib/foswiki/lib/Foswiki/Render.pm line 563., ...
referer: http://[censored].fzk.de/

I had the setting enabled. For my user account, every topic rendering resulted in this error message. All other users generated the message only, if they had a look to my topic. This absolutely makes sense, but I just wanted to note this...

Installed plugins don't play any role here, as I tracked down.

System Info

Debian stable (Lenny):

-- PhilippLeufke - 24 May 2009

does the functionality otherwise work? if so, please try this patch:

-    $text =~ s/\$username/$users->getLoginName($user)/ge;    # 'jsmith'
+    $text =~ s/\$username/$users->getLoginName($user)/ge if $users->getLoginName($user);    # 'jsmith'

this would mean that getLoginName() is returning undef (line 564 calls $users->getWikiName($user), which i assume you're not getting an error on as well)

getLoginName() documentation says

Get the login name of a user. Returns undef if the user is not known.=

how can this information not be known? when the user isn't logged in, i imagine. any other way?

-- WillNorris - 02 Jun 2009

Removed Sven from waiting for. When a bug is waiting for - developers tend to ignore it until the reporter has provided more info.

PhilippLeufke any chance you can provide some feedback?

-- KennethLavrsen - 16 Jun 2009


Will's patch from above seems to be working. The error messages are gone now. But I also don't get how this can happen, since it didn't make any difference whether the user for whom this setting was set (me) was logged in or not (see above...).

-- PhilippLeufke - 17 Jun 2009

It's nothing to do with the logged-in user. The LINKTOOLTIPINFO expands the author of the topic, and if that author is not found in the user DB, the error will result. I added a catch-all.

-- CrawfordCurrie - 10 Aug 2009

ItemTemplate edit

Summary "LINKTOOLTIPINFO = on" causes apache error message about uninitialized value in Render.pm
ReportedBy PhilippLeufke
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:dd7843cb9a43
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r10 - 04 Oct 2010, 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