#foswiki 2017-10-10,Tue

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

WhoWhatWhen
LynnwoodI've never thought of this before but am wondering if anyone know whether WebNotify subscriptions can incorporate any macros. E.g. a conditional to determine whether a notification should be sent or not. I'd be surprised if it did allow for this, but it would be cool. [00:54]
gac410You mean macros in the table of names? I don't think so. [00:55]
Lynnwoodexactly.. and that's what I assumed. It would open up a lot of pretty cool features.
A client just laid out a request for notifications to be sent out to some people based on age and status of certain topics.
At first, I can't see any way to accomplish this with off-the-self plugins.
but having WebNotify be rendered _prior_ to processing the list of subscriptions would make it very possible.
The sky would be the limit on what you could do with notifications!
[00:55]
gac410Probably needs a feature request, with some examples ... and a developer ;) [01:05]
LynnwoodAh yes... :-)
Just dreaming, but I might take a look at the code. I'll try to develop a beginning feature request this week.
[01:14]
............. (idle for 1h2mn)
GithubBot[distro] vrurg pushed 2 new commits to Item14237: https://git.io/vdao9
distro/Item14237 dbe4052 Vadim Belman: Item14237: Split exceptions into individual modules.
distro/Item14237 74ad037 Vadim Belman: Item14237: Minor fixes.
[02:16]
***GithubBot has left [02:16]
FoswikiBothttps://foswiki.org/Tasks/Item14237 [ Item14237: Implement Development.OOConfigSpecsFormat proposal ] [02:16]
.................................................. (idle for 4h5mn)
***ChanServ sets mode: +o MichaelDaum [06:21]
....................... (idle for 1h51mn)
FoswikiOnSlack<gregor.godler> @jast @gac410, thank you for help, I managed to login with with my ldap user and setup apache to use fastCGI [08:12]
jastnice [08:12]
FoswikiOnSlack<gregor.godler> but I have strange issue, that I cant access bin/configuration
<gregor.godler> maybe because I'm logged in as user ggodler, but under AdminGroup I see user GregorGodler
<gregor.godler> the message is: Access check on System.Configuration failed. Action "VIEW": Denied by {FeatureAccess}{Configure} Setting.
[08:13]
jastpossibly the username-to-WikiName mapping is not configured correctly. what does Foswiki think your user topic is? (in the sidebar, your name is a link, what does the link point to?) [08:20]
FoswikiOnSlack<gregor.godler> http://wiki2.XXX.com/bin/edit/Main/Ggodler?topicparent=XXX.WebHome
<gregor.godler> lol
<nuddlegg> umpf
[08:22]
jastyeah, that's your mapping not set up correctly [08:24]
FoswikiOnSlack<gregor.godler> where can I set this mapping? [08:24]
jastit's part of the LDAP settings in /bin/configure (or LocalSite.cfg)
as a workaround to have easier access to the settings via the web interface you could add 'ggodler' to AdminGroup temporarily
[08:25]
FoswikiOnSlack<gregor.godler> damn, I managed to lock my self out :S [08:37]
......................... (idle for 2h2mn)
GithubBot[LdapContrib] MichaelDaum pushed 1 new commit to master: https://git.io/vdVY2
LdapContrib/master de77fb9 MichaelDaum: Item14512: more unicode fixes...
[10:39]
***GithubBot has left [10:39]
FoswikiBothttps://foswiki.org/Tasks/Item14512 [ Item14512: more unicode DN fixes ] [10:39]
GithubBot[LdapNgPlugin] MichaelDaum pushed 1 new commit to master: https://git.io/vdVYr
LdapNgPlugin/master e818128 MichaelDaum: Item14512: more unicode DN fixes
[10:40]
***GithubBot has left [10:40]
.... (idle for 15mn)
FoswikiOnSlack<gregor.godler> lol was for my wrong url, and not about @jast answer
<nuddlegg> @gregor.godler no problem I deleted the msg from slack
[10:55]
..... (idle for 21mn)
<gregor.godler> which part?
<gregor.godler> this one $Foswiki::cfg{Ldap}{WikiNameAttributes} = 'cn'; ?
<gregor.godler> :+1:
[11:17]
.......... (idle for 49mn)
***ChanServ sets mode: +o gac410 [12:08]
jast@gregor.godler the important attributes are WikiNameAttributes and the one that determines which LDAP field contains the login name
also make sure that the filter and base settings are correct, otherwise no accounts are imported
depending on which of the issues caused the mapping to fail, you may have to clear LdapContrib's cache to re-sync everything (I believe it's mentioned in the documentation)
[12:14]
MichaelDaumMichaelDaum miserably failed to set up a web export using PublishPlugin
Item14453, Item14452 and Item14513 render this plugin unusable, sadly.
[12:19]
FoswikiBothttps://foswiki.org/Tasks/Item14453 [ Item14453: use relative links to other topics ] https://foswiki.org/Tasks/Item14452 [ Item14452: Not a HASH reference at .../lib/Foswiki/Plugins/PublishPlugin/Publisher.pm line 208 ] https://foswiki.org/Tasks/Item14513 [ Item14513: PublishPlugin generates
..invalid html ]
[12:19]
jastfrom what I remember, PublishPlugin isn't completely straightforward... I've never set it up myself, only seen finished setups [12:20]
gac410gac410 is miserably failing to use Foswiki::Net::sendEmail() from a rest handler. Copied the code from UI::Register. When sending to an invalid email address, the UI;;Register call simply returns an error. My exact same code called in the REST handler issues a die, and even try/catch doesn't [12:21]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Net [12:21]
MichaelDaumI was really hoping that the recent release was holding up some minimum requirements [12:22]
gac410Valid email address... it all works fine. But it has to handle errors too :( [12:22]
...... (idle for 26mn)
***ChanServ sets mode: +o Lynnwood [12:48]
.................. (idle for 1h26mn)
zak256 has left [14:14]
....... (idle for 32mn)
Lynnwoodgac410 - picking up from our conversation last night about WebNotify and macro expansion, I did a little experimentation this morning and the results are quite surprising!
I used a simple IF statement with a SSP calculation to see what would happen, and it worked!
So apparently we can create WebNotify subscriptions based on macros.
Frankly I'm shocked... but it opens up lots of possibilities.
I haven't tested to see how far we could stretch this.
[14:46]
jastI've seen a WebNotify that used SOLRSEARCH (you could use SEARCH, too, of course) [14:53]
LynnwoodI just tried another conditional that INCLUDED list from another topic.
I'm really surprised that it expands any macros before processing the subsription list.
I think this opens lots of interesting possibilities for different kinds of notifications based on status of certain topics.
A particular use case that has been requested is that particular users get notification on regular basis if certain topics have not been reviewed and updated in a certain time frame. I haven't worked out the details... but I think I could design this based on this new insight into how WebNotify topics are processed.
My thinking goes along these lines: Create a Newsletter-type page that generates report on topics that need to be reviewed/updated including time-based information (e.g. "45 days since last reviewed") and then in the WebNotify page have a conditional that does time calculation on targeted pages to determine if the newsletter needs to be sent out.
jast - It never occurred to me that one could use a SEARCH macro in WebNotify... I can conceive a different approach that uses that to do the same kind of thing I just described. E.g. Do a search that does time calculations on topics and then outputs (as footer) a subscription to special newsletter topic.
[15:00]
gac410Hi Lynnwood, Now that I think about it, it probably has to do a macro expansion in order to resolve names in the form of %USERSWEB%.SomeName. All it has to do is call expandCommonVariables once after reading the topic and the whole inside-out process applies.
But with "unexpected" features like this, it would be best to add a task formally documenting the feature. So it doesn't get "fixed" aka removed, in some future updates.
[15:11]
Lynnwoodthis is true... although i had sometimes wondered if it just ignored the %USERSWEB% part and just took the usename (since it knows where the users are). If I'm not mistaken, doesn't it work even without the web reference?
I had thought maybe the %USERSWEB% part for simply to look nicer in the WebNotify topic.
gac410 very good point.
It would be good also to document the limits of the feature.
[15:13]
gac410Yes, it works without USERSWEB, but it was probably easier to just expand macros, than to filter it out. [15:15]
LynnwoodLooking through MailerContrib.pm, I can't see where it uses expandCommonVariables in processing the WebNotify topic... but my ability to read the code is limited. [15:19]
gac410WebNotify.pm line 409
cd Plugins/MailerContrib && grep -Rl expandCommonVariables
[15:20]
Lynnwoodwell there you go... i was looking in the wrong file :-)
ok, now i get it. WebNotify.pm is called on line 233 of MailerContrib.pm...
[15:21]
gac410gac410 steps away for a while. [15:23]
.... (idle for 16mn)
LynnwoodInteresting... as I was adding a task related to this idea and noticed the comment about authors of tasks automatically being added to WebNotify for that task. I wondered how this was accomplished and see note in Tasks/WebNotify that "This topic is automatically generated by a script running on the server." No doubt, far less resource-intensive. [15:39]
......... (idle for 40mn)
gac410Lynnwood: y, WebNotify rather breaks down in our tasks web. Horribly high overhead for the 1000's of topics and hundreds of users. We had to turn off SubscribePlugin for that web as it was causing 500 timeouts on the server.
Not that it was of any use anyway there, since the cron job creates a new WebNotify in each run.
[16:19]
LynnwoodSure. that's what i expected was the case.
I'd be curious about the content of the script that generates new WebNotify.
[16:20]
gac410Its in github. ... one moment [16:21]
***gregf has left "WeeChat 1.9.1" [16:21]
Lynnwoodi should have realized... [16:21]
gac410https://github.com/foswiki/distro/blob/master/core/tools/develop/genwebnotify.pl [16:22]
Lynnwoodthanks so much! [16:25]
.................... (idle for 1h38mn)
***ChanServ sets mode: +o Lynnwood [18:03]

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