* Email: first.last@motorola.comin the user topic it works again. But I cannot start manually adding peoples email address to all new user topics. ActionTrackerPlugin is one of the most import plugins for the main target group of TWiki and the actionnotify is important for the use of this plugin. KJL I tried to fix the code. I can see why it fails. So I assumed the right thing to do would be to use a Func API command to find the email address of the user. But I cannot make it work. In actionnotify script line 306 I commented out the old code and added what I thought would work
# parse Email: format lines from personal topic # my @people; # while ( $text =~ s/^\s+\*\s*E-?mail:\s*([^\s\r\n]+)//imo ) { # push( @people, $1 ); # } # $addresses = join( ',', @people ); $addresses = TWiki::Func::wikiToEmail($intopic);But when I run the script I get the error
Can't use string ("1") as an ARRAY ref while "strict refs" in use at /var/www/twiki404/lib/TWiki/Func.pm line 1620
I then tried to see if the wikiToEmail() function was used anywhere else. I could not find a single plugin that uses it. So before I tear my hair out - has this API function ever been tested? Does it work at all?
My perl skills stop where I see
my $user = $TWiki::Plugins::SESSION->{users}->findUser( $wiki, undef, 1 );
I don't even understand where I will find the file in which to look. I never learned object orientation programming and I do not understand the syntax.
KJL
I have been doing very detailed testing.
First the fix.
I changed the actionnotify exactly as described above. And additionally I implemeted Crawfords fix for wikiToEmail() in Func.pm line 1620 which got changed to
return join( ',', $user->emails() );Now - did this work? This required a lot of testing. Even if the current ActionTrackerPlugin is made for TWiki4 only (you can download an older version for Cairo) it still has to work with user topics in the Cairo style. And it has to work both with and without password manager. Ie. both with email addresses in the .htpasswd file and stored in the user topic. And in user topic both in old and new style. Finally it has to work with the right email address when you have different email addresses in .htpasswd and user topic. And if the email address is not in .htpasswd is must correctly fall back to the one in the user topic. Here are the combinations I tested.
Password Manager |
Email in .htpasswd |
Email in user topic |
TWiki4 user topic | Cairo user topic |
---|---|---|---|---|
N | N | N | cannot find mail | cannot find mail |
N | Y | N | cannot find mail | cannot find mail |
N | N | Y | email in user topic | email in user topic |
N | Y | Y | email in user topic | email in user topic |
Y | N | N | cannot find mail | cannot find mail |
Y | Y | N | email in .htpasswd | email in .htpasswd |
Y | N | Y | email in user topic | email in user topic |
Y | Y | Y | email in .htpasswd | email in .htpasswd |
ItemTemplate | |
---|---|
Summary | ActionTrackerPlugin actionnotify cannot find email addresses from TWik4 type user topics |
ReportedBy | TWiki:Main.KennethLavrsen |
Codebase | 4.0.3, 4.0.4, ~twiki4 |
SVN Range | Thu, 29 Jun 2006 build 10750 |
AppliesTo | Extension |
Component | ActionTrackerPlugin |
Priority | Urgent |
CurrentState | Closed |
WaitingFor | |
Checkins | 10883 10884 10919 |
TargetRelease | n/a |