#foswiki 2015-12-08,Tue

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

WhoWhatWhen
Lynnwood__You could also create a custom edit template that hides the permissions tab... [00:00]
vrurgLynnwood__: not really. But in a situation when one would decide to change permissions before saving it becomes a race condition. [00:00]
gac410vrurg: Im trying to follow the template expansion process. Do you know is the issue that the %META definitions simpy exists in the expandvariables section? Or is it because they are dynamic. [00:00]
Lynnwood__if you really want to intervene in how the permissions tab is working, you would probably have to do something with javascript as that is mostly generated in that way. [00:00]
vrurggac410: Because it's dynamic. [00:01]
gac410okay, so if you put a Static definition into the expandvariables section it works. Only if you put a dynamic defnintion into the expand section,.
does it fail.
[00:01]
vrurgLynnwood__: but lets leave the permissions alone. What about the idea of dynamic META in templates in general? Permissions could be not the only application for them. Perhaps.
gac410: no, it doesn't. But it's not reflected on the Permissions tab until it's saved and reedited.
[00:02]
gac410vrurg, any chance you could "pastebin" the template that you are using so I could try it here [00:03]
vrurgI think META has to be reparse after a call to expandMacrosOnTopicCreation()
gac410: I thought about it already. Can you make me a sanbox subweb?
[00:03]
gac410vrurg: I created http://trunk.foswiki.org/Sandbox/VrurgSandbox/WebHome ... Trunk, so if we come up with a patch, you can test. [00:07]
vrurggac410: I'd test on my local copy.
I mean I thought to make the patch.
[00:07]
gac410Ok... in any event, if you want it on f.o, I can do that too, but trunk runs from a git checkout, so it's the bleeding edge. [00:08]
vrurgAdd permissions for VadimBelman please. :) [00:08]
gac410What can't you do?
You should be able to edit,
Oops. WebPreferences. ... I'll fix
You should be all set now... .. I locked myself out :D
Okay vrurg I see the issue, not sure how best to fix it. In Foswiki/UI/Edit.pm around line 311, it copies the preferences from the template topic object to the new topic object.
[00:09]
vrurgI have added AdminGroup to the preferences. [00:15]
gac410Then it expands the templates. So if the template doesn't have "real preferences", then the probably won't get copied correctly. Normally ACLs cannot be dynamic
Okay Thanks vrurg, I have a sudo login though so I can always get around lockouts. I have the power :D
[00:15]
vrurggac410: I think there shall be difference between template text, expandvariables section and templateonly section.
gac410: Anyway I was there. So, why not? ;)
[00:16]
gac410yeah. And in this area, I'll probably want to think carefully before checking in something .... This stuff is pretty fragile [00:17]
vrurgI think so too. Perhaps edit shall refetch only that metadata which directly applicable to the topic editing. Like data form fields and ACLs.
And ACL are not to be checked, only allowed to be edited. Anyway the topic doesn't exists yet until it is saved.
[00:19]
gac410right. And the other thing, ACLs are never dynamic at least on stored topics. So expanding them dynamically from a template makes sense, but not once the topic is saved. [00:23]
vrurggac410: exactly.
Since saved they can only be edited manually.
BTW, I have created demo template in the sandbox.
[00:25]
gac410Okay thanks. [00:29]
vrurgI need to leave home now as my hungry cats will eat me before I'll feed them... :) [00:33]
gac410okay ... I understand :) [00:33]
vrurgWill try to find some more time to work on this today. [00:33]
gac410Okay. I'll take a look at your template soon. [00:33]
vrurgI'm currently looking into the code. Looks to me like it's better to add a new type of section for dynamic META and make the end user responsible for what he does with it. [00:35]
gac410That would need a proposal I suspect. Changes to the "api" [00:36]
vrurgOtherwise it's gonna be quite costly operation to do thing properly and still it won't be as flexible as I'd like it to be.
Perhaps I'd create it today or tomorrow and would try to implement in a branch.
[00:37]
GithubBot[distro] FoswikiBot pushed 1 new commit to master: http://git.io/vRXNW
distro/master 778b506 Vadim Belman: Item13884: Translations updated using Weblate (Ukrainian)...
[00:37]
***GithubBot has left [00:37]
FoswikiBothttp://foswiki.org/Tasks/Item13884 [ Item13884: Translation changes for master and Foswiki 2.1 ] [00:37]
GithubBot[distro] FoswikiBot pushed 1 new commit to Release02x00: http://git.io/vRXNV
distro/Release02x00 d0307f7 Vadim Belman: Item13505: Translated using Weblate (Ukrainian)...
[00:38]
***GithubBot has left [00:38]
FoswikiBothttp://foswiki.org/Tasks/Item13505 [ Item13505: Translations for Foswiki 2.0.x ] [00:38]
....... (idle for 32mn)
gac410vrurg. Very simple fix. one-liner ...
Well one line until perltidy takes charge
So the big question, is do we want to do this,
[01:10]
....... (idle for 33mn)
vrurg ... I have a fix [01:45]
vrurgEh... seriously? ;) I haven't even got my late dinner ready! ;) [01:46]
gac410http://pastebin.com/qCU9eBaS
Just need to serialise and de-serialize the object. That converts any embedded META into the real thing.
[01:46]
vrurgSo, the solution seems to be to make the end user responsible for any possible consequences? [01:48]
gac410I think it's pretty safe as well. Need to review it with CDot,
Well, That's true regardless.
[01:48]
vrurgOk, I'll try the patch on my local setup. One thing I might expect is that improperly formed ACL meta might block user from editing the newly created topic. But I'll check it yet. [01:49]
gac410That would be true with a * Set statement or meta in the standard template as well.
Basically correctly formatted META can occur anywhere in a topic, and the deseriaise process will pick it up and recognize it.
The only exception is TOPICINFO which must be the very first line.
So whether you put the META in a template, or a user types it directly into the topic text, it becomes active the next time the topic is read.
[01:50]
vrurgTrue. No point to be worried about this then. [01:52]
gac410I don't really see any downside of this change, but CDot will know much better. If you could, please open a task and I'll paste in the patch and ask him to review. [01:54]
vrurgTested. Works as a charm. Will have a task ready in few minutes. [01:55]
gac410Great thanks. [01:56]
.... (idle for 15mn)
vrurgIt's my thanks to you! :) Item13889 is ready to be reviewed. [02:11]
FoswikiBothttp://foswiki.org/Tasks/Item13889 [ Item13889: Processing of dynamically generated META in a new topic template doesn't work. ] [02:11]
gac410Okay. I'll get the patch pasted. [02:12]
vrurgSorry if it's not the best subject, I'm a bit tired today.
If get's thru the review process I'll have the key to one of the crucial parts of my departement's task web.
[02:12]
gac410okay vrurg, fix is pasted and task awaiting Crawford. [02:26]
vrurgGreat. I'll be off for today. Thanks and g'night! [02:31]
gac410g'night [02:31]
.......................................... (idle for 3h26mn)
***gac410 has left [05:57]
................. (idle for 1h20mn)
ChanServ sets mode: +o MichaelDaum [07:17]
..... (idle for 24mn)
BenjaminMartinhi all
finally we managed bulk_copy to run,but:
it takes several DAYS to run and it crashes after 2 days in some web ...
is there a way to restart bulk_copy and to check which topic has been copied within a web, or if all topics were copied?
also the "--latest" option seems to be ignored and all revisions are copied - which are, in some case more than 2000
[07:41]
................................................... (idle for 4h14mn)
***BenjaminMartin has left [11:59]
.... (idle for 19mn)
TeQuillaaaAif I want to login credentials i cant and in the error log i get the following message: see -> http://pastebin.com/WUSb4w1M
*login <with my> credentials
[12:18]
...... (idle for 26mn)
***ChanServ sets mode: +o Lynnwood [12:48]
.............. (idle for 1h9mn)
ChanServ sets mode: +o gac410 [13:57]
TeQuillaaaAany ideas? [14:03]
..... (idle for 20mn)
gac410MichaelDaum_: I've got a simple fix to Item13889, which modifies how META is expanded and applied from topic templates. So i'm hesitant to just check it in without some review [14:23]
FoswikiBothttp://foswiki.org/Tasks/Item13889 [ Item13889: Processing of dynamically generated META in a new topic template doesn't work. ] [14:23]
MichaelDaumI wouldn't use that mechanism for META:PREFERENCES
instead use something like this in the form generating the topic:
<input type="hidden" name="Set+ALLOWTOPICCHANGE" value="SomeUser">
[14:26]
gac410vrurg: That advice is for you ;)
Good point on the implementaiton MichaelDaum ... however right now the current operation is surprising, in that any META contained in a expandvariables section is visible during the initial edit, and then becomes hidden/active after save.
So the Meta gets into the topic regardless,
[14:27]
vrurgMichaelDaum: there is no form generating the topic. And I'd like to avoid for now. The whole point is to generate it in a template.
And gac410 stated the good point in addition to what I said in the report.
[14:29]
MichaelDaumah okay. well anyway. here's the docu on the Set+FOOBAR mechanism http://foswiki.org/System/CommandAndCGIScripts#A_61save_61 [14:30]
BenjaminMartinhi all - due to some problems here i lost my chat history, therefor i'll repeat my question: we managed bulk_copy to run, but it takes at least 2 days to do half our wiki and then it crashes somewhere with "broken pipe". The problem/question now is: is there a way to tell the skript to continue from some point or to check what it has already copied? [14:30]
gac410ah interesting point, by putting it into an edit template, esp. the default template, it just happens on any topic created in the web,
BenjaminMartin: Are you converting to PlainFileStore as well?
[14:30]
BenjaminMartinalso the option "--latest" seems not to work, and some topics have several thousand revisions and this slows down the skript due to --latest ... (?)
yes, converting to plain file store
[14:31]
gac410BenjaminMartin: I wish CDot were here... He's the author of that tool. I've not tried the --latest option. [14:32]
BenjaminMartinwe tried with --latest, but it still takes all the revs [14:32]
gac410Okay, then that is indeed your only choice. The other faster tools can't convert to a different store. [14:33]
vrurgMichaelDaum: but this is about save. What about my situation where I'd like to reflect the permissions while editing a newly created topic before it gets saved? Unless I miss something here... [14:34]
BenjaminMartinwe were surprised about the runtime of 2 days of half the wiki ... :) [14:35]
MichaelDaumtricky
not a use case that comes up that often
[14:35]
gac410Re: latest, Probably need to get a task opened. [14:35]
MichaelDaumvrurg, did you think about putting all topics covered by these access controls into a web of its own? [14:36]
BenjaminMartin*for half the wiki [14:36]
gac410Performance, Are you using rcs or rcs_lite on your "from" store? [14:36]
BenjaminMartinrcs_lite [14:36]
MichaelDaumvrurg, so that appropriate rights are put into WebPreferences thus covering all topics created in that web ... instead of having redundant access control for each topic created [14:37]
vrurgMichaelDaum: I love such cases. :) They're gonna be in a separate web. As matter of fact I'm implemeting task handling web for my department needs. [14:37]
BenjaminMartinbut maybe its also a storage related problem in our testing network [14:37]
vrurgMichaelDaum: Unfortunately, this specific is needed for task items only. [14:38]
gac410rcs_lite is slow especially processing histories, it brings in the entire history into memory. When you hit a big topic or attachment with 1000 revs, it's really slow. [14:38]
MichaelDaumvrurg, good luck with that :) always a Good Thing to stretch the technology towards its limits [14:39]
gac410MichaelDaum: Regardless of the application design, the fix seems to be safe / simple, but those are "famous last words" around here :D [14:39]
vrurgAll other topics on the web are to be standard. [14:39]
MichaelDaumgac410, dunno what the sideeffects will be ;D [14:39]
BenjaminMartinok, thanks - so we have to plan 3 or 4 days for upgrade :) [14:40]
gac410A serialize/deserialize operation should be a NOP in most cases, but if META is "out of place" then it gets procesed. [14:40]
MichaelDaumgac410, sounds good [14:40]
gac410BenjaminMartin: have you tried rcs, vs. rcs-lite?
No idea if or how much faster it will be.
[14:40]
vrurgMichaelDaum: I think same side effects we might get just by putting same META into template in plain form. Then it gets fetched and processed by edit absolutely the same way. [14:41]
gac410Are you running 2.0.3 ? There is a bulk copy bug in 2.0.2 [14:41]
BenjaminMartinrunning 2.0.3 - did not try rsc vs. rcs-lite ... but wont change the current running system :) [14:42]
gac410When Meta is part of the template proper, it gets copied into the new topic by a "foreach PREFERENCE" loop that pulls it from the META. But when it's expanded in part of a section, it's just data, ... until the topic gets saved, and the it is deserialized on next read.
BenjaminMartin: I'll have to test the --latest option and see if I can recreate it. Task would be helpful
[14:43]
BenjaminMartinok ... so i have to get all our information to open that task [14:49]
gac410And I can't find a topic with a big history on my local test systems. :( Maybe I'll pull a WebStatistics from Foswiki.org [14:49]
BenjaminMartin: okay confirmed. and fixed :D
Documentation error
--latest 'WebStatistics' seems to limit it to one rev. The example --latest '*.WebStatistics' does nothing.

It seems that it only wants a topic name, not a Web.Topic
So that's the bug
[14:57]
BenjaminMartinshall i still open that task? [15:00]
gac410Yes please. I'll try to figure out a real fix. [15:00]
BenjaminMartinaffected component = engine? [15:05]
gac410That's fine. We can fix the rest of the stuff up.
We really don't have a component that really fits bulk_copy. maybe FoswikiTools. I was just looking for one
[15:06]
BenjaminMartintask created (maybe forgotten some information/details :) )
Item13890
[15:09]
FoswikiBothttp://foswiki.org/Tasks/Item13890 [ Item13890: bulk_copy ignores --latest option ] [15:10]
gac410I think it's a bug in how it converts from "wildcard" to regex. The *.WebStatistics gets converted to /^.*\\.WebStatistics$/ So somehow it double-escaped the .
[15:12]
BenjaminMartini could try it with single \ [15:17]
gac410no. That's not it. It works fine if you just drop the wildcards. It's something to do with how he wrote processes the list of regexes.
The \\. was an artifact of using Data::Dumper
Okay. dumb error ... I have a fix. The code compares $topic to the regex No webname in the string. Comparing "$web.$topic" against the regex fixes it.
[15:18]
BenjaminMartinah ok
which line to edit?
*lines
[15:21]
gac410Hang on. I'll post a diff. [15:21]
BenjaminMartinok [15:21]
gac410Diff is posted to the task. Line is 281, Should be:    if ( grep { "$web.$topic" =~ /^$_$/ } @{ $control{latest} } ) {
Changed $topic (unquoted) to "$web.$topic" (quoted)
[15:26]
BenjaminMartinthanks! [15:28]
GithubBot[distro] gac410 pushed 1 new commit to master: http://git.io/vRyKY
distro/master 22951fe George Clark: Item13890: bulk_copy --latest compares Web.Topic...
[15:29]
***GithubBot has left [15:29]
GithubBot[distro] gac410 pushed 1 new commit to Release02x00: http://git.io/vRyKR
distro/Release02x00 df2ae38 George Clark: Item13890: bulk_copy --latest compares Web.Topic...
[15:30]
***GithubBot has left [15:30]
gac410BenjaminMartin: The other way to deal with big rev histories .. especially if you are just going to skip them. Is to rm the WebStatistics,txt,v file on the source system. [15:34]
BenjaminMartinyes, we thought about it [15:44]
gac410It will also speed up the statistics run. We found on f.o, our statistics run was taking longer and longer. Part of issue is we were running every 15 minutes. We changed to nightly and dumped the history
And also in Jan, we split WebStatistics out into WebStatisticsYYYY so we start fresh each year.
[15:46]
.... (idle for 17mn)
BenjaminMartinwe also use nightly and split every year as you do ... but as i mentioned, maybe its our test-network which has slow storages and therefor we have loooong runtimes ;)
thanks for today, i am off
[16:03]
GithubBot[FieldHistoryPlugin] KennethLavrsen created master (+1 new commit): http://git.io/vRyhE
FieldHistoryPlugin/master 4ba0732 KennethLavrsen: Item13888: Initial checkin
[16:17]
***GithubBot has left [16:17]
FoswikiBothttp://foswiki.org/Tasks/Item13888 [ Item13888: Initial development of new FieldHistoryPlugin ] [16:17]
.................... (idle for 1h37mn)
vrurgInteresting... Is it possible to have additional local translations for MAKETEXT? [17:54]
................... (idle for 1h32mn)
gac410vrurg, Yes I believe so. Before we used weblate, and pootle before it, translation was done by manually editing the .po files
Translation of extension can be done as well ... Foswiki 2.0 can have Extension directories in Locale, with their own translations in addition to the core / default extension translatinos.
[19:26]
vrurggac410: Thanks, I know about extensions. Currently I want individual translation for my tasks web. It's a 3rd priority problem anyway, just preparing grounds to implement it. [19:34]
.................. (idle for 1h27mn)
jomoFoswikiBot: seen CDot [21:01]
FoswikiBotjomo: CDot was last seen in #foswiki 1 days 13 hours ago joining the channel. [21:01]

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