• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

We are using ActionTrackerPlugin and has used it in Cairo.

After we upgraded to TWiki4 the Action tracker was also upgraded and seemed to work.

After since then more and more report that they do not get notifications. And it is often new users.

It turns out that the actionnotify script does not find email addresses when the user topic is the new kind with the email address in the form.

If I manually add

   * Email: first.last@motorola.com

in 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.


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.


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.

  • I ran with password manager TWiki::Users::HtPasswdUser or none.
  • I had two users. One with new and one with old user topic.
  • They both had one open action in a test topic.
  • I ran actionnotify with all defaults and in DEBUG mode.
  • I removed the test action from the plugin home topic to avoid noise

Email in
Email in
user topic
TWiki4 user topic Cairo user topic
N N N DONE cannot find mail DONE cannot find mail
N Y N DONE cannot find mail DONE cannot find mail
N N Y DONE email in user topic DONE email in user topic
N Y Y DONE email in user topic DONE email in user topic
Y N N DONE cannot find mail DONE cannot find mail
Y Y N DONE email in .htpasswd DONE email in .htpasswd
Y N Y DONE email in user topic DONE email in user topic
Y Y Y DONE email in .htpasswd DONE email in .htpasswd

So after all this testing I will say it is safe to checkin both the core fix to Func.pm and the actionnotify fix.

So I will do that. CC - I assume you may want to follow up with test case updates. Let me know if you want me to re-release ActionTrackerPlugin to twiki.org.


Checked in. Since this fix requires a not-yet-release TWiki4 I will include the updated Func.pm in the small hotfix I will make later this weekend.

Status changed to Waiting for release since there is the small Func.pm fix includes. I realize now that I probably should have made a seperate Item for it, but that is too late now.


I found it confusing having to let an extention related item hang until 4.1 because I had abused to for a core code release. To mend it I created Item2609 which describes the wikiToEmail fix. I have set that to Waiting for Release and copied the SVN checkin numbers to it common with this.

This means that when the ActionTrackerPlugin gets uploaded to t.o. this item can be closed.




Note: this was fixed in 4.0.5


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

Checkins 10883 10884 10919
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r13 - 2007-01-05 - CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback