From ree at ree.hu Wed Dec 5 15:36:56 2007 From: ree at ree.hu (Balazs Ree) Date: Wed, 5 Dec 2007 15:36:56 +0100 Subject: [Kss-devel] kssproject.org server relocation Message-ID: The server that hosts the kssproject.org website will be moved to a different physical location. As a consequence there will be interruption of services planned for the 8th of December (Saturday) between 13:00 and 17:00 UTC. Thanks for your understanding! -- Balazs Ree From apm13 at columbia.edu Thu Dec 6 22:11:55 2007 From: apm13 at columbia.edu (Alec Mitchell) Date: Thu, 6 Dec 2007 13:11:55 -0800 Subject: [Kss-devel] Question about setting status messages in KSS event Message-ID: <365118370712061311gf544a3ct6739d798f574b204@mail.gmail.com> Hi guys, I'm trying to fix an issue with CMFEditions where files that are too large trigger a segfault or recursion error when versioned. I've got a fix in place in CMFEditions, that raises a special error under these circumstances. The ui scripts catch the error and add a status message indicating that versioning could not happen. However, this needs to work for the inline-edit auto-versioning as well. I have something working, but it currently stomps the default portal message when saving the file. Is there an alternative to `plonecommands.issuePortalMessage` that allows multiple messages to coexist, or will I have to use a special message that indicates that the file was updated, but that no versioning was performed. Thanks in advance, Alec From gotcha at bubblenet.be Fri Dec 7 01:27:32 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 07 Dec 2007 01:27:32 +0100 Subject: [Kss-devel] Work on tests merged in trunk Message-ID: <47589374.5000300@bubblenet.be> Hi, The work done at the KSS springs (sprint on evening) has been merged. If you check out Zelenium from the following branch : svn.zope.org/repos/main/Zelenium/branches/gotcha-selenium-0.8.1 install it in Zope and restart, you can add a zuite in the ZMI. Then click its view tab and type ../demo/++resource++suite.html as test suite. You can then run all tests both in dev and prod mode. Enjoy. PS : Balazs, can you check that the error_handling test does what it is supposed to do : iow no handling of the two first buttons of the second row. Thanks -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Fri Dec 7 07:19:54 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 07:19:54 +0100 Subject: [Kss-devel] Work on tests merged in trunk References: <47589374.5000300@bubblenet.be> Message-ID: On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > PS : Balazs, can you check that the error_handling test does what it is > supposed to do : iow no handling of the two first buttons of the second > row. That's ok, the first two buttons are unhandled on purpose. They can be used to test what happens in case of unhandled server side error. This is both interesting in development (logging) and production mode (well, they are invisible in this case, and we will need to figure out something for this). I may add some message to clarify this. -- Balazs Ree From jeroen.vloothuis at xs4all.nl Fri Dec 7 08:41:29 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Fri, 07 Dec 2007 08:41:29 +0100 Subject: [Kss-devel] Question about setting status messages in KSS event In-Reply-To: <365118370712061311gf544a3ct6739d798f574b204@mail.gmail.com> References: <365118370712061311gf544a3ct6739d798f574b204@mail.gmail.com> Message-ID: <4758F929.5010402@xs4all.nl> Alec Mitchell wrote: > Hi guys, > > I'm trying to fix an issue with CMFEditions where files that are too > large trigger a segfault or recursion error when versioned. I've got > a fix in place in CMFEditions, that raises a special error under these > circumstances. The ui scripts catch the error and add a status > message indicating that versioning could not happen. However, this > needs to work for the inline-edit auto-versioning as well. I have > something working, but it currently stomps the default portal message > when saving the file. Is there an alternative to > `plonecommands.issuePortalMessage` that allows multiple messages to > coexist, or will I have to use a special message that indicates that > the file was updated, but that no versioning was performed. > I am not familiar with everything in the Plone commandset but you could use something from core: * *insertHTMLAsFirstChild* *This would mean you would have to generate your own HTML snippet (but you could probably reuse the template for that). From ree at ree.hu Fri Dec 7 08:34:10 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 08:34:10 +0100 Subject: [Kss-devel] Error demo References: <47589374.5000300@bubblenet.be> Message-ID: On Fri, 07 Dec 2007 07:19:54 +0100, Balazs Ree wrote: > On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > >> PS : Balazs, can you check that the error_handling test does what it is >> supposed to do : iow no handling of the two first buttons of the second >> row. > > That's ok, the first two buttons are unhandled on purpose. They can be > used to test what happens in case of unhandled server side error. This > is both interesting in development (logging) and production mode (well, > they are invisible in this case, and we will need to figure out > something for this). > > I may add some message to clarify this. Oops, I am sorry. Wrong info. The correct answer should have been: the first two buttons on the second row are although handled, but they do not cause an error. So this is the full pattern: First row unhandled: no_error no_commands server_exception server_explicit_error Second row handled: no_error no_commands server_exception server_explicit_error The meaning of the columns: 1) no_error means a correct reply with kss commands in it. 2) no_commands means correct reply but empty, contains no commands. Previously we gave a warning for this, now this is perfectly ok (as there are valid use cases for it), however it's a separate use case that needs a separate test. 3) server-exception means there was an exception on the server so no commands arrived. Instead a normal error page arrives and the log should actually write the server side exception as a reason "Client reason:" to the problem. (This is done by a trick: the server error page contains kukit commands with the exception info.) A timeout belongs to this case as well but that is difficult to test this way. First I had tests for timeout too but it was confusing for the users. 4) server-explicit-error: this happens if the server wants to raise an error to the client explicitely. The server needs to raise a KSSExplicitError for this. In this case a valid kukit response is generated that holds the error (in contrary to the server error template of the previous case). The client handles this in the same way as the previous case but gives "Server reason:" log of the message of the KSSExplicitError. -- Balazs Ree From ree at ree.hu Fri Dec 7 10:09:21 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 10:09:21 +0100 Subject: [Kss-devel] Work on tests merged in trunk References: <47589374.5000300@bubblenet.be> Message-ID: On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > The work done at the KSS springs (sprint on evening) has been merged. Thank you all for the great work. Before getting to the real issue, I would like to add one remark. I noticed that you moved the "doc" directory, on both kss.demo and kss.core, from the egg root (next to setup.py) down to the actual import root. I believe this should have been discussed before. As you failed to do so, I will start a discussion thread about this. I propose that this change should be left intact or reverted based on the result of the discussion. Now to the actual topic: > If you check out Zelenium from the following branch : > > svn.zope.org/repos/main/Zelenium/branches/gotcha-selenium-0.8.1 > > install it in Zope and restart, > > you can add a zuite in the ZMI. > > Then click its view tab and > > type ../demo/++resource++suite.html as test suite. > > You can then run all tests both in dev and prod mode. This is AWESOME! And we needed this for so so long. Hurray for everyone who worked on this! As an immadiate next step (unless there are objections) I will change suite.html to actually use the demo registry and iterate on all the registered tests instead of using the static template. -- Balazs Ree From ree at ree.hu Fri Dec 7 10:10:17 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 10:10:17 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? Message-ID: This is the start of discussion which suggest to move the "doc" subdirectory from the egg root (next to setup.py) to the package root (under kss/core or kss/demo). Currently I am against this change. Let me present my reasons. The doc directory was placed intentionally to the egg root. The reason for this was that all the other packages in Plone followed this standard, and also that ZopeSkel generates this standard package structure. Also initially when the docs were not yet here, I was asked by Wichert to comply to this convention, and so I did. I personally do not see any reason for moving the doc down to the package import root, and have not previously heard any discussion about this. So please, in case you are in favour of this change, go ahead and present your pros! Thanks, -- Balazs Ree From gotcha at bubblenet.be Fri Dec 7 10:28:56 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 07 Dec 2007 10:28:56 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: References: Message-ID: <47591258.3040102@bubblenet.be> Balazs Ree wrote: > This is the start of discussion which suggest to move the "doc" > subdirectory from the egg root (next to setup.py) to the package root > (under kss/core or kss/demo). > > Currently I am against this change. Let me present my reasons. > > The doc directory was placed intentionally to the egg root. The reason > for this was that all the other packages in Plone followed this standard, > and also that ZopeSkel generates this standard package structure. Also > initially when the docs were not yet here, I was asked by Wichert to > comply to this convention, and so I did. > > I personally do not see any reason for moving the doc down to the > package import root, and have not previously heard any discussion about > this. So please, in case you are in favour of this change, go ahead and > present your pros! > > Thanks, > The main reason for moving the docs directory is that headers of our files mention a CREDITS.txt and a LICENSE.txt. If we keep the docs directory where it is now, those files are not distributed in the egg. IOW, we do not distribute the files with the code. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From gotcha at bubblenet.be Fri Dec 7 10:31:14 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 07 Dec 2007 10:31:14 +0100 Subject: [Kss-devel] Work on tests merged in trunk In-Reply-To: References: <47589374.5000300@bubblenet.be> Message-ID: <475912E2.2050702@bubblenet.be> Balazs Ree wrote: > On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > >> The work done at the KSS springs (sprint on evening) has been merged. > > > Thank you all for the great work. Before getting to the real issue, I > would like to add one remark. > > I noticed that you moved the "doc" directory, on both kss.demo and > kss.core, from the egg root (next to setup.py) down to the actual import > root. I believe this should have been discussed before. As you failed to > do so, I will start a discussion thread about this. I > propose that this change should be left intact or reverted based on the > result of the discussion. Sorry, I never thought moving the docs directory needed a discussion... -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Fri Dec 7 13:56:42 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 13:56:42 +0100 Subject: [Kss-devel] Work on tests merged in trunk References: <47589374.5000300@bubblenet.be> Message-ID: Follow up: I made two enhancement to make the Zelenium work even greater: - The list of tests are now taken from the registry. i.e. you add a new plugin: its tests are added automatically. - And: I changed the UI to make it work from the demo's main index page! Unbelievable isn't it? (I deleted the static suite.html, so please switch to the new way.) The new instructions to use are: First create a KSSDemo SimpleContent if you don't have one. (There is a current bug, you need to create it inside a Plone portal and cut-and- paste it out to the site root.) Then: On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > If you check out Zelenium from the following branch : > svn://svn.zope.org/repos/main/Zelenium/branches/gotcha-selenium-0.8.1 > > install it in Zope and restart, Add a Zuite in the ZMI in the site root, call it 'zuite'. Then, go to the demo's main page. If your Zuite is "zuite", leave the defaults. Otherwise specify the traversal path to your Zuite, ... click on the button, and .... **** MIRACLE! **** Santa Claus brought you automatic testing of kss, right from your browser! If you were a bad boy or girl, you will get some red lines. (Well in fact you will get them anyway, we still need to fix those.) Thanks again Godefroid and all Thursday night sprinters! -- Balazs Ree From gotcha at bubblenet.be Fri Dec 7 14:06:35 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 07 Dec 2007 14:06:35 +0100 Subject: [Kss-devel] Work on tests merged in trunk In-Reply-To: References: <47589374.5000300@bubblenet.be> Message-ID: <4759455B.50000@bubblenet.be> Balazs Ree wrote: > Follow up: > > I made two enhancement to make the Zelenium work even greater: > > - The list of tests are now taken from the registry. > i.e. you add a new plugin: its tests are added automatically. > > - And: I changed the UI to make it work from the demo's main index page! > > Unbelievable isn't it? > > (I deleted the static suite.html, so please switch to the new way.) > > > The new instructions to use are: > > First create a KSSDemo SimpleContent if you don't have one. (There is a > current bug, you need to create it inside a Plone portal and cut-and- > paste it out to the site root.) Why is this needed ? Did you try Zope with KSS and without Plone ? > > Then: > > On Fri, 07 Dec 2007 01:27:32 +0100, Godefroid Chapelle wrote: > >> If you check out Zelenium from the following branch : >> > svn://svn.zope.org/repos/main/Zelenium/branches/gotcha-selenium-0.8.1 >> install it in Zope and restart, > > Add a Zuite in the ZMI in the site root, call it 'zuite'. > > Then, go to the demo's main page. If your Zuite is "zuite", leave the > defaults. Otherwise specify the traversal path to your Zuite, > > ... click on the button, and .... > > **** MIRACLE! **** > > Santa Claus brought you automatic testing of kss, right from your browser! > If you were a bad boy or girl, you will get some red lines. > > (Well in fact you will get them anyway, we still need to fix those.) > > Thanks again Godefroid and all Thursday night sprinters! > -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Fri Dec 7 14:13:17 2007 From: ree at ree.hu (Balazs Ree) Date: Fri, 7 Dec 2007 14:13:17 +0100 Subject: [Kss-devel] Work on tests merged in trunk References: <47589374.5000300@bubblenet.be> <4759455B.50000@bubblenet.be> Message-ID: On Fri, 07 Dec 2007 14:06:35 +0100, Godefroid Chapelle wrote: > Balazs Ree wrote: >> The new instructions to use are: >> >> First create a KSSDemo SimpleContent if you don't have one. (There is a >> current bug, you need to create it inside a Plone portal and cut-and- >> paste it out to the site root.) > > Why is this needed ? > > Did you try Zope with KSS and without Plone ? Right, the cut-and-paste hack is only needed when the CMF products are installed in Zope. I think we'll be able to fix this issue by using different macro resources, which CMF would not be able to overwrite globally. -- Balazs Ree From jeroen.vloothuis at xs4all.nl Fri Dec 7 22:36:34 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Fri, 07 Dec 2007 22:36:34 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: <47591258.3040102@bubblenet.be> References: <47591258.3040102@bubblenet.be> Message-ID: <4759BCE2.7050506@xs4all.nl> Godefroid Chapelle wrote: > Balazs Ree wrote: > >> The doc directory was placed intentionally to the egg root. The reason >> for this was that all the other packages in Plone followed this standard, >> and also that ZopeSkel generates this standard package structure. Also >> initially when the docs were not yet here, I was asked by Wichert to >> comply to this convention, and so I did. >> >> I personally do not see any reason for moving the doc down to the >> package import root, and have not previously heard any discussion about >> this. So please, in case you are in favour of this change, go ahead and >> present your pros! >> > The main reason for moving the docs directory is that headers of our > files mention a CREDITS.txt and a LICENSE.txt. > I would like to ask a few things about this: 1. do we need these headers at all? 2. can't we have a pointer license.txt or something which points to the original archive with everything in it instead of moving everything over? 3. most packages in the wild seem to have docs at the setup.py level (perhaps you have some good examples to the contrary?). Why is KSS different? From gotcha at bubblenet.be Fri Dec 7 23:22:20 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Fri, 07 Dec 2007 23:22:20 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: <4759BCE2.7050506@xs4all.nl> References: <47591258.3040102@bubblenet.be> <4759BCE2.7050506@xs4all.nl> Message-ID: <4759C79C.80309@bubblenet.be> Jeroen Vloothuis wrote: > Godefroid Chapelle wrote: >> Balazs Ree wrote: >> >>> The doc directory was placed intentionally to the egg root. The >>> reason for this was that all the other packages in Plone followed >>> this standard, and also that ZopeSkel generates this standard package >>> structure. Also initially when the docs were not yet here, I was >>> asked by Wichert to comply to this convention, and so I did. >>> >>> I personally do not see any reason for moving the doc down to the >>> package import root, and have not previously heard any discussion >>> about this. So please, in case you are in favour of this change, go >>> ahead and present your pros! >>> >> The main reason for moving the docs directory is that headers of our >> files mention a CREDITS.txt and a LICENSE.txt. >> > I would like to ask a few things about this: > > 1. do we need these headers at all? I think it makes sense to 1) recognize credit of the authors and 2) to remind people which license comes with the code they receive/use. > 2. can't we have a pointer license.txt or something which points to the > original archive with everything in it instead of moving everything over? What do you mean by the original archive ? > 3. most packages in the wild seem to have docs at the setup.py level > (perhaps you have some good examples to the contrary?). Why is KSS > different? This argument feels weak. Should we move to PHP and JQuery because most CMS in the wild are PHP and JQuery ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From jeroen.vloothuis at xs4all.nl Sat Dec 8 01:16:45 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Sat, 08 Dec 2007 01:16:45 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: <4759C79C.80309@bubblenet.be> References: <47591258.3040102@bubblenet.be> <4759BCE2.7050506@xs4all.nl> <4759C79C.80309@bubblenet.be> Message-ID: <4759E26D.80901@xs4all.nl> Godefroid Chapelle wrote: > Jeroen Vloothuis wrote: >> 1. do we need these headers at all? > I think it makes sense to 1) recognize credit of the authors Sure, but will people look into eggs for this? > 2) to remind people which license comes with the code they receive/use. This reminder is also there in the egg info (provided our setup.py has the right stuff). >> 2. can't we have a pointer license.txt or something which points to >> the original archive with everything in it instead of moving >> everything over? > What do you mean by the original archive ? Ok, lets skip this suggestion. >> 3. most packages in the wild seem to have docs at the setup.py level >> (perhaps you have some good examples to the contrary?). Why is KSS >> different? > This argument feels weak. Should we move to PHP and JQuery because > most CMS in the wild are PHP and JQuery ? Python people expect documentation to be in a certain place. Moving everything just because of supposed recognition and a license file seems strange to me. So far the only reason seems to be about the license and authors files. Why not just move those two instead of the whole docs? From gotcha at bubblenet.be Sat Dec 8 09:20:06 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Sat, 08 Dec 2007 09:20:06 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: <4759E26D.80901@xs4all.nl> References: <47591258.3040102@bubblenet.be> <4759BCE2.7050506@xs4all.nl> <4759C79C.80309@bubblenet.be> <4759E26D.80901@xs4all.nl> Message-ID: <475A53B6.7020906@bubblenet.be> Jeroen Vloothuis wrote: > Python people expect documentation to be in a certain place. I did not know about this. > Moving everything just because of supposed recognition and a license file seems > strange to me. So far the only reason seems to be about the license and > authors files. Why not just move those two instead of the whole docs? Seems good to me. If we all agree, I can make the change. -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From jeroen.vloothuis at xs4all.nl Sat Dec 8 11:03:43 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Sat, 08 Dec 2007 11:03:43 +0100 Subject: [Kss-devel] move doc directory from egg trunk to package root? In-Reply-To: <475A53B6.7020906@bubblenet.be> References: <47591258.3040102@bubblenet.be> <4759BCE2.7050506@xs4all.nl> <4759C79C.80309@bubblenet.be> <4759E26D.80901@xs4all.nl> <475A53B6.7020906@bubblenet.be> Message-ID: <475A6BFF.90207@xs4all.nl> Godefroid Chapelle wrote: > Jeroen Vloothuis wrote: >> Moving everything just because of supposed recognition and a license >> file seems strange to me. So far the only reason seems to be about >> the license and authors files. Why not just move those two instead of >> the whole docs? > Seems good to me. If we all agree, I can make the change. This would be fine with me. From dokter at w20e.com Tue Dec 18 17:46:12 2007 From: dokter at w20e.com (Duco Dokter) Date: Tue, 18 Dec 2007 17:46:12 +0100 Subject: [Kss-devel] Java implementation KSS Message-ID: <200712181746.12218.dokter@w20e.com> Gents, I'll most probably be starting on a Java implementation of KSS shortly. Is there any documenation whatsoever already on non-Plone implementations? Can't find any, really... Cheers, Duco. -- Alas, how love can trifle with itself! -- William Shakespeare, "The Two Gentlemen of Verona" From gotcha at bubblenet.be Tue Dec 18 18:58:09 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Tue, 18 Dec 2007 18:58:09 +0100 Subject: [Kss-devel] Java implementation KSS In-Reply-To: <200712181746.12218.dokter@w20e.com> References: <200712181746.12218.dokter@w20e.com> Message-ID: <47680A31.2030807@bubblenet.be> Duco Dokter wrote: > Gents, > > I'll most probably be starting on a Java implementation of KSS shortly. That would be great !! > Is there any documenation whatsoever already on non-Plone implementations? Can't > find any, really... Well, documentation about what is needed for server-side support is missing. In your HTML pages, you need to * include JS files : sarissa.js base2-dom-fp.js Those are found in http://codespeak.net/svn/kukit/kukit.js/trunk/3rd_party kukit.js It is the concatenation of the set of files found in http://codespeak.net/svn/kukit/kukit.js/trunk/kukit You should be able to produce it by using a tool. (Laurent, can you recall us how to do it ? ) * setup a link for your kinetic stylesheet The server-side actions need to produce xml payload similar to the following : demo > > Cheers, Duco. > For our information, do you use Plone ? How did you find us ? -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From jeroen.vloothuis at xs4all.nl Tue Dec 18 22:26:28 2007 From: jeroen.vloothuis at xs4all.nl (Jeroen Vloothuis) Date: Tue, 18 Dec 2007 22:26:28 +0100 Subject: [Kss-devel] Java implementation KSS In-Reply-To: <47680A31.2030807@bubblenet.be> References: <200712181746.12218.dokter@w20e.com> <47680A31.2030807@bubblenet.be> Message-ID: <47683B04.10209@xs4all.nl> Godefroid Chapelle wrote: > Duco Dokter wrote: > >> I'll most probably be starting on a Java implementation of KSS shortly. >> > > That would be great !! > Good stuff indeed :-) > >> Is there any documenation whatsoever already on non-Plone implementations? Can't >> find any, really... >> > > Well, documentation about what is needed for server-side support is missing. > There is however a pure Python version. This might be easier to use as a reference point since it has less Zope specific stuff. You can find it at: http://codespeak.net/svn/kukit/kss.base/trunk/ > kukit.js > > You should be able to produce it by using a tool. > (Laurent, can you recall us how to do it ? ) > If you install kss.base you will get a kssconcatjs commandline utility. > * setup a link for your kinetic stylesheet > > href="commands.kss" /> > Should this not be; type="text/kss"? > The server-side actions need to produce xml payload similar to the > following : > > > > selectorType=""> > demo > > selectorType=""> > > > I will write up a small text explaining the current protocol since we need this anyway. From dokter at w20e.com Thu Dec 20 11:52:24 2007 From: dokter at w20e.com (Duco Dokter) Date: Thu, 20 Dec 2007 11:52:24 +0100 Subject: [Kss-devel] Server side action URL base Message-ID: <200712201152.24699.dokter@w20e.com> L.S., I'm wondering in what way the server side of a KSS action is called. Assuming you use regular XML-RPC stuff, some URL base would be needed. Doing things the Zope way is easy enough, given acquisition, but this doesn't hold for other implementations, like a Java back-end. Actions need to be specificly addressed through their unique URL, no acquisition there. So one way or the other, you must be able to specify the URL to be called in more detail. Any thoughts on that? D. -- A man was reading The Canterbury Tales one Saturday morning, when his wife asked "What have you got there?" Replied he, "Just my cup and Chaucer." From gotcha at bubblenet.be Thu Dec 20 12:00:00 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 20 Dec 2007 12:00:00 +0100 Subject: [Kss-devel] Server side action URL base In-Reply-To: <200712201152.24699.dokter@w20e.com> References: <200712201152.24699.dokter@w20e.com> Message-ID: <476A4B30.7000705@bubblenet.be> Duco Dokter wrote: > L.S., > > I'm wondering in what way the server side of a KSS action is called. Assuming > you use regular XML-RPC stuff, some URL base would be needed. Doing things > the Zope way is easy enough, given acquisition, but this doesn't hold for > other implementations, like a Java back-end. Actions need to be specificly > addressed through their unique URL, no acquisition there. So one way or the > other, you must be able to specify the URL to be called in more detail. Any > thoughts on that? > > D. > > We had thought about that ;-) Here is what you do for non Zope : div:click { server-action : updateStatus; updateStatus-kssUrl : http://myserver/myservice/myurl; updateStatus=status : done; } The important stuff is that the url called can be specified with kssUrl parameter. HTH -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From ree at ree.hu Thu Dec 20 14:01:31 2007 From: ree at ree.hu (Balazs Ree) Date: Thu, 20 Dec 2007 14:01:31 +0100 Subject: [Kss-devel] Server side action URL base References: <200712201152.24699.dokter@w20e.com> Message-ID: On Thu, 20 Dec 2007 11:52:24 +0100, Duco Dokter wrote: > I'm wondering in what way the server side of a KSS action is called. > Assuming you use regular XML-RPC stuff, some URL base would be needed. > Doing things the Zope way is easy enough, given acquisition, but this > doesn't hold for other implementations, like a Java back-end. Actions > need to be specificly addressed through their unique URL, no acquisition > there. So one way or the other, you must be able to specify the URL to > be called in more detail. Any thoughts on that? In addition to what Godefroid said, read my previous post about the calculation of the page base: http://article.gmane.org/gmane.comp.web.kss.devel/275 again some refactoring is possibly ahead here, so please use the second (base tag in the page) or third (window.location) ways mentioned there - or write us about your needs. -- Balazs Ree From dokter at w20e.com Thu Dec 20 16:10:46 2007 From: dokter at w20e.com (Duco Dokter) Date: Thu, 20 Dec 2007 16:10:46 +0100 Subject: [Kss-devel] and now for something completely different... Message-ID: <200712201610.46184.dokter@w20e.com> over to the Silly Questions. Removing of an attribute doesn't seem to be in the corecommands. Is there a way? -- I have never let my schooling interfere with my education. -- Mark Twain From dokter at w20e.com Thu Dec 20 18:31:23 2007 From: dokter at w20e.com (Duco Dokter) Date: Thu, 20 Dec 2007 18:31:23 +0100 Subject: [Kss-devel] server-action Message-ID: <200712201831.24037.dokter@w20e.com> L.S., I assumed that server actions would work with a base kukit.js, but looks like this is not the case... Would this be the expected behavior? Looks a bit odd to me... D. -- F.S. Fitzgerald to Hemingway: "Ernest, the rich are different from us." Hemingway: "Yes. They have more money." From dokter at w20e.com Thu Dec 20 18:34:03 2007 From: dokter at w20e.com (Duco Dokter) Date: Thu, 20 Dec 2007 18:34:03 +0100 Subject: [Kss-devel] oooops Message-ID: <200712201834.03760.dokter@w20e.com> Forget about that last mail... My f**kup. -- It is a wise father that knows his own child. -- William Shakespeare, "The Merchant of Venice" From gotcha at bubblenet.be Thu Dec 20 19:05:48 2007 From: gotcha at bubblenet.be (Godefroid Chapelle) Date: Thu, 20 Dec 2007 19:05:48 +0100 Subject: [Kss-devel] and now for something completely different... In-Reply-To: <200712201610.46184.dokter@w20e.com> References: <200712201610.46184.dokter@w20e.com> Message-ID: <476AAEFC.90101@bubblenet.be> Duco Dokter wrote: > over to the Silly Questions. Removing of an attribute doesn't seem to be in > the corecommands. Is there a way? > You are right. IIRC, Balazs mentioned some cross compatibility issues. The only way for now is to set an empty attribute or replace the full node with a node without the attribute. Maybe Balazs can confirm... or tell that I am wrong ;-) -- Godefroid Chapelle (aka __gotcha) http://bubblenet.be From dokter at w20e.com Thu Dec 20 20:16:33 2007 From: dokter at w20e.com (Duco Dokter) Date: Thu, 20 Dec 2007 20:16:33 +0100 Subject: [Kss-devel] and now for something completely different... In-Reply-To: <476AAEFC.90101@bubblenet.be> References: <200712201610.46184.dokter@w20e.com> <476AAEFC.90101@bubblenet.be> Message-ID: <200712202016.33638.dokter@w20e.com> Op Thursday 20 December 2007 19:05:48 schreef Godefroid Chapelle: > The only way for now is to set an empty attribute or replace the full > node with a node without the attribute. Empty attribute would normally work, with the sad exception of the disabled attribute for form elements, at least for FireFox... Any workaround? > > Maybe Balazs can confirm... or tell that I am wrong ;-) -- Nothing so needs reforming as other people's habits. -- Mark Twain, "Pudd'nhead Wilson's Calendar" From optilude at gmx.net Mon Dec 24 02:19:48 2007 From: optilude at gmx.net (Martin Aspeli) Date: Mon, 24 Dec 2007 02:19:48 +0100 Subject: [Kss-devel] How is the KSS context determined? In-Reply-To: References: Message-ID: Balazs Ree wrote: > On Sat, 27 Oct 2007 22:39:29 +0100, Martin Aspeli wrote: >> Martin Aspeli wrote: >>> How is the KSS context determined? That is, what is the base URL used >>> when submitting a server-side request? >> *bump* - I'm happy to debug what goes on inside the namespace traversal >> adapters, but I need to know where to start looking. How does KSS know >> which base URL to submit to for an action-server? > > The base url is decided in the file kukit.js, in the function > kukit.Engine.prototype.calculateBase . It is pretty complicated, and I > actually have no remembering of neither a description of the supported > use cases nor a written discussion about it. I finally had time to look at this again (I need to fix it for PLIP 202, which adds KSS inline validation/editing for formlib forms - see https://svn.plone.org/svn/plone/plone.app.form/branches/plip202-formlib-kss and https://svn.plone.org/svn/plone/review/optilude-plip202). > As I read from the code it tries to fetch the base in the following order: > > 1. if there is a link with rel="kss-base-url", it is using the href of > that as base. This allows a manual override from the template. I cannot > tell you why/when this is needed or used, since point 2. is meant to do > exactly the same. > > 2. if there is a "base" tag in the html, it is using its href. In > addition it strips the trailing "/" from it, if there is one. This is > what happens normally, I believe also in your case. > > 3. If this is not present it uses window.location from javascript. > > I hope this helps something, please contact me when you want about this > issue, I'd try to look at it deeper as well. We may need to improve this > algorithm to cover the case you are using. That's actually relatively straightforward. The problem is that the tag in Plone is rendered with a call to context/absolute_url, and in the case of namespace traversal magic, absolute_url doesn't appear to be reliable. I'm going to look into fixing that (either in renderBase.py in Plone or in the portlets and content rules implementations, where I'm seeing this). If I can't, adding a tag as in (1) above should be pretty easy too. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book From ree at ree.hu Mon Dec 24 08:37:19 2007 From: ree at ree.hu (Balazs Ree) Date: Mon, 24 Dec 2007 08:37:19 +0100 Subject: [Kss-devel] How is the KSS context determined? References: Message-ID: Hi Martin, On Mon, 24 Dec 2007 02:19:48 +0100, Martin Aspeli wrote: > Balazs Ree wrote: >> I hope this helps something, please contact me when you want about this >> issue, I'd try to look at it deeper as well. We may need to improve >> this algorithm to cover the case you are using. > > That's actually relatively straightforward. The problem is that the > tag in Plone is rendered with a call to context/absolute_url, > and in the case of namespace traversal magic, absolute_url doesn't > appear to be reliable. > > I'm going to look into fixing that (either in renderBase.py in Plone or > in the portlets and content rules implementations, where I'm seeing > this). If I can't, adding a tag as in (1) above should be > pretty easy too. Imo, fixing absolute_url is the solution. If that works, the kss part will work well. But if absolute_url is not working, you would have the same problem with . -- Balazs Ree From optilude at gmx.net Mon Dec 24 11:27:10 2007 From: optilude at gmx.net (Martin Aspeli) Date: Mon, 24 Dec 2007 11:27:10 +0100 Subject: [Kss-devel] How is the KSS context determined? In-Reply-To: References: Message-ID: Balazs Ree wrote: > Hi Martin, > > On Mon, 24 Dec 2007 02:19:48 +0100, Martin Aspeli wrote: > >> Balazs Ree wrote: >>> I hope this helps something, please contact me when you want about this >>> issue, I'd try to look at it deeper as well. We may need to improve >>> this algorithm to cover the case you are using. >> That's actually relatively straightforward. The problem is that the >> tag in Plone is rendered with a call to context/absolute_url, >> and in the case of namespace traversal magic, absolute_url doesn't >> appear to be reliable. >> >> I'm going to look into fixing that (either in renderBase.py in Plone or >> in the portlets and content rules implementations, where I'm seeing >> this). If I can't, adding a tag as in (1) above should be >> pretty easy too. > > Imo, fixing absolute_url is the solution. If that works, the kss part > will work well. But if absolute_url is not working, you would have the > same problem with . That obviously depends on how the is constructed, but there are other reasons to fix absolute_url() as well. I'm not 100% sure it's possible, though, but I'll try. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book