#twiki 2012-12-21,Fri

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***ChanServ sets mode: +o PeterThoeny [03:18]
......... (idle for 42mn)
tomc20922PeterThoeny: I have hit a problem with TagMePlugin. I find the TagMeSearch feature,
Show topics tagged with || by () all users () me only [GO]
does not work. All tags are displayed when the 'me only' radio button is selected.
I have checked the twiki/working/work_areas/TagMePlugin/_tags_* files have username present.
I started poking around in TagMePlugin.pm and I think problem lies in the stuff to do with the $by & $user variables.
In particular in the $user variable appears to be undefined or "", even in sub initPlugin {}. This can't be right?
[04:00]
Actually, thinking about it, it probablty makes sense that $user is undefined in sub initPlugin {} sicne that presuambly runs when the TWiki is started...
However, I don't see where else the plugin gets the current user from... Looking again...
[04:11]
.... (idle for 15mn)
PeterThoenytomc20922: if you discovered a bug please file a bug report
http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/TagMePlugin for this plugin
[04:27]
tomc20922Sure. Can you tell me if I should expect $user to be defined in the plugin's sub initPlugin {} ? This will help be debugging ...
The code is;
sub initPlugin { ( $topic, $web, $user, $installWeb ) = @_;
What I actually see from a debugging statement put in intiPlugin is,
TagMePlugin topic=TagMeSearch web=TWiki user= installWeb=TWiki
[04:28]
PeterThoenyyes, $user should return a user if the page is authenticated [04:31]
tomc20922I also find I can get hold of the user by adding ' $user=$TWiki::Plugins::SESSION->{user};' but this should not be necessary, agreed? [04:32]
PeterThoenythis is unpublished, better not to use in a plugin because it might break on an upgrade [04:33]
tomc20922I guess I need to look at the TWiki 5 plugins API. Can you give a pointer? [04:36]
PeterThoenyhttp://twiki.org/cgi-bin/view/TWiki/TWikiFuncDotPm [04:37]
..... (idle for 22mn)
the twiki release meeting is about to start, interested folks please /join #twiki_release [04:59]
........ (idle for 35mn)
tomc20922: see question in #twiki_release [05:34]
.............. (idle for 1h6mn)
tomc20922I have found that $user in initPlugin{} is only undefined for a locally authenticated (.htpasswd file) user. I am using LDAPContrib to authenticate most users via a central it dept. LDAP server and I';m guesing the problem lies in LDAPContrib. I don't really have time to investigate it there.
Using TWiki::Func::getCanonicalUserID() to get a unique username in TagMePlugin seems to work nicely for local & LDAP users. thanks for your adove advice. b4n.
[06:40]
............................................................................................................................... (idle for 10h30mn)
***ChanServ sets mode: +o PeterThoeny [17:13]
..... (idle for 21mn)
ChanServ sets mode: +o PeterThoeny [17:34]
........................ (idle for 1h58mn)
ChanServ sets mode: +o PeterThoeny [19:32]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)