Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
My user received the internal error message on his screen:
Can't call method "get" on an undefined value
This comes right out from the underlying Perl. The error logs pointed to a line in Meta.pm
../lib/Foswiki/Meta.pm
sub getPreference {
my ( $this, $key ) = @_;
unless ( $this->{_web} || $this->{_topic} ) {
return $this->{_session}->{prefs}->getPreference($key); <<--This is the line in question
(etc)
The subroutine getPreference is called, in a number of cases, with a single argument. I suspect that there is an assumption that this value is a global variable.
$key is undefined. It'd be more useful for the user to get an error message being
specific about what exactly is undefined, so they can fix their page right away. In this
case, the user's page is pretty complex and includes other pages, so a message about which
value is not defined would help us avoid a long process of going through his page and all the pages
that are included.
--
ElaineRichards - 12 Oct 2012
We really need to see the stack trace that led to this report, if it's available.
getPreference
should never be called with no parameters (or a null parameter).
--
CrawfordCurrie - 25 Oct 2012
No feedback for 2 years ... setting to No Action.
--
GeorgeClark - 30 Dec 2014