NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item11965: MailNotify fails with perl "undefined value" errors, and needs better error reporting

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension TopicUserMappingContrib  
I get a lot of emails that look like the following:

Subject: Cron <apache@adbu-vm2> cd /var/www/foswiki/tools && perl -I ../bin mailnotify -q Can't use an undefined value as an ARRAY reference at /auto/adbuwiki/Foswiki-1.1.5/lib/Foswiki/Users/TopicUserMapping.pm line 1244.

Crawford says that this is likely due to an unregistered email address in the notify list. It would be helpful if:

1. This message was more explicit about what the problem is. 2. This message included both the Web(s) and User(s) to which it applied.

-- DavidMasterson - 21 Jun 2012

Changed line 1244 in TopicUserMapping.pm to:

push( @users, @{ $this->{_MAP_OF_EMAILS}->{$email} } ) if ( $this->{_MAP_OF_EMAILS}->{$email} );

This seems to get past the problem, but it may not be the proper solution. This change was local in my Wiki -- a developer should evaluate if it should be applied.

-- DavidMasterson - 29 Aug 2012

I added unit tests, and your fix and another one shown up by the tests. Always a good idea to contribute a unit test with your patches!

-- CrawfordCurrie - 30 Aug 2012

 

ItemTemplate edit

Summary MailNotify fails with perl "undefined value" errors, and needs better error reporting
ReportedBy DavidMasterson
Codebase 1.1.5, trunk
SVN Range
AppliesTo Extension
Component TopicUserMappingContrib
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:15353 Foswikirev:15354
TargetRelease patch
ReleasedIn 1.1.6
CheckinsOnBranches Release01x01 trunk
trunkCheckins Foswikirev:15353
Release01x01Checkins Foswikirev:15354
Topic revision: r8 - 02 Dec 2012, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads