#foswiki 2017-03-02,Thu

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

WhoWhatWhen
***gac410 has left [05:33]
................... (idle for 1h30mn)
ChanServ sets mode: +o MichaelDaum [07:03]
ChanServ sets mode: +o cdot [07:12]
.................................................................................. (idle for 6h46mn)
ChanServ sets mode: +o gac410 [13:58]
gac410jast: If you get a chance could you look over the zone hooks in SWP? I noticed that the rendered output has incorrect class= ... it's missing the substitutions somehow.
Opened Item14336. I tried to follow what was happening using print statements, but seem to be missing what's going on.
[14:05]
FoswikiBothttps://foswiki.org/Tasks/Item14336 [ Item14336: SafeWikiPlugin breaks zone id information ] [14:05]
gac410Does m-a have a public q-wiki demo somewhere where I could view the html source to see if their version is messing up as well?
cdot, from what I can see, SWP has some issues in rendering the zones. Though it doesn't seem to cause problems, it sure doesn't look right.
The thing that's most confusing, I added print statements and I don't even see that the invalid statements were ever even processed by the original Foswiki zone code.
[14:06]
jastgac410: there's no public demo but you could probably ask support for an account on their closed demo system [14:13]
gac410okay thanks. Probably not worth it though. Still trying to understand wtf is going on. [14:14]
jastwhere is the markup coming from (prior to SWP apparently messing it up)? [14:17]
gac410I think it's the addToZone, not ADDTOZONE, it's all the JQUERY Javascript.
I think maybe the hoist / unhoist code might be not expanding the $id / $zone tokens? Not sure yet. I just discovered that code
[14:17]
jastit's not supposed to be making changes to random attributes in the markup [14:20]
gac410That's what it is. zone code, when it expands the markup, is ssupposed to substitute the $zone and $id back into the class=" "
Somehow that gets bypassed when SWP proceses the zone.
[14:21]
jastoh, I see now
this substitution thing didn't exist when I wrote the SWP changes, AFAIK
let me explain what the heck SWP is doing to the zones :)
at addToZone time, any trusted code is replaced with a unique placeholder. so, when the zones are rendered, only that placeholder actually gets inserted into the page. SWP restores the original content from the zone entry after applying its filters to the HTML, so effectively the trusted zone entries bypass the filter
since zone rendering does its substitutions before the original content goes back into the page, it doesn't see the placeholders. SWP needs to be taught to do the same kind of substitution as part of unhoist
[14:22]
gac410yeah. I'll take a look at it I may be able to just c/p the code out of the core zones code. [14:24]
jastso basically fix the monkey patch by making it bigger. :D [14:26]
gac410I'm not sure SWP has the information needed to actually fix this. The core zone is using parms->(format) to get a template for the line consisting o $zone, $id, and $text. and then does the substitituions
SWP is hooking into the add* side. But the substitution is done on the Render side.
[14:30]
jastwe can give SWP the information
the placeholder currently only contains our unique ID, we can add the substitution tokens to the placeholder
so then, when we unhoist, we know all of the values because the zone code has done the substitutions for us, in our placeholder string
[14:33]
gac410But we also need the "template" There are 4 tokens in the template. $id $zone $missing and $item $item has already been substituted as that's the inline code.
The core _renderZone is never called with SWP active.
[14:38]
Looks like the code that "requires Missing ID's is also not fully resolved. With SWP disabled, no missing ID's are reported. with SWP enabled, I get reported in the rendered output: <!--JQUERYPLUGIN::FOSWIKI: requires= missing ids: JQUERYPLUGIN-->
What I don't understand is why the core does not appear to even call the Render::Zones::_renderZone ... You are not replacing that code with the hooks.
[14:48]
.... (idle for 16mn)
One thing that's really confusing, is that "Private function used by unit test" comments in the Zones code are bogus, They are called internally and by Foswiki.pm [15:07]
.... (idle for 19mn)
jastI think _renderZone is not getting called because RENDERZONE now works on special RENDERZONE markers, which wasn't the case in Foswiki 1.1
no, actually SWP isn't involved in that at all
[15:26]
gac410I'm slowly adding some TRACE statements into Zones code. It's all pretty confusing to me. [15:27]
jastis _renderZoneById getting called? [15:28]
gac410Yes. I think so.
Just got the trace added there.
[15:28]
jastI'm fairly confused. _renderZoneById aborts if an entry is not found in $this->{_renderZonePlaceholder}... but no such entry is created anywhere in Zones.pm [15:30]
gac410I was wrong. _renderZone is called ... It must be returningearlier
_renderZonePlaceholder is created in the %RENDERZONE% macro
[15:31]
jastyeah, just found that [15:31]
gac410Okay, so when _renderZone processes all of the items in the zone, I'm seeing things like:
processing Zone text (<!--safewiki:DOBzzLfFoCX6KXsmEpCxS1SAQpE-->)
processing Zone text (<script class='$zone $id' type="text/javascript" src="/pub/System/JavascriptFiles/foswikiString.js"></script>)
And right below that is where the tokens are replaced.
I added the print stmt in the foreach my $item (@total) { loop in sub _renderZone
[15:39]
***ChanServ sets mode: +o Lynnwood__ [15:49]
gac410I think you are right. We need to add $zone and $id tokens into the placeholder, and then when substituting the placeholder, also substitute back in the zone and id tokens
I think that there is more to it though. It also detects missing IDs and I'm not sure how that works yet.
[15:54]
jast, I think I have a fix
added to the Safewiki-id string :$zone;;$id and then extract and expand them when doing the unhoist. Seems to workfine
it also fixes the missing IDs
[16:04]
jastworks for me
there are some more placeholders, though...
no, never mind
I didn't see the impact of the ordering of some of the substitutions
[16:05]
jmk0This is an entirely crazy idea given the amount of work it would involve (and feel free to ignore me because of that, I'm really just throwing it out to get the gears spinning) but I think it'd be useful to have something like git as a back-end for topic version control instead of RCS. This could allow more sophisticated management of documents using git directly. [16:07]
gac410There has been some investigation of that going way back. The challenge is that the wiki does change tracking on a per-topic basis. [16:08]
jmk0e.g. map git branches to sub webs and allow merging and what-not between them using the git interface instead of the web interface. [16:08]
gac410But git is tracking the entire repository. [16:08]
jmk0the source, yeah [16:08]
gac410With multiple threaded web handlers, you can have simultaneous editing ofmultiple files in a web. [16:09]
jmk099% of use cases probably don't have such a need of complicated management but there have been times as we document our software that having git-like functions would have been handy [16:09]
jastthe problem is that merging stops being useful if you have completely unrelated changes in the piece of commit history you're wanting to merge
git is simply a poor fit for a wiki
[16:09]
jmk0I'm not convinced that's the case, jast, but again I'm only thinking, not necessarily suggesting and certainly not implementing :) [16:10]
jastI thought about it at length the last time it came up a couple of years ago [16:10]
jmk0I haven't done anything like this myself but can't you merge changes on a per-file basis? You don't have to merge entire branches, right?
hmm maybe not, the git man page doesn't indicate something like that is possible
[16:11]
gac410There was an attempt to implement a Git related store a long time ago
https://github.com/foswiki/GitPlugin/blob/master/data/System/GitPlugin.txt
I have no idea where it went, or if it's in any way usable. cdot might know.
as I think he was the author
[16:12]
jmk0interesting
in any case it'd be handy to have some kind of branching/merging kind of capability on a per topic basis, but probably not worth the effort if it can't be done using some 3rd party back-end
and an alternate interface for changing documents besides the web, though the web can be automated reasonably easily
[16:13]
cdotGitPlugin - abandoned it due to lack of interest from anyone. [16:17]
jmk0heh! [16:17]
cdotreally to tap into the kind of capability git offers, you need a completely different front end
as jast says, it's just a poor fit.
[16:17]
jmk0I'm pretty sure you can do what I describe using perforce but as that's a commercial product.... [16:19]
jastyou can do it using svn, too
the question is, should you
[16:19]
jmk0oh yeah? I thought that might be the case but have no experience with svn
lol
[16:19]
jastyou have to make a bunch of trade-offs when designing a wiki store... and my use case might be quite different from yours :} [16:20]
jmk0ok so why wouldn't you want to be able to? or want to not be able to, however you wish to phrase it
absolutely
[16:20]
jastability has nothing to do with it, question is whether it's a good idea to choose $thing in the first place, even if it looks as though it makes some things possible that aren't possible with the current implementation [16:21]
jmk0I'm reasonably confident our use case(s) are off in the weeds
well that's what I was asking, what reasons would you have for not choosing $thing?
other than the obvious: not worth the effort
[16:21]
jastthat depends on what you need
in svn merging is a little iffy
[16:23]
jmk0bear in mind i'm not trying to push for this, but I am interested in people's thoughts on the topic [16:24]
jastand even if you do it only on a per-file basis, that's still not going to be so great if you do have a set of related changes that touch multiple topics [16:24]
jmk0true [16:24]
jastwhat you really want is some kind of structure like in darcs that uses patch theory to figure out how to order patches [16:24]
jmk0but is it any worse than doing it by hand
i'd never heard of darcs, I'll have to read up on it
[16:24]
GithubBot[SafeWikiPlugin] gac410 pushed 2 new commits to master: https://git.io/vyZ3G
SafeWikiPlugin/master 8033e7a George Clark: Item14336: Add Zone and ID information into the hoisted data
SafeWikiPlugin/master 66a5529 George Clark: Item14335: utf8 encode before calculating signatures...
[16:34]
***GithubBot has left [16:34]
FoswikiBothttps://foswiki.org/Tasks/Item14336 [ Item14336: SafeWikiPlugin breaks zone id information ]
https://foswiki.org/Tasks/Item14335 [ Item14335: HMAC calculation fails in SafeWikiPlugin::Signatures::getMAC ]
[16:34]
jastgood catch with the utf8 encode btw [16:40]
gac410I have a bunch of utf8 webs / topics from hell that jomo helped create, so I occasionally visit / edit them just to see what happens. Thanks [16:41]
.................. (idle for 1h28mn)
***ChanServ sets mode: +o Lynnwood [18:09]
......... (idle for 43mn)
ChanServ sets mode: +o Lynnwood__
ChanServ sets mode: +o Lynnwood
[18:52]
....... (idle for 34mn)
ChanServ sets mode: +o Lynnwood__ [19:29]
................ (idle for 1h15mn)
GithubBot[distro] cdot created Item14323 (+12 new commits): https://git.io/vyZp3
distro/Item14323 fbab487 CDot: Item14323: TMCE to version 4.5.3, plus add dev
distro/Item14323 56ffcde CDot: Item14323: TMCE to version 4.5.3, plus add dev
distro/Item14323 20bc621 CDot: Item14323: TMCE to version 4.5.3, plus add dev
[20:44]
***GithubBot has left [20:44]
FoswikiBothttps://foswiki.org/Tasks/Item14323 [ Item14323: Update to latest TinyMCE version ] [20:44]
cdotgac410: branch Item14323 is an upgrade of TMCE to 4.5.3. If you see any problems, shout. Integration is focused on NatEditPlugin, and I dropped all the old JavascriptFiles-specific support from it. [20:48]
gac410Cool. I'l give it a try later. Do you want me to merge to master if it looks good? Or do you want it to go into Release02x01 for a 2.1.4 if we ever release one.
btw I think I got SWP working pretty well. It's a 2.x only extension right now. Debating whether it's worth the effort to make it compat for 1.x
[20:50]
GithubBot[distro] cdot pushed 1 new commit to Item14323: https://git.io/vyZh3
distro/Item14323 9a88996 cdot: Item14323: Switch to non-dev version of TMCE
[20:51]
***GithubBot has left [20:51]
cdotI think it needs more testing on branch first. My testing has exposed more probs with WysiwygPlugin, some of which are fixed in there too.
the whole <div class="foswikiIndent"> thing is .... nasty
[20:51]
gac410okay. Y, I assume also that tmce is now generating html5? [20:52]
cdotno. Still runningin legacy mode. [20:52]
gac410oh okay good. That should make compatibility easier. [20:53]
cdotat least until they remove legacy mode, yes
WysiwygPlugin really needs a css parser :-(
[20:53]
gac410btw I could not get SWP to not emit the closing </base> tag. It always closes it.
So the conditional close based on IE is useless once SWP is enabled.
[20:54]
cdotcdot has a vague memory of that
haven't they fixed IE yet?
[20:54]
gac410I assume so ... They renamed it edge, right? :D [20:55]
cdotof a cliff?
cdot has to eat. cyal8r
[21:01]
gac410strange ... it looks like none of your commits are posted to your task Item14323
cya
github says that the "push" to our rest handler worked, so wtf. problem on our side.
[21:01]
cdot... if you are checking the logs...
it's not working well here :( When I edit a topic, it seems to wrap all the TML together. I edited UpgradeGuide, and everything except the help Div's are all wapped - no whitespace preservation at all.
[21:09]
................. (idle for 1h21mn)
jmk0I'm assuming you can't rename a web to be a subweb "of itself" e.g. change web TopLevel to TopLevel.SubLevel... sounds like a dangerous thing to try, figured I'd ask first :) [22:31]
gac410No definitely not.
I probably wouldn't try it ;)
[22:31]
jmk0so what happens to subwebs if you rename the parent [22:32]
gac410A web is just a directory on disk. So a subweb is a directory in a directory. I expect that if you rename the parent it just goes along for the ride. [22:32]
jmk0could you, for example, rename TopLevel to SomethingElse, create a new TopLevel, then rename SomethingElse to TopLevel.SubLevel and move the previous subwebs of TopLevel back?
ok
[22:32]
gac410I have no idea. Probably not a lot of testing in this area. [22:33]
jmk0does renaming a web fix links like renaming a topic does? [22:33]

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