#foswiki 2016-06-10,Fri

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

WhoWhatWhen
gac410vrurg: I don't have anything merged locally. ... git status claims: Your branch is up-to-date with 'origin/Item13897'. [00:00]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [00:00]
vrurgDoes it have LSC? [00:01]
gac410Yes.
I did a git clean, checked out master, configured it from there, then checked out your branch
[00:01]
vrurgConfusing. I thought that maybe it's bootstrap failing. [00:02]
gac410I just did a "git clean -fdx; cd core; ./peudoinstall.pl developer and same issue, this time with bootstrap
But I don't even get too bootstrap... It fails very early
[00:05]
vrurgTotally strange. This is cannot be true because BUILDARGS is in Foswiki::Object which is the root of pretty much every other class in the core! Something is really fishy going on here... ;) [00:08]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Object [00:08]
gac410Would the whole stack trace help? [00:08]
vrurgNot sure but it won't hurt either. [00:09]
gac410http://pastebin.com/KD9eYtRL [00:10]
vrurgThanks! [00:11]
gac410Sorry but I don't even know where to start. My object foo is such that it's somewhere in that box on the flowchart that says "And then a miracle occurs" ... :D [00:12]
vrurgThat's not a miracle, that's a mistery! :)
What perl version is it?
[00:15]
gac4105.20.2
shipped with ubuntu
Something strange. If I try to run the unit tests, it does bootstrap, but that fails ... with a bogus failure
AUTOCONFIG: Unable to use PlainFileStore: ,v files were found in data or pub, which indicates this installation is already configured for RCS e.g. Search failed: Directory open of /var/www/foswiki/distro/core/test/data failed. Ch
eck permissions.
AUTOCONFIG: WARNING: both ,v and ,pfv files were found in data or pub, suggesting that both PlainFile and RCS have been used at some point. Unable to autoconfigure - please resolve the histories manually.
There is no such directory as ".../test/data" so I have no idea why it's trying to read it during bootstrap
[00:16]
vrurgBTW, try to replace 'use Foswiki::Exception' with 'require' in Foswiki::Object. [00:19]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Exception [00:19]
vrurgIt's a circular dependecy, actually. [00:20]
gac410yeah that fixed it. [00:20]
vrurgPerhaps my perl 5.22 handles this better than 5.20. [00:20]
gac410Hm Let me flip perlbrew on and try 5,22 may take a bit to install moo, etc. [00:21]
vrurgIf you wish.
But this is good you located this problem.
I changed it, will commit today.
[00:21]
gac410It still fails on 5.22.0
(after I reverted your fix)
btw with your fix running ./view from cli, I get the following error
[Thu Jun  9 20:22:51 2016] view: Use of uninitialized value in numeric gt (>) at /var/www/foswiki/distro/core/lib/Foswiki/LoginManager.pm line 761 during global destruction.
[00:23]
vrurgHeh... Wish I know the cause. But at least we know the problem. [00:24]
gac410Hm Is the Config hash already destroyed at that point in time? [00:25]
vrurgWhat do you mean? It may be not even built yet. [00:28]
gac410during "global destruction" ... isn
isn't that at the end of cleanup processing?
[00:28]
vrurgFoswiki::Config object must be valid until Foswiki::App DEMOLISH method completed. [00:29]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Config https://trunk.foswiki.org/System/PerlDoc?module=Foswiki::App [00:29]
vrurgActually, Foswiki::App doesn't have implicit DEMOLISH, but anyway. [00:30]
gac410Ahh.... Running in bootstrap, maybe that doesn't have a default?
no... It's defined in Foswiki.spec, so it should exist during session completion. $Foswiki::cfg{Sessions}{ExpireAfter} = 21600;
[00:31]
vrurgBootstrap is initiated by Foswiki::App constructor BUILD. [00:32]
gac410Right. But LoginManager::complete() is run after the http response is generated, to write out sessions. [00:32]
vrurgLet me check. There must be no running code after the app object gets destroyed. [00:34]
gac410hm I'm running view from cli, so I don't think there is any session to write out. But still, that key should exist.
Well I think it's deeper. Maybe CLI mode isn't working yet? I don't get any output other than STDERR messages. No html
[00:34]
vrurgI didn't check cli mode. Not even sure if Engine::CLI is functional. [00:36]
gac410Ah... okay. never mind then. I use CLI a lot ... simpler to debug than trying to debug from apache. [00:37]
vrurgBut I know what is wrong with the login manager. At the moment it's DEMOLISH method gets called the config object might be destroyed already. [00:37]
gac410but only when debugging, so not urgent [00:37]
vrurgThis is why the undef. [00:37]
gac410y that was my guess. I checked if defined && and error goes away, but that isn't the right fix [00:37]
vrurgNah, itisn't, you're right. [00:38]
gac410Otherwise session cleanup would never happen.
Want me add it to your list?
[00:38]
vrurgEither complete() must be called manually in the app DEMOLISH before attributes are destroyed. Or LoginManager must store the expiration settings on itself.
Yes, adding is a good thing.
[00:39]
gac410okay. [00:40]
vrurgTwo things would have to be done: $Foswiki::cfg use must be replaced with $this->app->cfg->data (could be pre-stored in a variable though for faster reference). And the most terrifing – LSC and specs would need to change the format and get rid of $Foswiki::cfg too.
The latter is something I wouldn't handle on my own.
[00:41]
gac410The latter will be really difficult. The Foswiki::cfg hash is part of the API. We'd need to deprecate it :(
It's really really common to reference the cfg hash in plugins, etc.
[00:42]
vrurgI know. It's not a big deal to replace it with the accessor in the code. But LSC is something different because it's using 'eval' to exapnd values. [00:46]
gac410Core code I have no issues with changing. Maybe when plugin compatibilty is addressed (if ever) it could look at recreating the cfg hash for compat purposes. [00:47]
vrurgThough there is a solution for the old-style specs which would simply replace $Foswiki::cfg with something different on the fly.
Actually %Foswiki::cfg is an alias to Foswiki::Config data attribute. So, eventually it's transparent and works as expected except for some edge cases.
For example, in a test it is impossible to pass a value from $Foswiki::cfg{Key} to a newly created app object because after the old cfg object gets destroyed that value gets freed by perl guts and this causes a panic.
gac410: Ok, no need to add the note. I have fixed it already.
[00:47]
gac410too late :D [00:54]
vrurgOk, I'll add a note. The fix isn't bad but not sure if it's good either. [00:55]
gac410: What is the standard behavior in case .htpasswd doesn't exists? Is it autocreated? [01:00]
.... (idle for 18mn)
GithubBot[distro] vrurg pushed 1 new commit to Item13897: https://git.io/vosTR
distro/Item13897 ad1bedc Vadim Belman: Item13897: MetaTests and NetTests...
[01:18]
***GithubBot has left [01:18]
FoswikiBothttps://foswiki.org/Tasks/Item13897 [ Item13897: Implement ImproveOOModel proposal. ] [01:18]
gac410vrurg, I think the configure checker can create it,
Or first registration
[01:19]
vrurgI found it. It is created by savePassword.
I have commited the fixes. Hope it works.
cu tomorrow!
[01:20]
gac410Checker will create it as well. Foswiki::Configure:;Checkers::HtPasswd/FileName.pm [01:21]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Configure [01:21]
..... (idle for 23mn)
gac410vrurg: ... seems to be working fine now ... thanks [01:44]
............................. (idle for 2h20mn)
***gac410 has left [04:04]
......................... (idle for 2h0mn)
ChanServ sets mode: +o CDot [06:04]
ChanServ sets mode: +o MichaelDaum [06:14]
MichaelDaumhttp://rauchg.com/slackin/: how they managed to grow the socket.io community [06:15]
..... (idle for 23mn)
I am going to add a slack badge to https://foswiki.org/Home/WebHome#Find_us_on_the_Net [06:38]
..... (idle for 20mn)
uebera||, are you there? can we add foswiki-slackin.herokuapp.com to the content security policy on foswiki.org, please
so that the slack badge on https://foswiki.org/Support/WebHome isn't blocked
[06:58]
***MichaelDaum changes topic to: Download Foswiki 2.1.2: https://foswiki.org/Download/FoswikiRelease02x01x02. - IRC logs: http://irclogs.foswiki.org/bin/irclogger_log/foswiki - Join on Slack: https://foswiki-slackin.herokuapp.com/ [07:01]
..... (idle for 24mn)
uebera||MichaelDaum_, I've updated the CSP, but don't see any differences. Could you verify the settings? [07:25]
What happened to the poor Google+ badge on that page? [07:32]
...... (idle for 26mn)
***ChanServ sets mode: +o MichaelDaum [07:58]
MichaelDaumtest [07:58]
uebera||Good morning, Michael. [07:59]
MichaelDaumhi [07:59]
.... (idle for 15mn)
nother test [08:14]
foswiki-slack-ir<nuddlegg> test from slack [08:14]
.......... (idle for 48mn)
MichaelDaumtest [09:02]
slack-irc1<nuddlegg> test from slack again [09:03]
MichaelDaumtest from irc
worx: we've got a slack-irc bridge
[09:03]
slack-irc1<nuddlegg> Note this channel is mirrored on the #foswiki channel on irc.freenode.net [09:11]
......... (idle for 42mn)
AGCaesarHey :) Me again :D I'm looking for a good idea to count all %COMMENT%s made in a certain subwiki. does anyone have a good idea how to do that? [09:53]
MichaelDaumAGCaesar, sorry bad luck. Content generated via CommentPlugin aren't structured data, only text fragments that happen to have a certain display format.
you can't count them in a reliable way
best alternative: use MetaCommentPlugin
[09:55]
AGCaesarToo bad.. I thought about pasting a certain string and counting that.. but the search function only shows topics once, not per string occurence.. [09:56]
.... (idle for 15mn)
ah i found a more... crude solution that does not require me to learn about the new Plugin:
grep -rnw '/var/www/foswiki/data/Subwiki/' -e "xyz"
and then divide by two...
[10:11]
............... (idle for 1h11mn)
slack-irc1<polly> [11:22]
AGCaesarI fail in changing the signature of a comment... can anyone help me an tell me what to change? [11:35]
***ChanServ sets mode: +o MichaelDaum [11:36]
AGCaesarI tried changing CommentPluginTemplate
%TMPL:DEF{outputoneliner}% * %URLPARAM{"comment" encode="$encodeguest"}% -- %WIKIUSERNAME% %COUNTER%- %GMTIME{"$day $month $year"}%%TMPL:END%
but nothing happened...
I added a modified version to my UserCommentsTemplate but still nothing...
[11:36]
.......... (idle for 49mn)
***ChanServ sets mode: +o gac410 [12:25]
gac410I'm not convinced we should be pushing $lack on our community. I have no interest in joining. [12:36]
MichaelDaumnor am i [12:37]
gac410They have no open source accommodation. [12:37]
MichaelDaumyet still it is worth the try
is github opensource ;)
or google+
[12:37]
gac410No, but they are completely free for open source projects. $lack seems somewhat restricted except for Tax Exemptl 503c charitable ... not non-profit [12:38]
MichaelDaumthe free plan is coming with some restrictions, yet not as severe to render it useless
there are lots of people that would not recommend slack for foss
[12:39]
gac4102-person limits for conference calls [12:40]
MichaelDaumah ok
well it does integrate nicely into google hangouts though
lots of integrations to slack only make sense for paying customers such as screenhero which has been aquired by slack ...
yet still their api is pretty open to everybody else outside
last but not least their mobile client rox
anonymous online voting as we do it during our assembly ... realtime results
no matter whether slack is open source or not ... what a great product. hats off!
[12:40]
there other voices from open source communities reporting a much higher acceptance among members. for a certain kind of people IRC is too archaic. [12:50]
gac410Well for one I don't Want my phone to be getting messages when I'm not engaged on IRC. I don't need to follow everything all the time. If I *need* to be connected I have a client I can use. [12:51]
MichaelDaumup to you. more of the problem the other way around. [12:52]
gac410Phone tends to be a distraction. It "bings" I look. Not good when driving, which I do a LOT of lately. Too tempting to look at it. But I also use it for navigation/traffic/road conditions, so it's there on the dashboard. [12:55]
MichaelDaumyes. even for walkers.
I regularly see them bump into cyclists.
[12:55]
gac410y, or even light poles / off curbs, ... [12:56]
MichaelDaumanyway.
slack lets you configure the notifications you get ... as all the apps do.
[12:58]
gac410So changing subject ... I didn't see you commit the postdata fixes. [12:58]
MichaelDaumMichaelDaum lazy :) [12:59]
gac410np [12:59]
MichaelDaumwrt slack. wanna try anyway? [12:59]
gac410gac410 got my medical back from the FAA for flying yesterday, so that gets added back onto my free time yay...
Not yet MichaelDaum ...
[12:59]
MichaelDaum... a new toy for roy [13:01]
gac410Someone grabbed my IRC freenode account yesterday. I had to enable secure mode and change my password.
First time that has happened.
[13:01]
MichaelDaumwtf [13:02]
FoswikiBotwtf is going on with FoswikiBot. ... "that" seems to have triggered a response [13:02]
gac410and now wtf has triggered foswikibot [13:02]
MichaelDaumwtf [13:03]
FoswikiBotwtf is going on with FoswikiBot. ... "that" seems to have triggered a response [13:03]
gac410that [13:03]
FoswikiBotthat is really strange or the reason while I upgrade the hardware at the same time. Then I can have a test install and do a test conversion - fix the issues (taking notes) - and then finally cut over [13:03]
gac410One-word messages seem to trigger some sort of recall of the last message
One-word
[13:03]
MichaelDaumoic [13:03]
gac410Someone
strange.
Anyway, when I tried to connect it said my account was in use. I had to use the "regain" command to take it back
[13:04]
Anyway MichaelDaum (everyone really) ... if you have not done so, best to /msg nickserv set enforce on after you've identified. This sets a 30-second timer for your ID. If you don't supply the password within 30 seconds, the identity is changed
Otherwise when you are offline, anyone can "take over" your identity. I never realized that.
[13:11]
..... (idle for 23mn)
***ChanServ sets mode: +o gac410m [13:36]
.......................... (idle for 2h5mn)
gac410MichaelDaum just out of curiosity, did you have any idea why the SUPER::param() method wasn't working for POSTDATA? bin/configure was working fine and uses POSTDATA extensively with jsonrpc
Also we may need some special testing with mod_perl, as IIRC Apache::Request handles POSTDATA differently from CGI
[15:41]
MichaelDaumyes I've figured it out as docu'ed on the task item [15:43]
gac410gac410 goes to look. Thanks. [15:43]
MichaelDaumbasically the page cache was trying to iterate over all (url) params ... and this causes all sorts of problems when json keys are returned as well. Also, POSTDATA didn't make it up to the cgi request for some odd reason.
and then multi_param and json's param() didn't harmonize either
[15:43]
gac410ugh.
ya i didn't override multi_param, didn't realize that json could have multi-valued params as well.
[15:44]
MichaelDaumnaw, that doesnt make sense at all for those keys coming from jsondata
these are array refs
[15:45]
gac410okay ... that's what I though. rest and attachment both seem to be fine. I need to test attachment with your xsendfile to see that it can work as well.
And I was pondering renameing Request::rest to Request::REST as rest really is an acronym like JSON
[15:46]
MichaelDaumbtw I am working on an extension to xsendfile to also protect any other filesystems such as /pub/images/web/web/topic/file or /pub/export/Web/Topic.pdf
y
[15:47]
gac410cool ... Yeah I saw your protect attachments extension as well. Nice idea. [15:47]
MichaelDaumwrt naming: how about renaing jsonparam() to jsonParam() [15:47]
gac410Sure.
Should bin/configure be caching the jsonrpc requests? I didn't see any indication that it was happening ... even on Release02x01
[15:48]
MichaelDaumI was thinking of a config hash that defines one or more locations and how to identify the web, topic and file part of it [15:48]
gac410I enabled the Cache tracing, and it was silent during bin/configure / bin/jsonrpc operation [15:49]
MichaelDaumno idea [15:49]
gac410That's why I was confused when you mentioned pagecache on jsonrpc. I could not see how configure could prevent it. [15:50]
MichaelDaumnother thing: next release of PageOptimizationPlugin is no fit for purpose combining all css and js into one ... caching it somewhere in a sensible way
s/is no/is now/
[15:50]
gac410cool ... I've never looked at that extension. [15:51]
MichaelDaumwe always suffered from too many js and css. combining them was broken in currently published release of POP
nother thing: next release of NatSkin will have all js at the bottom of the page, just before the closing </body>
[15:51]
gac410y, various html optimizer pages always complain about too many requests. Other think that could be done ... but woiuld be a lot of work would be ot combine images with (is it called a sprite? ) [15:52]
MichaelDaumyea but I am not sure it is worth it, now that we have http/2 [15:53]
gac410ah.... yeah that feedback is pretty old now. [15:53]
MichaelDaumhttp2 ... not for IE11 on < Windows 10 [15:54]
gac410gac410 doesn't even have a windows machine, so meh... [15:54]
MichaelDaumI've fixed PageOptimizerPlugin to be compatible with AngularSkin/Plugin
AngularSkin is benefiting most from jsonrpc calls being cached as these hold template snippets to be injected into the page
[15:58]
gac410ah... makes sense. I would think configure might get a boost too. It makes a lot of json requests. [16:01]
MichaelDaumyea well, it rather gets fresh data ... i guess [16:02]
gac410hm in most cases probably not much changes But y, especially things like file system permission checks, email wizard, etc. would be really bad to cache. [16:03]
MichaelDaumgo figure there was a caching issue in configure while fixing those things [16:04]
gac410yeah. The only thing is I could not spot why it actually *isn't* cached. At least I couldn't find anything that told cache to "don't cache this request"
Probably there somewhere.
If I could find a simple json request in core that was cached, adding it to the unit tests would be pretty easy. Now that I finally understand the Cache tests.
[16:05]
......................................... (idle for 3h23mn)
MichaelDaum_Test [19:29]
TitanOfOldMichaelDaum_, your test worked. [19:30]
MichaelDaum_Yea that was not obvious. Slack had a massive server downtime. The slack-irc bridge survived. [19:38]
............................ (idle for 2h18mn)
vrurgHi!
gac410: are you here?
[21:56]
gac410For a few moments ... supper starting
gotta go fire up the grill ;)
[21:57]
vrurgOk, then later. I think there is a bug in LoginManager. [21:57]
gac410I'm sure there are plenty :D [21:57]
vrurgCould be one less. :) [21:57]
gac410anyway ... what's the bug [21:58]
vrurgmaster branch, line 517 [21:58]
gac410looking [21:58]
vrurgauthUser gets assigned from defaultUser. If you read the comment, this assignment makes sense only if loadSession got called with defined defaultUser.
but defaultUser is assigned from Foswiki::cfg{DefaultUser} on the beginning of the sub!
In my branch it casuses false setting of user.
[21:59]
gac410That's a long routine ... I'll read through it. a little later and try to figure out what it's doing / supposed to be doing.
hm In master it's called with $defaultUser passed... and then $defaultUser = $Foswiki::cfg{DefaultUserLogin}
     unless ( defined($defaultUser) )
So it's conditional
[22:00]
vrurgIt's simple: when defaultUser is undef authUser supposed to be undef too. This is what is 517 is about. [22:01]
gac410hm I think we are suppose to always have some identity. So defaulting to Guest is okay [22:02]
vrurgAt least this is how I read the first line of the comment: 'if a user was passed'
Perhaps you're right. Then the comment is misleading.
[22:02]
gac410I'm pretty sure that foswiki should ALWAYS be working with some identity, and fallback is the defined guest user in the LSC
But y, there may be some issue there
Note that on your branch, I've had trouble logging in. It never seems to establish a logged in identity for me. At least recently
gac410 has to go... Gotta start grill laters.
[22:04]
vrurgOk, to me it simply means that user attribute cannot be lazy-initialized because it breaks plugins initializing.
Have a nice BBQ! :)
[22:06]
................ (idle for 1h17mn)
***gac410 sets mode: +v [LOGGER_FOSWIKI] [23:23]
gac410vrurg: okay. Foswiki.pm new() calls loadSession with a undefined defaultUser ... it's only specified either when bootstrapping (to force admin login) or for unit test purposes.
Then, when loadSession is called, it sets the default to the guest, unless it was overridden by Foswiki.pm (bootstrap admin or testcase)
that loadSession attempts to establish an authUser by checking various possibilities. and sets it to the defaultuser if it can't find or validate some other user.
So far I'm not spotting an issue.
[23:36]
vrurggac410: As I later suspected, it's just the comment which is misleading.
I came to similar conclusion as you did.
The point is that I totally disagree with the logic that Foswiki::Users is responsible for loading plugins – phew, this is ugly. There must be other way to have the user redefined by a plugin. I'm trying to find this way.
[23:38]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Users [23:39]
gac410Foswiki::Contrib::JsonRpcContrib::Server overrides the login ... I really don't like that. It digs user/password out from the json request and uses that to login. [23:41]
FoswikiBothttps://trunk.foswiki.org/System/PerlDoc?module=Foswiki::Contrib::JsonRpcContrib::Server [23:41]
gac410UI::Rest used to do the same thing. I removed all that code a while ago and let Loginmanager deal with it. [23:43]
vrurgIt's gonna be another problem. :( [23:49]
gac410well with the new request and subclassing, we *should* be able to have Request::JSON just provide the user /password params to the login manager.
Waiting for MichaelDaum_ to post his fixes to the JSON subclass as my version isn't working.
[23:49]
vrurgDefinitely. This is not the contrib job to determine low-level things. [23:50]
gac410The problem was that userid and password "params" are in the JSON POSTDATA, and not in the query params. so with the subclass, it should "just work" [23:52]
vrurgFor the moment I'm trying to get around another problem which is also close to all this. TWikiCompatibilityPlugin sets preferences in earlyInitPlugin. But this handler is called when plugins are just load and at that moment nothing can be guaranteed, including the existance of the preferences stack. So, to keep compatibility I decided to have some kind of presets on preferences which are read when appropriate. [23:53]
gac410I hate to say it, but I suspect that plugin should be dropped for now.
If we are not compatible with older Foswiki plugins, why even try for TWiki compatiblity
[23:53]
vrurgI'm afraid it wouldn't be the only one to try this trick.
Yet, the presets concept itself may become handy in some cases. Tests may benefit from it too.
This is not that clear with the old model, but because the new is about incapsulating everything into the app object it's not always easy to mangle with individual elements of the system.
[23:54]

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