In
ActionTrackerPlugin the actionnotify script cannot find people unless $TWiki::cfg{MapUserToWikiName} = 0.
I was testing the actionnotify script on a TWiki with standard plain .htpasswd authentication and no usernames different from
WikiNames.
And then the $TWiki::cfg{MapUserToWikiName} = 0 dependency shows up again. The actionnotify cannot find the email address in the .htpasswd file when $TWiki::cfg{MapUserToWikiName} = 0 but it can when I set $TWiki::cfg{MapUserToWikiName} = 1 which I am not supposed to do when I run with .htpasswd authentication.
I am sure this is a
TWikiUserMapping bug and not the
ActionTrackerPlugin that has the problem and I am sure that it is related to the Item2631 (reset password) bug. And I am sure this is not the last bug I find related to this.
--
KJL
No, it's an action tracker "bug". Actually, it's because I coded support for user email support into the plugin many years before the core had that support. It needs to be recoded to use the core APIs.
CC
I think you are wrong Crawford.
I have confirmed that the $TWiki::cfg{MapUserToWikiName} = 0 is the issue. Remember that you helped me fix this code recently. It is only a few weeks ago I uploaded a new version of ActionTrackerPlugin that used the API to find users. The actionnotify works fine with $TWiki::cfg{MapUserToWikiName} = 1. And it used the API to find the users email address now.
I am 99% sure this is the same bug that prevents the users from resetting their password. With $TWiki::cfg{MapUserToWikiName} = 0 the core fails to find the user somewhere in the
TWikiUserMapping.
I am setting this back to core. Until someone proofs that I am wrong.
KJL
Just to help the memory. It was in SVN 10883 that the Actionnotify.pm was changed to use the API.
- # 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 );
+ # Email address will be picked from provided by
+ # $TWiki::cfg{PasswordManager} if possible
+ # Otherwise email address is picked from users topic
+ $addresses = TWiki::Func::wikiToEmail($intopic);
In lib/TWiki/Func.pm we have wikiToEmail() that calls
my $user = $TWiki::Plugins::SESSION->{users}->findUser( $wiki, undef, 1 );
So this is why I am sure it is a core error.
KJL
I have done a trace of the code by adding lots of print STDERR in the code and I have confirmed that it is the same bug as
Item2631. If you go there you can see the step by step through the code I have made and I am down to a specific place in
TWikiUserMapping.pm where the code fails. But it is also a complex code place where I get lost. I simply do not understand what happens the place the code fails. But for sure the bug is not in the Actionnotify script.
KJL
I have a fix ready that I am testing. And I was right. Item2631 and this one is the same bug.
Changing to actioning
KJL
Changing back to new in case someone closes 2631 while I am on vacation.
KJL
Duplicate of
Item2631 - discarded.
CC