From tseaver at zope.com Mon Aug 2 10:26:04 2004 From: tseaver at zope.com (Tres Seaver) Date: Mon Aug 2 10:27:40 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! Message-ID: I'd like to release the beta by Friday, 6 August. I would actually prefer not to see any more features land before the beta. If you think there is an important feature, already set to go but not in yet, let me know. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From apm13 at columbia.edu Mon Aug 2 12:09:18 2004 From: apm13 at columbia.edu (Alec Mitchell) Date: Mon Aug 2 12:09:26 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: <200408020909.18206.apm13@columbia.edu> On Monday 02 August 2004 07:26 am, Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. > > I would actually prefer not to see any more features land before the > beta. If you think there is an important feature, already set to go but > not in yet, let me know. One thing that I would like to see is the inclusion Sylvain Thenault's CMFCalendar enhancement here: http://zope.org/Collectors/CMF/110 I think the ability to change the week start date TTW, and allow for the use of workflow states other than published would be fantastic additions to the new version. If there is any interest, I will gladly update the patch to make sure it applies cleanly to current CVS, and attempt to fix whatever issues people may find with it (I've been using it with 1.4.x without any issues for a few months). Alec Mitchell From y.2004_ at wcm-solutions.de Mon Aug 2 12:21:52 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Mon Aug 2 12:24:00 2004 Subject: [Zope-CMF] [dev] Actions: lazy dict not working with DTML? Message-ID: <410E6A20.6070005@wcm-solutions.de> Hi! Since last week listFilteredActionsFor() returns ActionInfo objects instead of dictionaries. I tried to implement ActionInfo as a lazy dict to defer expensive processing of TALES expressions. This seems to work with the ZPT skin, but not with the old DTML skin.
Looks like this code bypasses __getitem__, but I don't understand how this works because I'm not a C programmer and can't read the TemplateDict code. I have no idea how to get a lazy dict working with DTML, so I would fix this by triggering the processing of 'url' expressions within listFilteredActionsFor(). This fixes listFilteredActionsFor() backwards compatibility, but the new Action provider methods listActionInfos() and getActionInfo() would still cause trouble if used with DTML. Any pointers or suggestions are welcome. TIA, Yuppie From jens at dataflake.org Mon Aug 2 17:43:12 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Mon Aug 2 17:43:30 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: On Aug 2, 2004, at 16:26, Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. I'm assuming that's when HEAD becomes the 1.5 branch, correct? jens From jens at dataflake.org Mon Aug 2 17:44:35 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Mon Aug 2 17:44:47 2004 Subject: [Zope-CMF] Quick vote: spurious format differences Document/NewsItem Message-ID: <259B2340-E4CD-11D8-A96A-000D9368D272@dataflake.org> http://zope.org/Collectors/CMF/138 Is there any reason for NewsItems to default to HMTL format whereas documents default to text? If not I'll change it so NewsItems default to text as well. jens From jens at dataflake.org Mon Aug 2 17:50:35 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Mon Aug 2 17:50:50 2004 Subject: [Zope-CMF] running the CMF unit tests Message-ID: In the Zope 2.7 world, what's the recommended way to run the CMF unit tests? jens From pw_lists at slinkp.com Tue Aug 3 00:21:46 2004 From: pw_lists at slinkp.com (Paul Winkler) Date: Tue Aug 3 00:22:00 2004 Subject: [Zope-CMF] running the CMF unit tests In-Reply-To: References: Message-ID: <20040803042146.GB1675@slinkp.com> On Mon, Aug 02, 2004 at 11:50:35PM +0200, Jens Vagelpohl wrote: > In the Zope 2.7 world, what's the recommended way to run the CMF unit > tests? This works for me: ./bin/zopectl run Products/CMFDefault/tests/test_all.py -- Paul Winkler http://www.slinkp.com From jens at dataflake.org Tue Aug 3 03:40:47 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Tue Aug 3 03:41:07 2004 Subject: [Zope-CMF] running the CMF unit tests In-Reply-To: <20040803042146.GB1675@slinkp.com> References: <20040803042146.GB1675@slinkp.com> Message-ID: <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> On Aug 3, 2004, at 6:21, Paul Winkler wrote: > On Mon, Aug 02, 2004 at 11:50:35PM +0200, Jens Vagelpohl wrote: >> In the Zope 2.7 world, what's the recommended way to run the CMF unit >> tests? > > This works for me: > ./bin/zopectl run Products/CMFDefault/tests/test_all.py Found a problem, can anyone confirm this? Running the CMFCore unit test I have several errors when the test runs and then the test hangs completely. I get "E" on... test_ActionInformation.ActionInformationTests - test_Condition - test_basic_construction - test_construction_with_Expressions - test_editing test_Expression.ExpressionTests - test_anonymous_ec - test_authenticatedUser_ec ... and then we hang on the next one, test_ec_context. Here's my setup: - Mac OS X - Python 2.3.4 - Zope 2.7.2 - current CMF HEAD - bone-stock fresh instance with no other products installed jens From contact_tonico at yahoo.de Tue Aug 3 08:04:11 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Tue Aug 3 06:02:36 2004 Subject: [Zope-CMF] Re: Quick vote: spurious format differences Document/NewsItem In-Reply-To: <259B2340-E4CD-11D8-A96A-000D9368D272@dataflake.org> References: <259B2340-E4CD-11D8-A96A-000D9368D272@dataflake.org> Message-ID: <410F7F3B.6010608@yahoo.de> Jens Vagelpohl wrote: > http://zope.org/Collectors/CMF/138 > > Is there any reason for NewsItems to default to HMTL format whereas > documents default to text? If not I'll change it so NewsItems default to > text as well. +1 For the sake of consistency. Tonico From seb at jamkit.com Tue Aug 3 07:17:51 2004 From: seb at jamkit.com (Seb Bacon) Date: Tue Aug 3 07:18:03 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: <410F745F.9070505@jamkit.com> I have a useful patch to the SkinsTool's FindSupport: it marks the object that would be returned in a specified skin in its results. It's an inobtrusive change which is pretty useful; perhaps I should check it in? Seb Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. > > I would actually prefer not to see any more features land before the > beta. If you think there is an important feature, already set to go but > not in yet, let me know. > > Tres. -- [] j a m k i t web solutions for charities seb bacon T: 020 7549 0520 F: 020 7490 1152 M: 07968 301 336 W: www.jamkit.com From tseaver at zope.com Tue Aug 3 07:50:59 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 07:51:35 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <410F745F.9070505@jamkit.com> References: <410F745F.9070505@jamkit.com> Message-ID: <410F7C23.6070407@zope.com> Seb Bacon wrote: > I have a useful patch to the SkinsTool's FindSupport: it marks the > object that would be returned in a specified skin in its results. > > It's an inobtrusive change which is pretty useful; perhaps I should > check it in? Sounds good! Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Tue Aug 3 07:55:14 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 07:55:22 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: <410F7D22.4030603@zope.com> Jens Vagelpohl wrote: > > On Aug 2, 2004, at 16:26, Tres Seaver wrote: > >> I'd like to release the beta by Friday, 6 August. > > > I'm assuming that's when HEAD becomes the 1.5 branch, correct? Yes, that is correct. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Tue Aug 3 07:55:35 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 08:01:32 2004 Subject: [Zope-CMF] Re: Quick vote: spurious format differences Document/NewsItem In-Reply-To: <259B2340-E4CD-11D8-A96A-000D9368D272@dataflake.org> References: <259B2340-E4CD-11D8-A96A-000D9368D272@dataflake.org> Message-ID: <410F7D37.6080301@zope.com> Jens Vagelpohl wrote: > http://zope.org/Collectors/CMF/138 > > Is there any reason for NewsItems to default to HMTL format whereas > documents default to text? If not I'll change it so NewsItems default to > text as well. +1. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From y.2004_ at wcm-solutions.de Tue Aug 3 08:08:36 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Tue Aug 3 08:09:34 2004 Subject: [Zope-CMF] Re: running the CMF unit tests In-Reply-To: <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> References: <20040803042146.GB1675@slinkp.com> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> Message-ID: <410F8044.7070300@wcm-solutions.de> Hi! Jens Vagelpohl wrote: > On Aug 3, 2004, at 6:21, Paul Winkler wrote: >> This works for me: >> ./bin/zopectl run Products/CMFDefault/tests/test_all.py > > > Found a problem, can anyone confirm this? Running the CMFCore unit test > I have several errors when the test runs and then the test hangs > completely. I get "E" on... > > test_ActionInformation.ActionInformationTests > - test_Condition > - test_basic_construction > - test_construction_with_Expressions > - test_editing > > test_Expression.ExpressionTests > - test_anonymous_ec > - test_authenticatedUser_ec > > ... and then we hang on the next one, test_ec_context. Here's my setup: > > - Mac OS X > - Python 2.3.4 > - Zope 2.7.2 > - current CMF HEAD > - bone-stock fresh instance with no other products installed Can't confirm this using - Linux - Python 2.3.4 - current Zope 2.7 branch - current CMF HEAD - bone-stock fresh instance with no other products installed $ bin/zopectl run Products/CMFDefault/tests/test_all.py OK Other ways to run tests: $ bin/zopectl run Products/all_cmf_tests.py Doesn't work because CMFUid has no test_all.py. OK without CMFUid. $ bin/zopectl run bin/test.py --libdir Products -v Doesn't work with CMFUid. Some CMFSetup tests fail. Cheers, Yuppie From zope at syntetisk.dk Tue Aug 3 08:15:35 2004 From: zope at syntetisk.dk (Sune Brondum Woller) Date: Tue Aug 3 08:15:41 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <410F745F.9070505@jamkit.com> Message-ID: This would be very nice! Can you post the patch ? Thanks, Sune Woeller > -----Original Message----- > From: zope-cmf-bounces@lists.zope.org > [mailto:zope-cmf-bounces@lists.zope.org]On Behalf Of Seb Bacon > Sent: 3. august 2004 13:18 > To: Tres Seaver > Cc: zope-cmf@zope.org > Subject: Re: [Zope-CMF] CMF 1.5 beta coming -- last call before feature > freeze! > > > I have a useful patch to the SkinsTool's FindSupport: it marks the > object that would be returned in a specified skin in its results. > > It's an inobtrusive change which is pretty useful; perhaps I should > check it in? > > Seb > > Tres Seaver wrote: > > I'd like to release the beta by Friday, 6 August. > > > > I would actually prefer not to see any more features land before the > > beta. If you think there is an important feature, already set > to go but > > not in yet, let me know. > > > > Tres. > > > -- > > [] j a m k i t > web solutions for charities > > seb bacon > T: 020 7549 0520 > F: 020 7490 1152 > M: 07968 301 336 > W: www.jamkit.com > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > From tseaver at zope.com Tue Aug 3 10:49:05 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 10:50:43 2004 Subject: [Zope-CMF] Re: CVS: Products/CMFDefault/skins/zpt_content - content_status_history.pt:1.4 transition_form.pt:1.3 In-Reply-To: <20040803124922.2E17520308C@mail.zope.org> References: <20040803124922.2E17520308C@mail.zope.org> Message-ID: <410FA5E1.7070700@zope.com> Yvo Schubbe wrote: > Update of /cvs-repository/Products/CMFDefault/skins/zpt_content > In directory cvs.zope.org:/tmp/cvs-serv27889/CMFDefault/skins/zpt_content > > Modified Files: > content_status_history.pt transition_form.pt > Log Message: > - replaced reverseList by [::-1] and marked reverseList as deprecated Oooh! That is a brilliant hack! I love it. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From pw_lists at slinkp.com Tue Aug 3 11:42:46 2004 From: pw_lists at slinkp.com (Paul Winkler) Date: Tue Aug 3 11:42:57 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <410F745F.9070505@jamkit.com> References: <410F745F.9070505@jamkit.com> Message-ID: <20040803154246.GA24327@slinkp.com> On Tue, Aug 03, 2004 at 12:17:51PM +0100, Seb Bacon wrote: > I have a useful patch to the SkinsTool's FindSupport: it marks the > object that would be returned in a specified skin in its results. +1. I have about 200 skins currently :-) btw, I have an old recipe on zopelabs.com for a python script that will tell you this too. But a nice ui in the Find tab would be better. -- Paul Winkler http://www.slinkp.com From pw_lists at slinkp.com Tue Aug 3 11:51:55 2004 From: pw_lists at slinkp.com (Paul Winkler) Date: Tue Aug 3 11:52:02 2004 Subject: [Zope-CMF] Re: CVS: Products/CMFDefault/skins/zpt_content - content_status_history.pt:1.4 transition_form.pt:1.3 In-Reply-To: <410FA5E1.7070700@zope.com> References: <20040803124922.2E17520308C@mail.zope.org> <410FA5E1.7070700@zope.com> Message-ID: <20040803155155.GB24327@slinkp.com> On Tue, Aug 03, 2004 at 10:49:05AM -0400, Tres Seaver wrote: > Yvo Schubbe wrote: > >Update of /cvs-repository/Products/CMFDefault/skins/zpt_content > >In directory cvs.zope.org:/tmp/cvs-serv27889/CMFDefault/skins/zpt_content > > > >Modified Files: > > content_status_history.pt transition_form.pt > >Log Message: > >- replaced reverseList by [::-1] and marked reverseList as deprecated > > Oooh! That is a brilliant hack! I love it. It's a neat trick, but OTOH, it's kinda obscure, at least to CMF users who are less well versed in python. It strikes me as a bit (dare I say it) perlish. -- Paul Winkler http://www.slinkp.com From tseaver at zope.com Tue Aug 3 12:50:29 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 12:52:03 2004 Subject: [Zope-CMF] Re: CVS: Products/CMFDefault/skins/zpt_content - content_status_history.pt:1.4 transition_form.pt:1.3 In-Reply-To: <20040803155155.GB24327@slinkp.com> References: <20040803124922.2E17520308C@mail.zope.org> <410FA5E1.7070700@zope.com> <20040803155155.GB24327@slinkp.com> Message-ID: <410FC255.5040606@zope.com> Paul Winkler wrote: > On Tue, Aug 03, 2004 at 10:49:05AM -0400, Tres Seaver wrote: > >>Yvo Schubbe wrote: >> >>>Update of /cvs-repository/Products/CMFDefault/skins/zpt_content >>>In directory cvs.zope.org:/tmp/cvs-serv27889/CMFDefault/skins/zpt_content >>> >>>Modified Files: >>> content_status_history.pt transition_form.pt >>>Log Message: >>>- replaced reverseList by [::-1] and marked reverseList as deprecated >> >>Oooh! That is a brilliant hack! I love it. > > > It's a neat trick, but OTOH, it's kinda obscure, at least to > CMF users who are less well versed in python. It strikes me as a bit > (dare I say it) perlish. Given that it allows me to get the list reversed in an expression, without the need for a do-nothing-else PythonScript, I'd still call it a win. Vive l'idiom! Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From sim at noisygecko.com Tue Aug 3 13:10:49 2004 From: sim at noisygecko.com (Sim Harbert) Date: Tue Aug 3 13:21:30 2004 Subject: [Zope-CMF] Re: Photo Album which keeps images outside ZODB? In-Reply-To: <1450186562.1054303771@[172.16.8.4]> References: <1047791968.20030530140000@gmx.de> <1450186562.1054303771@[172.16.8.4]> Message-ID: I just tried FSPhoto, which is a product to store the image data on the files system. So far it works fine, and it even allows uploading a zip file containing the photos. http://plone.org/newsitems/news_item.2004-07-28.1667018453 -Sim Stefan H. Holek wrote: > AFAIK the Photo product can use ExtFile/ExtImage to store image data on > the filesystem. > > Stefan > > > --On Freitag, 30. Mai 2003 14:00 +0200 Rainer Thaden wrote: > >> Hi, >> >> i found several products which realize a photo album inside Zope, but >> none of them allows to specify a folder in the file system so that the >> images are not uploaded into the ZODB. >> Does such a product exist? >> >> Or are there any clues, how to do that? >> >> -- >> Regards, >> Rainer mailto:thadi@gmx.de >> From petri.savolainen at iki.fi Tue Aug 3 14:54:57 2004 From: petri.savolainen at iki.fi (Petri Savolainen) Date: Tue Aug 3 14:53:22 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! References: <200408020909.18206.apm13@columbia.edu> Message-ID: On Mon, 02 Aug 2004 09:09:18 -0700, Alec Mitchell wrote: > One thing that I would like to see is the inclusion Sylvain Thenault's > CMFCalendar enhancement here: > > http://zope.org/Collectors/CMF/110 > > I think the ability to change the week start date TTW, and allow for the use > of workflow states other than published would be fantastic additions to the > new version. If there is any interest, I will gladly update the patch to > make sure it applies cleanly to current CVS, and attempt to fix whatever > issues people may find with it (I've been using it with 1.4.x without any > issues for a few months). +1 to that - please at least include the tool fixes. I think these would indeed be very nice additions that would extend the applicability of stock CMF a lot further what it comes to calendaring. BTW, I have built a simple iCal parser with pyparsing and would like to use it to synchronize Mozilla Calendar with CMFCalendar Events. I'd greatly appreciate any suggestions as to where iCal parsing support should live - in the tool, or for example some kind of separate, user-addable calendar synchronizer endpoint object? Thanks, Petri From jmo at ita.chalmers.se Tue Aug 3 14:55:04 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Tue Aug 3 15:05:17 2004 Subject: [Zope-CMF] Re: CVS: Products/CMFDefault/skins/zpt_content - content_status_history.pt:1.4 transition_form.pt:1.3 In-Reply-To: <410FC255.5040606@zope.com> References: <20040803124922.2E17520308C@mail.zope.org> <410FA5E1.7070700@zope.com> <20040803155155.GB24327@slinkp.com> <410FC255.5040606@zope.com> Message-ID: <410FDF88.90103@ita.chalmers.se> Tres Seaver wrote: > Paul Winkler wrote: > >> On Tue, Aug 03, 2004 at 10:49:05AM -0400, Tres Seaver wrote: >> >>> Yvo Schubbe wrote: >>> >>>> Update of /cvs-repository/Products/CMFDefault/skins/zpt_content >>>> In directory >>>> cvs.zope.org:/tmp/cvs-serv27889/CMFDefault/skins/zpt_content >>>> >>>> Modified Files: >>>> content_status_history.pt transition_form.pt Log Message: >>>> - replaced reverseList by [::-1] and marked reverseList as deprecated >>> >>> >>> Oooh! That is a brilliant hack! I love it. >> >> >> >> It's a neat trick, but OTOH, it's kinda obscure, at least to CMF >> users who are less well versed in python. It strikes me as a bit >> (dare I say it) perlish. > > > Given that it allows me to get the list reversed in an expression, > without the need for a do-nothing-else PythonScript, I'd still call it > a win. Vive l'idiom! > > Tres. how big is the list? list.reverse() is almost almost twice as fast as [::-1] and seems to be better optimized in terms of RAM usage, but of course if there are only 3 items in the list, you are right. and [::-1] doesn't work with python2.1, but that's OK I suppose? cheers /JM From dieter at handshake.de Tue Aug 3 15:08:20 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Aug 3 15:13:36 2004 Subject: [Zope-CMF] [dev] Actions: lazy dict not working with DTML? In-Reply-To: <410E6A20.6070005@wcm-solutions.de> References: <410E6A20.6070005@wcm-solutions.de> Message-ID: <16655.58020.872545.728912@gargle.gargle.HOWL> yuppie wrote at 2004-8-2 18:21 +0200: >Since last week listFilteredActionsFor() returns ActionInfo objects >instead of dictionaries. I tried to implement ActionInfo as a lazy dict >to defer expensive processing of TALES expressions. What is a lazy dict? >This seems to work with the ZPT skin, but not with the old DTML skin. > > >
>
> >Looks like this code bypasses __getitem__, but I don't understand how >this works because I'm not a C programmer and can't read the >TemplateDict code. This is unlikely. With the "mapping" keyword, the object itself is pushed onto the "TemplateDict" (it is a stack of namespaces); without it, it is wrapped before pushing into a "ClientDict" (I think) which maps "__getitem__" to "__getattr__". The "TemplateDict"s "getitem" asks each namespace on its stack for the name using its "__getitem__" until it succeeds or reaches the end of the stack. When you send me a code fragment showing how your "lazy dict" looks and works in principle, I can try to analyse the problem. -- Dieter From gregweb at gmx.ch Tue Aug 3 16:23:09 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Tue Aug 3 16:13:20 2004 Subject: [Zope-CMF] Re: running the CMF unit tests In-Reply-To: <410F8044.7070300@wcm-solutions.de> References: <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <20040803042146.GB1675@slinkp.com> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> Message-ID: <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> At 14:08 03.08.2004 +0200, yuppie wrote: >Hi! > > >Jens Vagelpohl wrote: >>On Aug 3, 2004, at 6:21, Paul Winkler wrote: >>>This works for me: >>>./bin/zopectl run Products/CMFDefault/tests/test_all.py >> >>Found a problem, can anyone confirm this? Running the CMFCore unit test I have several errors when the test runs and then the test hangs completely. I get "E" on... >>test_ActionInformation.ActionInformationTests >> - test_Condition >> - test_basic_construction >> - test_construction_with_Expressions >> - test_editing >>test_Expression.ExpressionTests >> - test_anonymous_ec >> - test_authenticatedUser_ec >>... and then we hang on the next one, test_ec_context. Here's my setup: >>- Mac OS X >>- Python 2.3.4 >>- Zope 2.7.2 >>- current CMF HEAD >>- bone-stock fresh instance with no other products installed Can't confirm this on Win2k by starting unittests manually: Python 2.3.3 Zope 2.7.1 current CMF HEAD >Other ways to run tests: > >$ bin/zopectl run Products/all_cmf_tests.py >Doesn't work because CMFUid has no test_all.py. OK without CMFUid. > >$ bin/zopectl run bin/test.py --libdir Products -v >Doesn't work with CMFUid. Some CMFSetup tests fail. Sorry for the inconvenience! Really! I wasn't able to test the test_all.py in CMFUid under Win2k :-(. (I made a zopectl.bat which is a modified copy of runzope.bat) E:\user\greg\data\Zope\inst\cmf_dev>"D:\Program Files\zope\zope27\bin\python.exe" "D:\Program Files\zope\zope2 7\lib\python\Zope\Startup\zopectl.py" -C "E:\user\greg\data\Zope\inst\cmf_dev\etc\zope.conf" run Products/all_ cmf_tests.py Traceback (most recent call last): File "D:\Program Files\zope\zope27\lib\python\Zope\Startup\zopectl.py", line 240, in ? signal.signal(signal.SIGCHLD, signal.SIG_IGN) AttributeError: 'module' object has no attribute 'SIGCHLD' Does somebody know what's happening? yuppie, can you test on linux? Gregoire Gregoire From tseaver at zope.com Tue Aug 3 16:33:06 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 3 16:34:44 2004 Subject: [Zope-CMF] Re: CVS: Products/CMFDefault/skins/zpt_content - content_status_history.pt:1.4 transition_form.pt:1.3 In-Reply-To: <410FDF88.90103@ita.chalmers.se> References: <20040803124922.2E17520308C@mail.zope.org> <410FA5E1.7070700@zope.com> <20040803155155.GB24327@slinkp.com> <410FC255.5040606@zope.com> <410FDF88.90103@ita.chalmers.se> Message-ID: <410FF682.4000101@zope.com> Jean-Marc Orliaguet wrote: > Tres Seaver wrote: > >> Paul Winkler wrote: >> >>> On Tue, Aug 03, 2004 at 10:49:05AM -0400, Tres Seaver wrote: >>> >>>> Yvo Schubbe wrote: >>>> >>>>> Update of /cvs-repository/Products/CMFDefault/skins/zpt_content >>>>> In directory >>>>> cvs.zope.org:/tmp/cvs-serv27889/CMFDefault/skins/zpt_content >>>>> >>>>> Modified Files: >>>>> content_status_history.pt transition_form.pt Log Message: >>>>> - replaced reverseList by [::-1] and marked reverseList as deprecated >>>> >>>> >>>> >>>> Oooh! That is a brilliant hack! I love it. >>> >>> >>> >>> >>> It's a neat trick, but OTOH, it's kinda obscure, at least to CMF >>> users who are less well versed in python. It strikes me as a bit >>> (dare I say it) perlish. >> >> >> >> Given that it allows me to get the list reversed in an expression, >> without the need for a do-nothing-else PythonScript, I'd still call it >> a win. Vive l'idiom! >> >> Tres. > > > > how big is the list? > list.reverse() is almost almost twice as fast as [::-1] and seems to be > better optimized in terms of RAM usage, but of course if there are only > 3 items in the list, you are right. > > and [::-1] doesn't work with python2.1, but that's OK I suppose? The downside of 'reverse' is that it, like 'sort', is destructive, and (therefore) doesn't return the morphed thing. 'itertools.reverse' (only in 2.4) will be the Right Thing (TM) someday. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From y.2004_ at wcm-solutions.de Wed Aug 4 03:25:39 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Wed Aug 4 03:26:45 2004 Subject: [Zope-CMF] Re: running the CMF unit tests In-Reply-To: <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> References: <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <20040803042146.GB1675@slinkp.com> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <410F8044.7070300@wcm-solutions.de> <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> Message-ID: <41108F73.2050305@wcm-solutions.de> Hi! Gregoire Weber wrote: > At 14:08 03.08.2004 +0200, yuppie wrote: >>Other ways to run tests: >> >>$ bin/zopectl run Products/all_cmf_tests.py >>Doesn't work because CMFUid has no test_all.py. OK without CMFUid. Works now. All tests pass on linux. >>$ bin/zopectl run bin/test.py --libdir Products -v >>Doesn't work with CMFUid. Some CMFSetup tests fail. After checking in a small fix for __init__.py this also works. There are still 10 CMFSetup tests failing. > Sorry for the inconvenience! Really! No problem. > I wasn't able to test the test_all.py in CMFUid under Win2k :-(. > (I made a zopectl.bat which is a modified copy of runzope.bat) > > E:\user\greg\data\Zope\inst\cmf_dev>"D:\Program Files\zope\zope27\bin\python.exe" "D:\Program Files\zope\zope2 > 7\lib\python\Zope\Startup\zopectl.py" -C "E:\user\greg\data\Zope\inst\cmf_dev\etc\zope.conf" run Products/all_ > cmf_tests.py > Traceback (most recent call last): > File "D:\Program Files\zope\zope27\lib\python\Zope\Startup\zopectl.py", line 240, in ? > signal.signal(signal.SIGCHLD, signal.SIG_IGN) > AttributeError: 'module' object has no attribute 'SIGCHLD' > > Does somebody know what's happening? Never tried to run zopectl on Windows. There might be better ways to run unittests on Windows, but this script works for me: @Set ZOPE_HOME=C:\Programme\Zope272 @Set PYTHON=%ZOPE_HOME%\bin\python.exe @Set PYTHONPATH=%ZOPE_HOME%\lib\python "%PYTHON%" "all_cmf_tests.py" Pause Note that I test with INSTANCE_HOME and ZOPE_HOME in the same place! Cheers, Yuppie From y.2004_ at wcm-solutions.de Wed Aug 4 05:21:12 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Wed Aug 4 05:23:36 2004 Subject: [Zope-CMF] Re: [dev] Actions: lazy dict not working with DTML? In-Reply-To: <16655.58020.872545.728912@gargle.gargle.HOWL> References: <410E6A20.6070005@wcm-solutions.de> <16655.58020.872545.728912@gargle.gargle.HOWL> Message-ID: <4110AA88.2010900@wcm-solutions.de> Hi! Dieter Maurer wrote: > yuppie wrote at 2004-8-2 18:21 +0200: > >>Since last week listFilteredActionsFor() returns ActionInfo objects >>instead of dictionaries. I tried to implement ActionInfo as a lazy dict >>to defer expensive processing of TALES expressions. > > What is a lazy dict? Maybe there is a better term for this. I use 'lazy' in analogy to how it is used in ZCatalog/Lazy.py or ZPublisher/HTTPRequest.py. I mean a dict that computes (some of) its values on demand, avoiding the need to compute them on creation time. The ActionInfo class is checked in here: Basically this is a dict with a customized __getitem__ method. >>This seems to work with the ZPT skin, but not with the old DTML skin. >> >> >>
>>
>> >>Looks like this code bypasses __getitem__, but I don't understand how >>this works because I'm not a C programmer and can't read the >>TemplateDict code. > > > This is unlikely. > > With the "mapping" keyword, the object itself is pushed > onto the "TemplateDict" (it is a stack of namespaces); > without it, it is wrapped before pushing into a "ClientDict" (I think) > which maps "__getitem__" to "__getattr__". > > The "TemplateDict"s "getitem" asks each namespace on its stack > for the name using its "__getitem__" until it succeeds or reaches > the end of the stack. > > When you send me a code fragment showing how your > "lazy dict" looks and works in principle, I can try to > analyse the problem. Great. I attached an unittest that shows the problem. While pDocumentTemplate seems to implement TemplateDict based on a MultiMapping, MultiMapping works as expected. So cDocumentTemplate seems to do something different. If this is not easy to resolve, I'll check in my workaround for listFilteredActionsFor. I guess we can live with that. Thanks, Yuppie -------------- next part -------------- from unittest import TestCase, TestSuite, makeSuite, main import Testing import Zope Zope.startup() from DocumentTemplate.DT_Util import TemplateDict from MultiMapping import MultiMapping class LazyDict(dict): def __getitem__(self, key): return 'bar' class LazyDictTests(TestCase): def test_LazyDict(self): ld = LazyDict(foo='foo') self.assertEqual(ld['foo'], 'bar') def test_inMultiMapping(self): ld = LazyDict(foo='foo') mm = MultiMapping() mm.push(ld) self.assertEqual(mm['foo'], 'bar') def test_inTemplateDict(self): ld = LazyDict(foo='foo') td = TemplateDict() td._push(ld) self.assertEqual(td['foo'], 'bar') def test_suite(): return TestSuite(( makeSuite(LazyDictTests), )) if __name__ == '__main__': main(defaultTest='test_suite') From gregweb at gmx.ch Wed Aug 4 07:18:05 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Wed Aug 4 07:08:18 2004 Subject: [Zope-CMF] Re: running the CMF unit tests In-Reply-To: <41108F73.2050305@wcm-solutions.de> References: <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <20040803042146.GB1675@slinkp.com> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <410F8044.7070300@wcm-solutions.de> <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> Message-ID: <5.1.0.14.2.20040804130724.0340e008@127.0.0.1> Thanks, Yvo! >After checking in a small fix for __init__.py this also works. Why have "own" imports to be relative in __init__.py? >There are still 10 CMFSetup tests failing. with 'all_cmf_tests.py' Ran 741 tests in 17.906s OK with 'testrunner.py': Ran 755 tests in 17.093s FAILED (failures=10, errors=11) directly in CMFSetup ('testrunner.py'): Ran 300 tests in 2.453s FAILED (failures=10, errors=11) Are they not covered by 'all_cmf_tests.py'? Somehow confusing: 755 - 741 = 14 but != 21 (10+11) > >@Set ZOPE_HOME=C:\Programme\Zope272 >@Set PYTHON=%ZOPE_HOME%\bin\python.exe >@Set PYTHONPATH=%ZOPE_HOME%\lib\python > >"%PYTHON%" "all_cmf_tests.py" >Pause > > >Note that I test with INSTANCE_HOME and ZOPE_HOME in the same place! Works for me after adding INSTANCE_HOME definition. Thanks. Gregoire From y.2004_ at wcm-solutions.de Wed Aug 4 08:08:26 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Wed Aug 4 08:08:50 2004 Subject: [Zope-CMF] Re: running the CMF unit tests In-Reply-To: <5.1.0.14.2.20040804130724.0340e008@127.0.0.1> References: <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <20040803042146.GB1675@slinkp.com> <6F50D380-E520-11D8-915A-000D9368D272@dataflake.org> <410F8044.7070300@wcm-solutions.de> <5.1.0.14.2.20040803220741.027f6320@127.0.0.1> <41108F73.2050305@wcm-solutions.de> <5.1.0.14.2.20040804130724.0340e008@127.0.0.1> Message-ID: <4110D1BA.9040504@wcm-solutions.de> Gregoire Weber wrote: >>After checking in a small fix for __init__.py this also works. > > Why have "own" imports to be relative in __init__.py? That was not the point. from Products.CMFUid import UniqueIdGeneratorTool should also work. But using import Products.CMFUid.UniqueIdGeneratorTool and accessing 'UniqueIdGeneratorTool' without 'Products.CMFUid.' in front of it caused trouble (and I still don't understand why this worked at all). >>There are still 10 CMFSetup tests failing. > > > with 'all_cmf_tests.py' > > Ran 741 tests in 17.906s > OK > > with 'testrunner.py': > > Ran 755 tests in 17.093s > FAILED (failures=10, errors=11) > > directly in CMFSetup ('testrunner.py'): > > Ran 300 tests in 2.453s > FAILED (failures=10, errors=11) testrunner.py is deprecated and does sometimes strange things. Use test.py instead! > Are they not covered by 'all_cmf_tests.py'? They are covered, but test.py / testrunner.py runs them from a different location, so the results can be different. > Somehow confusing: 755 - 741 = 14 but != 21 (10+11) Don't know. Cheers, Yuppie From stefan at epy.co.at Wed Aug 4 12:48:39 2004 From: stefan at epy.co.at (Stefan H. Holek) Date: Wed Aug 4 12:48:56 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: Message-ID: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> I have this feature for CMFCore.CatalogTool: security.declarePrivate('unrestrictedSearchResults') def unrestrictedSearchResults(self, REQUEST=None, **kw): """ Calls ZCatalog.searchResults without any CMF specific processing. """ return ZCatalog.searchResults(self, REQUEST, **kw) You want it? Stefan On Montag, Aug 2, 2004, at 16:26 Europe/Vienna, Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. > > I would actually prefer not to see any more features land before the > beta. If you think there is an important feature, already set to go > but not in yet, let me know. > -- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/ From tseaver at zope.com Wed Aug 4 15:42:06 2004 From: tseaver at zope.com (Tres Seaver) Date: Wed Aug 4 15:43:43 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> References: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> Message-ID: <41113C0E.4020209@zope.com> Stefan H. Holek wrote: > I have this feature for CMFCore.CatalogTool: > > security.declarePrivate('unrestrictedSearchResults') > def unrestrictedSearchResults(self, REQUEST=None, **kw): > """ > Calls ZCatalog.searchResults without any CMF specific > processing. > """ > return ZCatalog.searchResults(self, REQUEST, **kw) > > You want it? I guess I'm confused: given that it is private, why couldn't the caller just invoke ZCatalog.searchResults(thing, REQEUEST, **kw) herself? Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gregweb at gmx.ch Wed Aug 4 16:12:40 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Wed Aug 4 16:02:49 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> References: Message-ID: <5.1.0.14.2.20040804220852.02d28008@127.0.0.1> Hi Stefan, +1, Florent Guillaume wanted CMFUid returning such "unrestricted brains". If for Tres this is +x it would be nice if you could add it. Please inform me if you have done it, so I could use it for CMFUid. Gregoire At 18:48 04.08.2004 +0200, Stefan H. Holek wrote: >I have this feature for CMFCore.CatalogTool: > > security.declarePrivate('unrestrictedSearchResults') > def unrestrictedSearchResults(self, REQUEST=None, **kw): > """ > Calls ZCatalog.searchResults without any CMF specific > processing. > """ > return ZCatalog.searchResults(self, REQUEST, **kw) From stefan at epy.co.at Wed Aug 4 17:13:03 2004 From: stefan at epy.co.at (Stefan H. Holek) Date: Wed Aug 4 17:13:21 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41113C0E.4020209@zope.com> Message-ID: <12589EE6-E65B-11D8-B95D-00039382A54A@epy.co.at> Because the caller is not himself derived from ZCatalog? I am not married to 'private', btw. Anything you think is more appropriate? I'm not even married to the method name ;-). Stefan On Mittwoch, Aug 4, 2004, at 21:42 Europe/Vienna, Tres Seaver wrote: > Stefan H. Holek wrote: >> I have this feature for CMFCore.CatalogTool: >> security.declarePrivate('unrestrictedSearchResults') >> def unrestrictedSearchResults(self, REQUEST=None, **kw): >> """ >> Calls ZCatalog.searchResults without any CMF specific >> processing. >> """ >> return ZCatalog.searchResults(self, REQUEST, **kw) >> You want it? > > I guess I'm confused: given that it is private, why couldn't the > caller just invoke ZCatalog.searchResults(thing, REQEUEST, **kw) > herself? -- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/ From tseaver at zope.com Wed Aug 4 17:35:04 2004 From: tseaver at zope.com (Tres Seaver) Date: Wed Aug 4 17:36:40 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <12589EE6-E65B-11D8-B95D-00039382A54A@epy.co.at> References: <12589EE6-E65B-11D8-B95D-00039382A54A@epy.co.at> Message-ID: <41115688.7030708@zope.com> Stefan H. Holek wrote: > Because the caller is not himself derived from ZCatalog? > > I am not married to 'private', btw. Anything you think is more > appropriate? I'm not even married to the method name ;-). The name is fine, and I agree with you that this method should be private, but why does the caller need to call it as a method? E.g.: $ bin/zopectl debug >>> catalog = app.site.portal_catalog >>> from Products.ZCatalog.ZCatalog import ZCatalog >>> ZCatalog.searchResults(catalog) [] If we make the new method private (which seems right), then anyone who would be allowed to call it could equally well import the ZCatalog class (as I just did) and call it's searchResults method without method dispatch. The reason I think it should be private is that otherwise it would open the possibility that a user would be able to see results for: - objects she couldn't then view (since we bypass the 'alloweRolesAndUsers' check) - objects either not yet effective or already expired, but without having the corresponding AccessInactivePortalContent permission. Sites have use cases which need to bypass these restrictions for "normal" use should probably be replacing the 'portal_catalog' tool. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From dieter at handshake.de Wed Aug 4 18:05:28 2004 From: dieter at handshake.de (Dieter Maurer) Date: Wed Aug 4 18:05:44 2004 Subject: [Zope-CMF] Re: [dev] Actions: lazy dict not working with DTML? In-Reply-To: <4110AA88.2010900@wcm-solutions.de> References: <410E6A20.6070005@wcm-solutions.de> <16655.58020.872545.728912@gargle.gargle.HOWL> <4110AA88.2010900@wcm-solutions.de> Message-ID: <16657.23976.166211.714363@gargle.gargle.HOWL> yuppie wrote at 2004-8-4 11:21 +0200: > ... >Basically this is a dict with a customized __getitem__ method. > ... >class LazyDict(dict): > def __getitem__(self, key): > return 'bar' The code in "cDocumentTemplate.c:MM_cget" checks whether the object is a "dict" and in this case calls "PyDict_GetItem". This function ignores your "__getitem__" customization (and directy uses the dict's "__getitem__"). You can replace "dict" above by "UserDict" (from module "UserDict") and the problem disappears (as then the "PyDict_Check" will return "false"). -- Dieter From kai.hoppert at tomcom.de Thu Aug 5 02:02:12 2004 From: kai.hoppert at tomcom.de (Kai Hoppert) Date: Thu Aug 5 02:04:35 2004 Subject: [Zope-CMF] last call before feature freeze! + !CMFTopic! Message-ID: Hi all, i developed a ExpressionCriterion Field for CMFTopic. It acts like a normal SimpleStringCriterion. The diffrent is that you can use python and string expressions. For example you can write python:portal.portal_membership.getAuthenticatedMember(). So that you only need one topic to show all items a authenticated member has create. Does anybody need this. Is it interesting to integrate this in CMFTopic for next release. open attachement to see the code. Greetings, Kai Hoppert ___________________________________________________ tomcom Gesellschaft f?r Informationstechnologie mbH Heuriedweg 14 | D-88131 Lindau Fon +49 (0)8382 975844 | Fax +49 (0)8382 975855 kai.hoppert@tomcom.de | http://www.tomcom.de This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. tomcom disclaims all responsibility and accepts no liability for the consequences of any person acting, or refraining from acting on the contents of this document. Any unauthorised form of dissemination, copying, disclosure, modification, distribution and/or publication of this message is strictly prohibited. For information about tomcom please contact us on +49.8382.975844 or visit our web site at www.tomcom.de -------------- next part -------------- A non-text attachment was scrubbed... Name: ExpressionCriterion.py Type: application/octet-stream Size: 2142 bytes Desc: ExpressionCriterion.py Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20040805/8c58e75d/ExpressionCriterion.obj From tseaver at zope.com Thu Aug 5 08:32:02 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 5 08:32:13 2004 Subject: [Zope-CMF] Re: last call before feature freeze! + !CMFTopic! In-Reply-To: References: Message-ID: <411228C2.9020907@zope.com> Kai Hoppert wrote: > i developed a ExpressionCriterion Field for CMFTopic. It acts like a normal SimpleStringCriterion. > The diffrent is that you can use python and string expressions. For example you can > write python:portal.portal_membership.getAuthenticatedMember(). So that you only need one topic > to show all items a authenticated member has create. > > Does anybody need this. Is it interesting to integrate this in CMFTopic for next release. > open attachement to see the code. The idea is attractive. I have a couple of questions on the code: - Why allow only 'string:' and 'python:' expressiosn? For instance, your example above would work fine as 'portal/portal_membership/getAuthenticatedMember'. - Do you think we might add more names to the context? E.g., 'criterion' and 'topic'. - Reusing the 'ssc_edit' form is OK, but maybe we should come up with a better one (which explained the names available to the expressions?) and one on the implications: - Exposing the ability to write code (even in the limited form of 'python:' or path expressions) at the "CMS" level might present interesting security challenges. I would guess that we should think hard about how to restrict access to the ability to create EC's. Comments, anyone (especially on the last)? Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Thu Aug 5 08:40:17 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 5 08:40:31 2004 Subject: [Zope-CMF] Re: CVS: CMF - CHANGES.txt:1.146.4.45 In-Reply-To: <20040804230555.42D2A2030D3@mail.zope.org> References: <20040804230555.42D2A2030D3@mail.zope.org> Message-ID: <41122AB1.4010607@zope.com> Stefan H. Holek wrote: > Update of /cvs-repository/CMF > In directory cvs.zope.org:/tmp/cvs-serv20599 > > Modified Files: > Tag: CMF-1_4-branch > CHANGES.txt > Log Message: > Implemented parts of #110 by making workflow states configurable TTW. > > > === CMF/CHANGES.txt 1.146.4.44 => 1.146.4.45 === > --- CMF/CHANGES.txt:1.146.4.44 Wed Aug 4 07:05:43 2004 > +++ CMF/CHANGES.txt Wed Aug 4 19:05:23 2004 > @@ -2,6 +2,9 @@ > > New Features > > + - CMFCalendar.CalendarTool: Made workflow states configurable TTW. > + Also see http://www.zope.org/Collectors/CMF/110 > + Hmm, I'm not quite sure this fits the policy on the release branch, where stability is a driving factor. A (notional) 1.4.7 release should be very low risk for a site manager to deploy (as in, she shouldn't need to worry about the chance that a new feature might have introduced a bug). Let's at least discuss features before backporting them in the future. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From contact_tonico at yahoo.de Thu Aug 5 11:17:52 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Thu Aug 5 09:16:18 2004 Subject: [Zope-CMF] Re: last call before feature freeze! + !CMFTopic! In-Reply-To: <411228C2.9020907@zope.com> References: <411228C2.9020907@zope.com> Message-ID: <41124FA0.2040107@yahoo.de> Tres Seaver wrote: > > and one on the implications: > > - Exposing the ability to write code (even in the limited form of > 'python:' or path expressions) at the "CMS" level might present > interesting security challenges. I would guess that we should > think hard about how to restrict access to the ability to create > EC's. > > Comments, anyone (especially on the last)? Only Managers can add Topics by default, I'm not shure where the "CMS" level begins. Tonico From kai.hoppert at tomcom.de Thu Aug 5 09:15:30 2004 From: kai.hoppert at tomcom.de (Kai Hoppert) Date: Thu Aug 5 09:17:41 2004 Subject: [Zope-CMF] AW: last call before feature freeze! + !CMFTopic! Message-ID: >The idea is attractive. I have a couple of questions on the code: > - Why allow only 'string:' and 'python:' expressiosn? For instance, > your example above would work fine as > 'portal/portal_membership/getAuthenticatedMember'. At this point i looked in PageTemplates how the Expressions are handled there... I just tested what you said....cool this really works :) nice i don't know that so i would make sense to remove this testing part. > - Do you think we might add more names to the context? E.g., > 'criterion' and 'topic'. Sorry here i don't know what you really want..do you mean more tabs? > - Reusing the 'ssc_edit' form is OK, but maybe we should come up > with a better one (which explained the names available to the > expressions?) Perhaps here can be a little redesign perhaps something such as the help Boxes in Plone if you click in the field while editing a object. Maybe here can be also a i18n translation?!? >and one on the implications: > - Exposing the ability to write code (even in the limited form of > 'python:' or path expressions) at the "CMS" level might present > interesting security challenges. I would guess that we should > think hard about how to restrict access to the ability to create > EC's. If i understand it right topics are queries about the catalog so you doesn't care wich expression the user use because every result will be checked if the user has the permission to see it or not. If i use string criterion and take name admin and there are private items for him i will not see them in topic or not dependent on the right i have. So Expression Criterion will be the same. Only the string result for the Expression is given to the catalog query. So nothing wich can't also be created with string expression. Unless we remove the string conversion and so for exaple we are also be able to query about a controled list of object types. that could be also cool :). But then you have especialy to write portal/portal_membership/getAuthenticatedMember/id. That was a reason why i used string conversion because here i had the user object. Greetings Kai From y.2004_ at wcm-solutions.de Thu Aug 5 10:29:12 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 5 10:31:43 2004 Subject: [Zope-CMF] Re: [dev] Actions: lazy dict not working with DTML? In-Reply-To: <16657.23976.166211.714363@gargle.gargle.HOWL> References: <410E6A20.6070005@wcm-solutions.de> <16655.58020.872545.728912@gargle.gargle.HOWL> <4110AA88.2010900@wcm-solutions.de> <16657.23976.166211.714363@gargle.gargle.HOWL> Message-ID: <41124438.70606@wcm-solutions.de> Dieter Maurer wrote: > The code in "cDocumentTemplate.c:MM_cget" checks whether > the object is a "dict" and in this case calls > "PyDict_GetItem". This function ignores your "__getitem__" customization > (and directy uses the dict's "__getitem__"). > > You can replace "dict" above by > "UserDict" (from module "UserDict") and the problem disappears > (as then the "PyDict_Check" will return "false"). Thanks for the hint! I made a new checkin based on UserDict and everything seems to work now. BTW: UserDict is deprecated, but that should be a minor issue. Cheers, Yuppie From y.2004_ at wcm-solutions.de Thu Aug 5 11:54:46 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 5 11:56:13 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: <41125846.8000303@wcm-solutions.de> Hi! Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. > > I would actually prefer not to see any more features land before the > beta. If you think there is an important feature, already set to go but > not in yet, let me know. I don't have a new feature, but there are some small issues I'd like to see resolved before the release: - mark getActionById() as deprecated / add a warning (after converting topic_addSubtopic.py and if there are no objections) - add Copyright headers to CMFSetup files (or is there a new policy not to include them?) What would be the correct year for the Copyright? - resolve open issues from and some other CMFSetup issues Today I have time to work on some of these issues. Afterwards, I'm going to make a list of issues that are still unresolved. Could you please add a "CMFSetup" Topic ("CMFCalendar" is also missing) to the collector? I'd like to add the issues that are not fixed within the next days to the collector. Cheers, Yuppie From gregweb at gmx.ch Thu Aug 5 12:15:39 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Thu Aug 5 12:05:47 2004 Subject: [Zope-CMF] When to set the correct version in CMFUid/version.txt? Message-ID: <5.1.0.14.2.20040805175428.07e943a0@127.0.0.1> Hi Tres, A question concerning version numbers. Every CMF* Products version.txt seems to hold the CMF distributions over all version number (1.3, 1.4.6, ...) except CMFSetup (0.9). I suppose all released CMF* Products hold the CMF distributions version. If this is the case, please do not forget to change the CMFUid's version from unreleased to 1.5beta1. If I should do that, file me a note. Gregoire From tseaver at zope.com Thu Aug 5 12:26:01 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 5 12:26:40 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41125846.8000303@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> Message-ID: <41125F99.3060108@zope.com> yuppie wrote: > Hi! > > > Tres Seaver wrote: > >> I'd like to release the beta by Friday, 6 August. >> >> I would actually prefer not to see any more features land before the >> beta. If you think there is an important feature, already set to go >> but not in yet, let me know. > > > I don't have a new feature, but there are some small issues I'd like to > see resolved before the release: > > - mark getActionById() as deprecated / add a warning > (after converting topic_addSubtopic.py and if there are no objections) I don't recall the issues here. > - add Copyright headers to CMFSetup files > (or is there a new policy not to include them?) Nope, adding hte headers is fine. > What would be the correct year for the Copyright? 2004 (the Python was a complete rewrite of the original customer-specific version). > - resolve open issues from > and some > other CMFSetup issues Here is my summary on those issues: #1: Should be able to steal UI from the "Configured CMF Site" bit (I added the underlying machinery in order to support that). #2: Done. #3, 4: I think yuppie fixed these. #5: Its a bug, but need not block the beta. #6: The page templates we are using need to be CR-free. We may need to change the mechanism we use for building the Windows release binary, such that it checks the sources out and zips them on a Windows system (I can't do that easily myself). #7: I can't fix it, as I don't run Windows. > Today I have time to work on some of these issues. Afterwards, I'm going > to make a list of issues that are still unresolved. > > Could you please add a "CMFSetup" Topic ("CMFCalendar" is also missing) > to the collector? I'd like to add the issues that are not fixed within > the next days to the collector. OK, done. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From apm13 at columbia.edu Thu Aug 5 12:35:56 2004 From: apm13 at columbia.edu (Alec Mitchell) Date: Thu Aug 5 12:36:05 2004 Subject: [Zope-CMF] Re: CVS: CMF - CHANGES.txt:1.146.4.45 In-Reply-To: <41122AB1.4010607@zope.com> References: <20040804230555.42D2A2030D3@mail.zope.org> <41122AB1.4010607@zope.com> Message-ID: <200408050935.56836.apm13@columbia.edu> On Thursday 05 August 2004 05:40 am, Tres Seaver wrote: > Stefan H. Holek wrote: > > Update of /cvs-repository/CMF > > In directory cvs.zope.org:/tmp/cvs-serv20599 > > > > Modified Files: > > Tag: CMF-1_4-branch > > CHANGES.txt > > Log Message: > > Implemented parts of #110 by making workflow states configurable TTW. > Hmm, I'm not quite sure this fits the policy on the release branch, > where stability is a driving factor. A (notional) 1.4.7 release should > be very low risk for a site manager to deploy (as in, she shouldn't need > to worry about the chance that a new feature might have introduced a bug). > > Let's at least discuss features before backporting them in the future. If this goes into the 1.4 branch, it would probably be wise to at least add a default value for 'show_states' in the 'edit_configuration' method, so that people who are calling it directly from python code still have the right number of arguments. Some other comments about related CMFCalendar features additions: Though the first day of the week code in the patch is not ideal (particularly the calls to 'calendar.setfirstweekday()' in every method), it works well, and serves a need that is likely even more common than the need to add custom workflow states. It would be very nice to have this in 1.5. Also, there is a an additional change I added to the patch, which created methods (StartDate() and EndDate()) that return the ISO string version of the start() and end() dates, and catalog metadata columns for those ISO date methods. Ideally these would eventually replace the start() and end() catalog metadata (to prevent catalog metadata bloat, and bring things in line with the other date field metadata used in CMF). For now, because many products use the start and end catalog columns, it is probably best to just note that they are deprecated in CHANGES/README, and give Plone, CalendarX, etc. some time to catch up (as was done with the DublinCore date metadata IIRC). Similarly, it would be very nice if the start() and end() catalog indexes could be made DateIndexes, rather than bloaty FieldIndexes. People might also find having a new DateRangeIndex on start() and end() useful for finding overlapping event objects. I've attached a patch to HEAD, that adds the ISO date methods and metadata, changes the index types from Field to Date, and adds a DateRangeIndex (which I have found very useful in the past, though it is certainly not critical). Alec Mitchell -------------- next part -------------- A non-text attachment was scrubbed... Name: ISOStrings_patch.diff Type: text/x-diff Size: 2111 bytes Desc: not available Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20040805/e5c4ee9e/ISOStrings_patch.bin From tseaver at zope.com Thu Aug 5 12:47:46 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 5 12:47:56 2004 Subject: [Zope-CMF] Re: When to set the correct version in CMFUid/version.txt? In-Reply-To: <5.1.0.14.2.20040805175428.07e943a0@127.0.0.1> References: <5.1.0.14.2.20040805175428.07e943a0@127.0.0.1> Message-ID: <411264B2.4040608@zope.com> Gregoire Weber wrote: > A question concerning version numbers. > > Every CMF* Products version.txt seems to hold the CMF distributions > over all version number (1.3, 1.4.6, ...) except CMFSetup (0.9). > > I suppose all released CMF* Products hold the CMF distributions version. > > If this is the case, please do not forget to change the CMFUid's version > from unreleased to 1.5beta1. I normally change them as part of the relase-making process. CMFSetup will "catch up" at that point, as well. It has never been openly released, either; the 0.9 number referred to the earlier, customer-specific version, now rewritten. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gregweb at gmx.ch Thu Aug 5 13:03:36 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Thu Aug 5 12:53:40 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41115688.7030708@zope.com> References: <12589EE6-E65B-11D8-B95D-00039382A54A@epy.co.at> <12589EE6-E65B-11D8-B95D-00039382A54A@epy.co.at> Message-ID: <5.1.0.14.2.20040805184023.03c364e8@127.0.0.1> Hi Tres, > $ bin/zopectl debug > >>> catalog = app.site.portal_catalog > >>> from Products.ZCatalog.ZCatalog import ZCatalog > >>> ZCatalog.searchResults(catalog) > [] > >If we make the new method private (which seems right), then anyone who would be allowed to call it could equally well import the ZCatalog class (as I just did) and call it's searchResults method without method dispatch. > >The reason I think it should be private is that otherwise it would open the possibility that a user would be able to see results for: > > - objects she couldn't then view (since we bypass the > 'alloweRolesAndUsers' check) > > - objects either not yet effective or already expired, but without > having the corresponding AccessInactivePortalContent permission. To make it non private opens a security whole ... A coder using ZCatalog.serachResults(catalog) breaks CMFIdea (the CMF idea of only accessing foreign modules through getToolByName or siteroot.portal_foreigntool). I could use this for CMFUid. It would be nice to have it before the CMF 1.5 beta (or at least before the final). >Sites have use cases which need to bypass these restrictions for "normal" use should probably be replacing the 'portal_catalog' tool. I agree. Gregoire From stefan at epy.co.at Thu Aug 5 14:10:36 2004 From: stefan at epy.co.at (Stefan H. Holek) Date: Thu Aug 5 14:10:51 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41115688.7030708@zope.com> Message-ID: Granted. So I guess all I have to offer in favor is that there *is* interest in unrestricted catalog searches, and adding the method would promote the use case from "idiom" to API. Which is a good thing, IMO. Stefan On Mittwoch, Aug 4, 2004, at 23:35 Europe/Vienna, Tres Seaver wrote: > The name is fine, and I agree with you that this method should be > private, but why does the caller need to call it as a method? E.g.: > > $ bin/zopectl debug > >>> catalog = app.site.portal_catalog > >>> from Products.ZCatalog.ZCatalog import ZCatalog > >>> ZCatalog.searchResults(catalog) > [] > > If we make the new method private (which seems right), then anyone who > would be allowed to call it could equally well import the ZCatalog > class (as I just did) and call it's searchResults method without > method dispatch. -- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/ From y.2004_ at wcm-solutions.de Thu Aug 5 14:20:16 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 5 14:22:29 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41125F99.3060108@zope.com> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> Message-ID: <41127A60.8080207@wcm-solutions.de> Hi! Tres Seaver wrote: > yuppie wrote: >> I don't have a new feature, but there are some small issues I'd like >> to see resolved before the release: >> >> - mark getActionById() as deprecated / add a warning >> (after converting topic_addSubtopic.py and if there are no objections) > > > I don't recall the issues here. 1.) Like _getViewFor(), getActionById() is a relict of the old type actions. The way it extracts methods from url expressions does not work with all Actions. 2.) 'id' is not unique. 3.) getActionInfo() should be a good replacement, at least in most cases. topic_addSubtopic.py is the last place where getActionById() is used in the ZPT skin. > Here is my summary on those issues: > > #1: Should be able to steal UI from the "Configured CMF Site" bit > (I added the underlying machinery in order to support that). > > #2: Done. Well. There is a new 'Comparison' tab and I really like it. But the 'Snapshots' tab has still an unimplemented 'Compare Snapshots' button. I guess it can be removed. > #3, 4: I think yuppie fixed these. Most of it. I'll fix the rest today. > #5: Its a bug, but need not block the beta. Two bugs. I'll fix the rolemap bug today. The other bug is that the import of workflow bindings fails. But I agree that this needs not block the beta. > #6: The page templates we are using need to be CR-free. We may > need to change the mechanism we use for building the Windows > release binary, such that it checks the sources out and > zips them on a Windows system (I can't do that easily myself). At least everything seems to work with mixed newlines. > #7: I can't fix it, as I don't run Windows. This is closely related to #6. >> Could you please add a "CMFSetup" Topic ("CMFCalendar" is also >> missing) to the collector? I'd like to add the issues that are not >> fixed within the next days to the collector. > > OK, done. Thanks! Cheers, Yuppie From y.2004_ at wcm-solutions.de Fri Aug 6 06:25:58 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Fri Aug 6 06:27:16 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41127A60.8080207@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> Message-ID: <41135CB6.2060200@wcm-solutions.de> Hi! These issues are still unresolved: a.) mark getActionById() as deprecated / add a warning -> ok? b.) CMFSetup >> #1: Should be able to steal UI from the "Configured CMF Site" bit >> (I added the underlying machinery in order to support that). >> >> #2: remove 'Compare Snapshots' button from 'Snapshots' tab -> ok? >> #5: fix import of workflow bindings >> #6: The page templates we are using need to be CR-free. We may >> need to change the mechanism we use for building the Windows >> release binary, such that it checks the sources out and >> zips them on a Windows system (I can't do that easily myself). >> #7: I can't fix it, as I don't run Windows. #8: 'Configured CMF Site' factory is still experimental -> remove registration on release branch? #9: some unittests fail if run with test.py #10: Not purging the existing setup seems to have some issues -> ? How is not-purging supposed to work? Currently existing Actions are deleted, reimporting raises errors. Cheers, Yuppie From tseaver at zope.com Fri Aug 6 08:18:49 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 6 08:19:25 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41135CB6.2060200@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> Message-ID: <41137729.1070602@zope.com> BTW, I am seeing a ton of delayed / failed mail delivery to your mail.udag.de address. Maybe you'll see this on gmane.org, or something. yuppie wrote: > Hi! > > > These issues are still unresolved: > > a.) mark getActionById() as deprecated / add a warning > > -> ok? +1 > b.) CMFSetup > >>> #1: Should be able to steal UI from the "Configured CMF Site" bit >>> (I added the underlying machinery in order to support that). >>> >>> #2: > > > remove 'Compare Snapshots' button from 'Snapshots' tab > > -> ok? +1. >>> #5: > > > fix import of workflow bindings I saw some checkins from you yesterday on the workflow export / import. What is left? >>> #6: The page templates we are using need to be CR-free. We may >>> need to change the mechanism we use for building the Windows >>> release binary, such that it checks the sources out and >>> zips them on a Windows system (I can't do that easily myself). >>> #7: I can't fix it, as I don't run Windows. > > > #8: 'Configured CMF Site' factory is still experimental > > -> remove registration on release branch? Or add a note on the factory form which explains that the site will need further tweaking. > #9: some unittests fail if run with test.py This is how I run them: $ bin/zopectl run /path/to/all_cmf_tests.py ... # note a DeprecationWarning, which I am still not happy with ---------------------------------------------------------------------- Ran 769 tests in 82.757s OK I am not convinced that test.py is suitable for running tests of non-core software; your report suggests to me a bug in test.py. Can you elaborate on what you think we could do in the CMF tests to work around that problem? > #10: Not purging the existing setup seems to have some issues > > -> ? > > How is not-purging supposed to work? Currently existing Actions are > deleted, reimporting raises errors. Each import step is supposed to know whether "don't purge" is sensible for it. and what to do when purging. Running the same import twice without purging is highly likely to create conflicts (the same actions will be created twice, etc). In theory, "don't purge" will be useful when applying a profile as an "update" to an existing site; for it to work cleanly, the steps in the profile need to be designed for that. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From dwessel at nacma.nato.int Fri Aug 6 08:26:43 2004 From: dwessel at nacma.nato.int (Dirk WESSEL) Date: Fri Aug 6 08:27:19 2004 Subject: [Zope-CMF] Re: Zope-CMF Digest, Vol 13, Issue 8 Message-ID: ** Reply Requested When Convenient ** Sorry, but I'am not in the office. I'll be back on the 01.09.2004. Thanks Dirk Wessel From y.2004_ at wcm-solutions.de Fri Aug 6 10:41:28 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Fri Aug 6 10:43:03 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41137729.1070602@zope.com> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> Message-ID: <41139898.7070100@wcm-solutions.de> Hi! Tres Seaver wrote: #5: fix import of workflow bindings > I saw some checkins from you yesterday on the workflow export / import. > What is left? I worked on definition.xml export. What still does not work correctly is workflows.xml import. Portal types that should not belong to any workflow get the (Default) workflow. This should be easy to fix, but I didn't have a closer look at it. #9: some unittests fail if run with test.py > This is how I run them: > > $ bin/zopectl run /path/to/all_cmf_tests.py > ... # note a DeprecationWarning, which I am still not happy with Is there an easy way to suppress deprecation warnings (or even test them) while testing deprecated code? > ---------------------------------------------------------------------- > Ran 769 tests in 82.757s > > OK > > I am not convinced that test.py is suitable for running tests of > non-core software; your report suggests to me a bug in test.py. > Can you elaborate on what you think we could do in the CMF tests to > work around that problem? If I find the time I'll have a closer look at this. This should not be too hard to fix, looks like a path issue. #10: Not purging the existing setup seems to have some issues >> How is not-purging supposed to work? Currently existing Actions are >> deleted, reimporting raises errors. > > Each import step is supposed to know whether "don't purge" is sensible > for it. and what to do when purging. Running the same import twice > without purging is highly likely to create conflicts (the same actions > will be created twice, etc). Well. The code could add actions only if they don't exist already. > In theory, "don't purge" will be useful when applying a profile as an > "update" to an existing site; for it to work cleanly, the steps in the > profile need to be designed for that. CMF 1.5 needs some new / moved actions. It would be quite helpful if CMFSetup could be used for migration. I'd like to see the "update" use case work against customized sites. BTW: Is there still time to check in one or two small fixes for CMF 1.5 beta? (Just if it doesn't cause any trouble.) Cheers, Yuppie From fg at nuxeo.com Fri Aug 6 11:11:52 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Fri Aug 6 11:12:00 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> References: Message-ID: <20040806151152.GA28397@flo.in.nuxeo.com> In article <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> you write: > I have this feature for CMFCore.CatalogTool: > > security.declarePrivate('unrestrictedSearchResults') > def unrestrictedSearchResults(self, REQUEST=None, **kw): > """ > Calls ZCatalog.searchResults without any CMF specific > processing. > """ > return ZCatalog.searchResults(self, REQUEST, **kw) > > You want it? Yes please. It's nice to have an clean API for this instead of using the knowledge that ZCatalog.searchResults() will do the same thing. And in theory the portal_catalog could do more things than ZCatalog even in unrestricted mode. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From fg at nuxeo.com Fri Aug 6 11:13:36 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Fri Aug 6 11:13:43 2004 Subject: [Zope-CMF] Re: last call before feature freeze! + !CMFTopic! In-Reply-To: <411228C2.9020907@zope.com> References: Message-ID: <20040806151336.GA28407@flo.in.nuxeo.com> In article <411228C2.9020907@zope.com> you write: > Kai Hoppert wrote: > > > i developed a ExpressionCriterion Field for CMFTopic. It acts like a > normal SimpleStringCriterion. > > The diffrent is that you can use python and string expressions. For > example you can > > write python:portal.portal_membership.getAuthenticatedMember(). So that > you only need one topic > > to show all items a authenticated member has create. > > > > Does anybody need this. Is it interesting to integrate this in CMFTopic > for next release. > > open attachement to see the code. > > > The idea is attractive. I have a couple of questions on the code: > > - Why allow only 'string:' and 'python:' expressiosn? For instance, > your example above would work fine as > 'portal/portal_membership/getAuthenticatedMember'. > > - Do you think we might add more names to the context? E.g., > 'criterion' and 'topic'. > > - Reusing the 'ssc_edit' form is OK, but maybe we should come up > with a better one (which explained the names available to the > expressions?) > > and one on the implications: > > - Exposing the ability to write code (even in the limited form of > 'python:' or path expressions) at the "CMS" level might present > interesting security challenges. I would guess that we should > think hard about how to restrict access to the ability to create > EC's. That's a problem yes. The expression is written by a CMS user having the right to create topics, but it's executed by any user viewing that topic. There is a classic possibility of trojans here. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From sidnei at awkly.org Fri Aug 6 11:13:00 2004 From: sidnei at awkly.org (Sidnei da Silva) Date: Fri Aug 6 11:13:59 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41139898.7070100@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> Message-ID: <20040806151300.GB1619@cotia.awkly.org> | #9: some unittests fail if run with test.py | | >This is how I run them: | > | > $ bin/zopectl run /path/to/all_cmf_tests.py | > ... # note a DeprecationWarning, which I am still not happy with | | Is there an easy way to suppress deprecation warnings (or even test | them) while testing deprecated code? I'm pretty sure there are examples in Zope 3. -- Sidnei da Silva http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher A successful [software] tool is one that was used to do something undreamed of by its author. -- S. C. Johnson From tseaver at zope.com Fri Aug 6 11:14:06 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 6 11:15:40 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41139898.7070100@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> Message-ID: <4113A03E.6000707@zope.com> yuppie wrote: (I'll reply to the rest later). > BTW: Is there still time to check in one or two small fixes for CMF 1.5 > beta? (Just if it doesn't cause any trouble.) Yes. I had hoped to release the beta today, but am diverted at least until Monday. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Fri Aug 6 11:17:34 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 6 11:19:05 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <20040806151152.GA28397@flo.in.nuxeo.com> References: <20040806151152.GA28397@flo.in.nuxeo.com> Message-ID: <4113A10E.2020609@zope.com> Florent Guillaume wrote: > In article <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> you write: > >>I have this feature for CMFCore.CatalogTool: >> >> security.declarePrivate('unrestrictedSearchResults') >> def unrestrictedSearchResults(self, REQUEST=None, **kw): >> """ >> Calls ZCatalog.searchResults without any CMF specific >> processing. >> """ >> return ZCatalog.searchResults(self, REQUEST, **kw) >> >>You want it? > > > Yes please. > > It's nice to have an clean API for this instead of using the knowledge > that ZCatalog.searchResults() will do the same thing. And in theory the > portal_catalog could do more things than ZCatalog even in unrestricted > mode. OK, +0 from me then. ;) -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gregweb at gmx.ch Fri Aug 6 11:43:58 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 11:34:15 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <20040806151152.GA28397@flo.in.nuxeo.com> References: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> Message-ID: <5.1.0.14.2.20040806174036.02b5c008@127.0.0.1> Tres, kindly asking: can you decide upon the 'unrestrictedSearchResults' topic or signalize to us if you're +/-0 so we may decide (and do it)? Florent, Stefan: I'll not be available during the weekend. So it would be on your turn to make the changes if Tres aggrees. Gregoire At 17:11 06.08.2004 +0200, Florent Guillaume wrote: >In article <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> you write: >> security.declarePrivate('unrestrictedSearchResults') >> def unrestrictedSearchResults(self, REQUEST=None, **kw): >> >> [...] > >Yes please. > >It's nice to have an clean API for this instead of using the knowledge >that ZCatalog.searchResults() will do the same thing. And in theory the >portal_catalog could do more things than ZCatalog even in unrestricted >mode. > >Florent From gregweb at gmx.ch Fri Aug 6 11:51:20 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 11:42:01 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113A03E.6000707@zope.com> References: <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> Message-ID: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> Hi Tres, CMFUid is in good shape at the moment. No release blocking from my side. What do you and others on the list think 1) about adding a 'Script (Python)' to the root with the name 'resolve' to get to a content item by unique id? (CMFDefault) 2) and adding a permanent link information at the bottom (or somewhere else) of the main template? Tres: may it be possible to add this during the beta phase? Gregoire At 11:14 06.08.2004 -0400, Tres Seaver wrote: >yuppie wrote: > >(I'll reply to the rest later). > >>BTW: Is there still time to check in one or two small fixes for CMF 1.5 beta? (Just if it doesn't cause any trouble.) > >Yes. I had hoped to release the beta today, but am diverted at least until Monday. > >Tres. >-- >=============================================================== >Tres Seaver tseaver@zope.com >Zope Corporation "Zope Dealers" http://www.zope.com >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From gregweb at gmx.ch Fri Aug 6 11:53:18 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 11:43:20 2004 Subject: [Zope-CMF] Sorry Tres, overseen your 'unrestrictedSearchResults' response! Message-ID: <5.1.0.14.2.20040806175236.03252380@127.0.0.1> Sorry Tres, overseen your 'unrestrictedSearchResults' response! Gregoire From fg at nuxeo.com Fri Aug 6 12:09:24 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Fri Aug 6 12:09:34 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> References: <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> Message-ID: <20040806160924.GA19989@flo.in.nuxeo.com> In article <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> you write: > Hi Tres, > > CMFUid is in good shape at the moment. No release blocking from my side. > > What do you and others on the list think > > 1) about adding a 'Script (Python)' to the root with the > name 'resolve' to get to a content item by unique id? > (CMFDefault) What would it do exactly ? Anyway 'resolve' is way too generic a name and is probably already used as a propert name or something by many objects. > 2) and adding a permanent link information at the bottom (or somewhere > else) of the main template? No opinion on that. > Tres: may it be possible to add this during the beta phase? > > Gregoire Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From contact_tonico at yahoo.de Fri Aug 6 14:23:38 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Fri Aug 6 12:22:07 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> References: <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> Message-ID: <4113CCAA.5090804@yahoo.de> Gregoire Weber wrote: > Hi Tres, > > CMFUid is in good shape at the moment. No release blocking from my side. > > What do you and others on the list think > > 1) about adding a 'Script (Python)' to the root with the > name 'resolve' to get to a content item by unique id? > (CMFDefault) Some thoughts: * Why not place this script in a skin folder? * I prefer '/resolve/565432' over '/resolve?id=565432' * It would also be nice to create an archive. URL to the archived object: '/archive/2004/12/03/565746' Maybe this should work to? '/archive/2004/12/03/565746/document_edit_form' The following URL should return a result from the catalog for the given date: '/archive/2004/12/' '/archive/2004/dec/ (depending on the locale) The best URL for permanent links would be '/archive/2004/dec/03/an-interesting-article-about-cmf' because it is better understandable and contains keywords for search-engines, IMHO. > 2) and adding a permanent link information at the bottom (or somewhere > else) of the main template? I think this makes sense for contentish objects. Tonico From tseaver at zope.com Fri Aug 6 12:25:28 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 6 12:27:01 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> References: <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> Message-ID: <4113B0F8.4010605@zope.com> Gregoire Weber wrote: > CMFUid is in good shape at the moment. No release blocking from my side. > > What do you and others on the list think > > 1) about adding a 'Script (Python)' to the root with the > name 'resolve' to get to a content item by unique id? > (CMFDefault) How about 'resolve_uid'? > 2) and adding a permanent link information at the bottom (or somewhere > else) of the main template? > > Tres: may it be possible to add this during the beta phase? Yes. Also, it looks as though I won't be able to make the release until Monday. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Fri Aug 6 12:31:15 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 6 12:32:46 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806174036.02b5c008@127.0.0.1> References: <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> <5.1.0.14.2.20040806174036.02b5c008@127.0.0.1> Message-ID: <4113B253.8040809@zope.com> Gregoire Weber wrote: > kindly asking: can you decide upon the 'unrestrictedSearchResults' topic > or signalize to us if you're +/-0 so we may decide (and do it)? I did, about a half hour before yours (it looks as though the mail.zope.org queues are constipated again). > Florent, Stefan: I'll not be available during the weekend. So it would be > on your turn to make the changes if Tres aggrees. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gregweb at gmx.ch Fri Aug 6 13:07:08 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 12:57:16 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <20040806160924.GA19989@flo.in.nuxeo.com> References: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> Message-ID: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> Hi Florent! >> 1) about adding a 'Script (Python)' to the root with the >> name 'resolve' to get to a content item by unique id? >> (CMFDefault) > >What would it do exactly ? Good question! I see four possibiliies 1) return the object This results in http://example.com/permalink/1234 returning the object (good for search engines) 2) redirect to the object This results in http://example.com/original/location/of/item (is this good for search engines?) 3+4) return/redirect to the view method or to the bare object? Resulting in http://example.com/permalink/1234 or http://example.com/permalink/1234/view or ... And doing the permalink/1234 thing looks like it'll be necessary to make a new content type (hmmm). >Anyway 'resolve' is way too generic a name >and is probably already used as a propert name or something by many >objects. I'm not bound to names, do you have a better name? What about 'permalink'? http://example.com/permalink/1234 (where 1234 is the unique id of the document) Gregoire From gregweb at gmx.ch Fri Aug 6 13:13:41 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 13:03:51 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113CCAA.5090804@yahoo.de> References: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> Message-ID: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> Hi Tonico, > * Why not place this script in a skin folder? > > * I prefer '/resolve/565432' over '/resolve?id=565432' To do '/resolve/1234' I think it's necessary to intercept __bobo_traverse__ (or something similar). So it'll be necessary to make a own content type. '/resolve?id=565432' is not really an option for me. > * It would also be nice to create an archive. > > URL to the archived object: > > '/archive/2004/12/03/565746' > > Maybe this should work to? > > '/archive/2004/12/03/565746/document_edit_form' > > The following URL should return a result from the > catalog for the given date: > > '/archive/2004/12/' > '/archive/2004/dec/ (depending on the locale) > >The best URL for permanent links would be > > '/archive/2004/dec/03/an-interesting-article-about-cmf' > >because it is better understandable and contains keywords for search-engines, IMHO. IMHO that's entirely another scope. The whole thing isn't about *archiving* (which helps resolving also) it's only about *resolving* possibly moved articles, images, files, etc. Your ideas are fine but they supose the site has strong article/news semantics. >> 2) and adding a permanent link information at the bottom (or somewhere else) of the main template? > >I think this makes sense for contentish objects. Hmmm? Why? Gregoire From gregweb at gmx.ch Fri Aug 6 13:15:47 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 13:05:53 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113B253.8040809@zope.com> References: <5.1.0.14.2.20040806174036.02b5c008@127.0.0.1> <231426A0-E636-11D8-B95D-00039382A54A@epy.co.at> <5.1.0.14.2.20040806174036.02b5c008@127.0.0.1> Message-ID: <5.1.0.14.2.20040806191456.01e4ada8@127.0.0.1> Our messages just crossed again :-) Gregoire At 12:31 06.08.2004 -0400, Tres Seaver wrote: >Gregoire Weber wrote: > >>kindly asking: can you decide upon the 'unrestrictedSearchResults' topic >>or signalize to us if you're +/-0 so we may decide (and do it)? > >I did, about a half hour before yours (it looks as though the mail.zope.org queues are constipated again). > >>Florent, Stefan: I'll not be available during the weekend. So it would be >>on your turn to make the changes if Tres aggrees. > >Tres. >-- >=============================================================== >Tres Seaver tseaver@zope.com >Zope Corporation "Zope Dealers" http://www.zope.com >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From fg at nuxeo.com Fri Aug 6 13:12:07 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Fri Aug 6 13:12:16 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> References: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> Message-ID: <4113BBE7.20305@nuxeo.com> Gregoire Weber wrote: > Hi Florent! > > >>> 1) about adding a 'Script (Python)' to the root with the >>> name 'resolve' to get to a content item by unique id? >>> (CMFDefault) >> >>What would it do exactly ? > > > Good question! > > I see four possibiliies > > 1) return the object > This results in http://example.com/permalink/1234 returning the > object (good for search engines) Often you cannot publish an object in a context other than its original context. For instance the page could use relative URLs that would break (unavoidable in case of user-supplied HTML for instance), or create a breadcrumb from the URL (bad idea I know). > 2) redirect to the object > This results in http://example.com/original/location/of/item Ok for me. > (is this good for search engines?) Don't know. > 3+4) return/redirect to the view method or to the bare object? > Resulting in http://example.com/permalink/1234 or > http://example.com/permalink/1234/view or ... Should be the view method I guess, yes. > And doing the permalink/1234 thing looks like it'll be necessary to make a > new content type (hmmm). Why ? >>Anyway 'resolve' is way too generic a name >>and is probably already used as a propert name or something by many >>objects. > > > I'm not bound to names, do you have a better name? > > What about 'permalink'? Works for me. > http://example.com/permalink/1234 (where 1234 is the unique id of the document) > > Gregoire Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From gregweb at gmx.ch Fri Aug 6 13:47:32 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 13:37:40 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113BBE7.20305@nuxeo.com> References: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> Message-ID: <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> Hi Florent, >>Good question! >>I see four possibiliies >> 1) return the object >> This results in http://example.com/permalink/1234 returning the >> object (good for search engines) > >Often you cannot publish an object in a context other than its original context. For instance the page could use relative URLs that would break (unavoidable in case of user-supplied HTML for instance), or create a breadcrumb from the URL (bad idea I know). > >> 2) redirect to the object >> This results in http://example.com/original/location/of/item > >Ok for me. Perhaps the result schould be http://example.com/original/location/of/item if the HTTP_REFERER is another object than item and http://example.com/permalink/1234 else. This way a user can follow the the permanent link at the bottomof the page and bookmark it. The next time he visits the link he gets redirected to the original location. Ok? >> (is this good for search engines?) > >Don't know. Does somebody know? >> 3+4) return/redirect to the view method or to the bare object? >> Resulting in http://example.com/permalink/1234 or >> http://example.com/permalink/1234/view or ... > >Should be the view method I guess, yes. I personnally don't like the 'view' appendage but it is necessary for images and files at least. >>And doing the permalink/1234 thing looks like it'll be necessary to make a >>new content type (hmmm). > >Why ? You're right. It's not necessary. I thought I would have to hook into traversal. REQUEST/URL0 snips away the uid but I get it by using REQUEST/PATH_INFO. Hmmm, does this work in virtual hosting situations? I'll try with a python script. Gregoire From pw_lists at slinkp.com Fri Aug 6 14:38:11 2004 From: pw_lists at slinkp.com (Paul Winkler) Date: Fri Aug 6 14:38:20 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> Message-ID: <20040806183811.GB2759@slinkp.com> On Fri, Aug 06, 2004 at 07:13:41PM +0200, Gregoire Weber wrote: > Hi Tonico, > > > > * Why not place this script in a skin folder? > > > > * I prefer '/resolve/565432' over '/resolve?id=565432' > > To do '/resolve/1234' I think it's necessary to intercept > __bobo_traverse__ (or something similar). So it'll be necessary > to make a own content type. No, if "resolve" is a script you can simply use the traverse_subpath binding. -- Paul Winkler http://www.slinkp.com From gregweb at gmx.ch Fri Aug 6 15:52:37 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 15:42:43 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <20040806183811.GB2759@slinkp.com> References: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> Message-ID: <5.1.0.14.2.20040806215151.02d661c0@127.0.0.1> Oh, that's nice. I didn't realize that before! Thanks! Gregoire At 14:38 06.08.2004 -0400, Paul Winkler wrote: >> To do '/resolve/1234' I think it's necessary to intercept >> __bobo_traverse__ (or something similar). So it'll be necessary >> to make a own content type. > >No, if "resolve" is a script you can simply use the traverse_subpath binding. From contact_tonico at yahoo.de Fri Aug 6 16:01:45 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Fri Aug 6 16:01:58 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> References: <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <4113CCAA.5090804@yahoo.de> <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> Message-ID: <4113E3A9.2040207@yahoo.de> Gregoire Weber wrote: >>> 2) and adding a permanent link information at the bottom (or somewhere else) of the main template? >> >>I think this makes sense for contentish objects. > > > Hmmm? Why? I was thinking of pages like the personalize form where a "resolve" wouldn't make sense. IIRC only contentish objects will be cataloged (by default). How would you find out if the actual context can have a resolve link. Tonico From gregweb at gmx.ch Fri Aug 6 16:31:01 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 16:21:53 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113E3A9.2040207@yahoo.de> References: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <4113CCAA.5090804@yahoo.de> <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> Message-ID: <5.1.0.14.2.20040806222608.01e4ada8@127.0.0.1> Hi Tonico, At 22:01 06.08.2004 +0200, Tonico Strasser wrote: >>>> 2) and adding a permanent link information at the bottom (or somewhere else) of the main template? >>> >>>I think this makes sense for contentish objects. >> >>Hmmm? Why? > >I was thinking of pages like the personalize form where a "resolve" wouldn't make sense. IIRC only contentish objects will be cataloged (by default). How would you find out if the actual context can have a resolve link. Only content objects (is it what you mean with contentish?) can have unique ids and thus be resolved by this unique id. I seems I meant by reading contentish you meant folderish. So at the end we have the same opinion and there is nothing to discuss in reality. Right? Gregoire From contact_tonico at yahoo.de Fri Aug 6 16:43:22 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Fri Aug 6 16:43:35 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> References: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <4113BBE7.20305@nuxeo.com> <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> Message-ID: <4113ED6A.2070208@yahoo.de> Gregoire Weber wrote: > The next time he visits the link he gets redirected to the > original location. > > Ok? I belive that redirecting is not in the spirit of permalinks. Recommended reading: Cool URIs don't change (TBL) >>> 3+4) return/redirect to the view method or to the bare object? >>> Resulting in http://example.com/permalink/1234 or >>> http://example.com/permalink/1234/view or ... >> >>Should be the view method I guess, yes. > > > I personnally don't like the 'view' appendage but it is necessary for > images and files at least. > I've written an 'archive' script, this is how I return the view of the object: [...] o = o = brain.getObject() [...] type = brain.Type method = ttool[type].getActionById('view') [...] method = getattr(o, method) return method() Tonico From contact_tonico at yahoo.de Fri Aug 6 16:47:08 2004 From: contact_tonico at yahoo.de (Tonico Strasser) Date: Fri Aug 6 16:50:22 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806222608.01e4ada8@127.0.0.1> References: <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <4113CCAA.5090804@yahoo.de> <5.1.0.14.2.20040806190721.01f29d78@127.0.0.1> <4113E3A9.2040207@yahoo.de> <5.1.0.14.2.20040806222608.01e4ada8@127.0.0.1> Message-ID: <4113EE4C.2060309@yahoo.de> Gregoire Weber wrote: >>I was thinking of pages like the personalize form where a "resolve" wouldn't make sense. IIRC only contentish objects will be cataloged (by default). How would you find out if the actual context can have a resolve link. > > > Only content objects (is it what you mean with contentish?) can have unique ids > and thus be resolved by this unique id. > > I seems I meant by reading contentish you meant folderish. > > So at the end we have the same opinion and there is nothing to discuss > in reality. Right? Yup, sorry for the confusion. Tonico From gregweb at gmx.ch Fri Aug 6 17:27:08 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 17:19:25 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <4113ED6A.2070208@yahoo.de> References: <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <4113BBE7.20305@nuxeo.com> <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> Message-ID: <5.1.0.14.2.20040806231717.02d661c0@127.0.0.1> Hi Tonico, >I belive that redirecting is not in the spirit of permalinks. > >Recommended reading: > >Cool URIs don't change (TBL) > Well, this was a compromise reading Florents arguments. For the beta I'll implement cool URIs. Reasons: - they're cool - I'm lazy == it's easier to implement - Florent will surely be able to alter the behaviour for his customers - it's late in the evening and it gets even later and I don't have time till next wednesday evening when the beta happened - those objecting may change the code while I'll not be able to change it back :-) >I've written an 'archive' script, this is how I return the view of the object: > > o = brain.getObject() > type = brain.Type > method = ttool[type].getActionById('view') > method = getattr(o, method) > return method() Thanks! This way I don't have to think on my own about it! Gregoire From gregweb at gmx.ch Fri Aug 6 19:31:23 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 6 19:21:31 2004 Subject: [Zope-CMF] permlink issue with folders (because they acquire?) Message-ID: <5.1.0.14.2.20040807012403.057b9008@127.0.0.1> I added the permalink feature discussed yesterday. Doing that I encountered a problem: Folders are not callable (raising a AttributeError: no __call__ method). That's why I had to suppress showing the permalink line on folderish objects in the 'main_template'. It works now but I'm pretty sure it is not optimal how I've done it. As I don't have time to investigate till wednesday evening I'll have a look at it in the beta phase. How to check for folderisch objects if they have a __call__ method? Gregoire From robert at redcor.ch Sat Aug 7 00:19:03 2004 From: robert at redcor.ch (robert rottermann) Date: Sat Aug 7 00:19:17 2004 Subject: [Zope-CMF] how to check whether an object is in a catalog Message-ID: <41145837.4000608@redcor.ch> Hi there, is there a way to check whether an object is indexed? I would like to dump the state of an object to disk. One of an objects attributes is the fact whether it is indexed or not. I thougth of using a catalog search like portal_catalog(path="/".join(list(obj.getPhysicalPath())), id=oj.getId()) But this not general since I do not know for sure whether there is a path index. And it seems rather expensive. Robert From robert at redcor.ch Sat Aug 7 01:26:08 2004 From: robert at redcor.ch (robert rottermann) Date: Sat Aug 7 01:26:23 2004 Subject: [Zope-CMF] CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: References: Message-ID: <411467F0.2070701@redcor.ch> I have a small whish that bugs me for a long time now. CMF does return the owner instead of the Creator when callong Creator(). Could we not just set a Creator property when an object ist created? Thanks Robert Tres Seaver wrote: > I'd like to release the beta by Friday, 6 August. > > I would actually prefer not to see any more features land before the > beta. If you think there is an important feature, already set to go but > not in yet, let me know. > > Tres. From robert at redcor.ch Sat Aug 7 01:46:52 2004 From: robert at redcor.ch (robert rottermann) Date: Sat Aug 7 01:47:08 2004 Subject: [Zope-CMF] what tag to use to checkout CMF 1.5 Message-ID: <41146CCC.3070206@redcor.ch> Hi there, what tag should I use to check out CMF 1.5 ? Or do I just get trunk? thanks Robert From y.2004_ at wcm-solutions.de Sat Aug 7 03:55:02 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sat Aug 7 03:56:02 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <411467F0.2070701@redcor.ch> References: <411467F0.2070701@redcor.ch> Message-ID: <41148AD6.2060408@wcm-solutions.de> robert rottermann wrote: > I have a small whish that bugs me for a long time now. > CMF does return the owner instead of the Creator when callong Creator(). > > Could we not just set a Creator property when an object ist created? That's already implemented. See CHANGES.txt for details. Cheers, Yuppie From y.2004_ at wcm-solutions.de Sat Aug 7 03:55:14 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sat Aug 7 03:56:03 2004 Subject: [Zope-CMF] Re: what tag to use to checkout CMF 1.5 In-Reply-To: <41146CCC.3070206@redcor.ch> References: <41146CCC.3070206@redcor.ch> Message-ID: <41148AE2.20904@wcm-solutions.de> robert rottermann wrote: > Hi there, > > what tag should I use to check out CMF 1.5 ? > Or do I just get trunk? Just the trunk. Tres is going to create the branch next week. Cheers, Yuppie From jens at dataflake.org Sat Aug 7 08:27:11 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sat Aug 7 08:27:23 2004 Subject: [Zope-CMF] UIDTool changes break stuff... (UIDTool::register unauthorized) Message-ID: <1B59DD67-E86D-11D8-ABC7-000D9368D272@dataflake.org> Here's what I get from a fresh CMF portal after I log in with a new member and just try to view that member's index_html: Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module Products.CMFCore.FSPageTemplate, line 195, in _exec Module Products.CMFCore.FSPageTemplate, line 121, in pt_render Module Products.PageTemplates.PageTemplate, line 96, in pt_render - Module TAL.TALInterpreter, line 189, in __call__ Module TAL.TALInterpreter, line 233, in interpret Module TAL.TALInterpreter, line 670, in do_useMacro Module TAL.TALInterpreter, line 233, in interpret Module TAL.TALInterpreter, line 408, in do_optTag_tal Module TAL.TALInterpreter, line 393, in do_optTag Module TAL.TALInterpreter, line 388, in no_tag Module TAL.TALInterpreter, line 233, in interpret Module TAL.TALInterpreter, line 636, in do_condition Module TAL.TALInterpreter, line 233, in interpret Module TAL.TALInterpreter, line 459, in do_setLocal_tal Module Products.PageTemplates.TALES, line 221, in evaluate - URL: file:CMFDefault/skins/zpt_generic/main_template.pt - Line 306, Column 2 - Expression: - Names: {'container': , 'context': , 'default': , 'here': , 'loop': , 'modules': , 'nothing': None, 'options': {'args': ()}, 'repeat': , 'request': , 'root': , 'template': , 'traverse_subpath': [], 'user': jens} Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ - __traceback_info__: uidtool.register(here) Module Python expression "uidtool.register(here)", line 1, in Unauthorized: You are not allowed to access 'register' in this context From dieter at handshake.de Sat Aug 7 08:48:56 2004 From: dieter at handshake.de (Dieter Maurer) Date: Sat Aug 7 08:53:30 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> References: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> Message-ID: <16660.53176.868546.540676@gargle.gargle.HOWL> Gregoire Weber wrote at 2004-8-6 19:47 +0200: > ... redirecting from link ... >>> (is this good for search engines?) >> >>Don't know. > >Does somebody know? I am not completely sure, but I think search engines should handle redirects without problem. I am convinced that it is even better than displaying the content under a faked URL: It is not nice at all to get the same information over and over again because it is available under different URLs. Redirecting to the true URL gives search engines the chance to recognize that it is indeed the same information (and update the link weight correspondingly). -- Dieter From jens at dataflake.org Sat Aug 7 09:05:57 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sat Aug 7 09:06:08 2004 Subject: [Zope-CMF] Document body extraction even with plain text: Bug or policy? Message-ID: <85E21427-E872-11D8-ABC7-000D9368D272@dataflake.org> http://zope.org/Collectors/CMF/214 Is the fact that *any* document, even one that explicitly had its format set to something other than "html", gets checked for HTML content and its body extracted? I can't remember if there was some specific policy decided on or if it's just an oversight that can be remedied as described in the issue. jens From jens at dataflake.org Sat Aug 7 09:22:45 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sat Aug 7 09:22:55 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <16660.53176.868546.540676@gargle.gargle.HOWL> References: <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> <16660.53176.868546.540676@gargle.gargle.HOWL> Message-ID: On Aug 7, 2004, at 14:48, Dieter Maurer wrote: > Gregoire Weber wrote at 2004-8-6 19:47 +0200: >> ... redirecting from link ... >>>> (is this good for search engines?) >>> >>> Don't know. >> >> Does somebody know? > > I am not completely sure, but I think search engines should > handle redirects without problem. Quoting from Google's own information: Finally, if your old URLs redirect to your new site using HTTP 301 (permanent) redirects, our crawler will know to use the new URL. Changes made in this way will take 6-8 weeks to be reflected in Google. So it looks like the googlebot *will* react correctly to 301-style replies. jens From tseaver at zope.com Sat Aug 7 12:02:10 2004 From: tseaver at zope.com (Tres Seaver) Date: Sat Aug 7 12:03:45 2004 Subject: [Zope-CMF] Re: Document body extraction even with plain text: Bug or policy? In-Reply-To: <85E21427-E872-11D8-ABC7-000D9368D272@dataflake.org> References: <85E21427-E872-11D8-ABC7-000D9368D272@dataflake.org> Message-ID: <4114FD02.9060607@zope.com> Jens Vagelpohl wrote: > http://zope.org/Collectors/CMF/214 > > Is the fact that *any* document, even one that explicitly had its format > set to something other than "html", gets checked for HTML content and > its body extracted? I can't remember if there was some specific policy > decided on or if it's just an oversight that can be remedied as > described in the issue. As long as the "document_view" moethod HTML quotes the text (if / when rendered inside the CMS), it should be OK to leave it in place. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From k_vertigo at objectrealms.net Sat Aug 7 20:43:42 2004 From: k_vertigo at objectrealms.net (Kapil Thangavelu) Date: Sat Aug 7 20:44:20 2004 Subject: [Zope-CMF] how to check whether an object is in a catalog In-Reply-To: <41145837.4000608@redcor.ch> References: <41145837.4000608@redcor.ch> Message-ID: <1091925822.3918.3.camel@hermes.objectrealms.net> if catalog.getrid( '/'.join(object.getPhysicalPath() ): return 'cataloged' return 'not cataloged' On Sat, 2004-08-07 at 00:19, robert rottermann wrote: > Hi there, > is there a way to check whether an object is indexed? > > I would like to dump the state of an object to disk. One of an objects > attributes is the fact whether it is indexed or not. > > I thougth of using a catalog search like > portal_catalog(path="/".join(list(obj.getPhysicalPath())), id=oj.getId()) > > But this not general since I do not know for sure whether there is a > path index. And it seems rather expensive. From y.2004_ at wcm-solutions.de Sun Aug 8 08:55:54 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 8 08:59:47 2004 Subject: [Zope-CMF] Re: Document body extraction even with plain text: Bug or policy? In-Reply-To: <4114FD02.9060607@zope.com> References: <85E21427-E872-11D8-ABC7-000D9368D272@dataflake.org> <4114FD02.9060607@zope.com> Message-ID: <411622DA.8000202@wcm-solutions.de> Hi! Tres Seaver wrote: > Jens Vagelpohl wrote: > >> http://zope.org/Collectors/CMF/214 >> >> Is the fact that *any* document, even one that explicitly had its >> format set to something other than "html", gets checked for HTML >> content and its body extracted? I can't remember if there was some >> specific policy decided on or if it's just an oversight that can be >> remedied as described in the issue. > > > As long as the "document_view" moethod HTML quotes the text (if / when > rendered inside the CMS), it should be OK to leave it in place. At the first glance I also thought this could be a security issue. But while bodyfinder removes *some* nasty tags, it does not really produce safer / cleaner html code. CookedBody() returns HTML quoted text as long as text_format is not set to something else than 'plain'. setFormat() currently fails to update cooked_text, so even if the text_format is changed to 'html' using the metadata edit form, HTML is still quoted. CookedBody() with a new stx_level specified re-cooks the body, so in this case text added in 'plain' mode is rendered unquoted after switching to 'structured-text' mode. Conclusions: - I'm fine with resolving issue #214 as proposed. - setFormat() seems to be broken because it fails to trigger re-cooking, leaving the document in an inconsistent state - The skin has to make sure users don't add nasty tags if they are allowed to use 'structured-text' or 'html' mode. It might be necessary to update the validateHTML.py script or scrubHTML to remove header tags. - ftp / webdav PUT does not validate the HTML at all, so only trusted users should be allowed to upload this way. Cheers, Yuppie From gregweb at gmx.ch Sun Aug 8 20:44:15 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Sun Aug 8 20:34:25 2004 Subject: [Zope-CMF] UIDTool changes break stuff... (UIDTool::register unauthorized) In-Reply-To: <1B59DD67-E86D-11D8-ABC7-000D9368D272@dataflake.org> Message-ID: <5.1.0.14.2.20040809024029.03051cd8@127.0.0.1> Thanks Jens, good, you found this error before the beta release! Now register is decaled public which also makes sense! I also added a change to the main_template which ensures that on missing uid handler no exception is raised. Missing functional test :-) Gregoire At 14:27 07.08.2004 +0200, Jens Vagelpohl wrote: >Here's what I get from a fresh CMF portal after I log in with a new >member and just try to view that member's index_html: > >Traceback (innermost last): > Module ZPublisher.Publish, line 101, in publish > Module ZPublisher.mapply, line 88, in mapply > Module ZPublisher.Publish, line 39, in call_object > Module Shared.DC.Scripts.Bindings, line 306, in __call__ > Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec > Module Products.CMFCore.FSPageTemplate, line 195, in _exec > Module Products.CMFCore.FSPageTemplate, line 121, in pt_render > Module Products.PageTemplates.PageTemplate, line 96, in pt_render > - /portal/Members/jens/index_html> > Module TAL.TALInterpreter, line 189, in __call__ > Module TAL.TALInterpreter, line 233, in interpret > Module TAL.TALInterpreter, line 670, in do_useMacro > Module TAL.TALInterpreter, line 233, in interpret > Module TAL.TALInterpreter, line 408, in do_optTag_tal > Module TAL.TALInterpreter, line 393, in do_optTag > Module TAL.TALInterpreter, line 388, in no_tag > Module TAL.TALInterpreter, line 233, in interpret > Module TAL.TALInterpreter, line 636, in do_condition > Module TAL.TALInterpreter, line 233, in interpret > Module TAL.TALInterpreter, line 459, in do_setLocal_tal > Module Products.PageTemplates.TALES, line 221, in evaluate > - URL: file:CMFDefault/skins/zpt_generic/main_template.pt > - Line 306, Column 2 > - Expression: > - Names: > {'container': , > 'context': , > 'default': 0x235a508>, > 'here': , > 'loop': , > 'modules': >0x234bb48>, > 'nothing': None, > 'options': {'args': ()}, > 'repeat': , > 'request': URL=http://127.0.0.1:8080/portal/Members/jens/index_html/ document_view>, > 'root': , > 'template': /portal/Members/jens/index_html>, > 'traverse_subpath': [], > 'user': jens} > Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ > - __traceback_info__: uidtool.register(here) > Module Python expression "uidtool.register(here)", line 1, in > >Unauthorized: You are not allowed to access 'register' in this context > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From y.2004_ at wcm-solutions.de Mon Aug 9 07:15:39 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Mon Aug 9 07:17:28 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <5.1.0.14.2.20040806231717.02d661c0@127.0.0.1> References: <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <5.1.0.14.2.20040806174420.01fa0008@127.0.0.1> <41139898.7070100@wcm-solutions.de> <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <5.1.0.14.2.20040806182834.027d1ec0@127.0.0.1> <4113BBE7.20305@nuxeo.com> <5.1.0.14.2.20040806192506.01f24e90@127.0.0.1> <4113ED6A.2070208@yahoo.de> <5.1.0.14.2.20040806231717.02d661c0@127.0.0.1> Message-ID: <41175CDB.1060102@wcm-solutions.de> Hi! Gregoire Weber wrote: >>I belive that redirecting is not in the spirit of permalinks. >> >>Recommended reading: >> >>Cool URIs don't change (TBL) >> > > > Well, this was a compromise reading Florents arguments. > For the beta I'll implement cool URIs. > > Reasons: > > - they're cool > - I'm lazy == it's easier to implement > - Florent will surely be able to alter the behaviour for his customers > - it's late in the evening and it gets even later and I don't have time > till next wednesday evening when the beta happened > - those objecting may change the code while I'll not be able to change > it back :-) I had a closer look at the permalink stuff. And I don't think this idea is mature enough to ship permalinks with CMF 1.5. - Permalinks should have speaking names, not numbers. - Permalinks should point to the primary location of the object. Combined with a centralized content repository they make more sense. - Implementing permalinks as aliases causes a lot of problems: o do search engines index both locations? o do relative links work? o is the navigation consistent? >>I've written an 'archive' script, this is how I return the view of the object: >> >> o = brain.getObject() >> type = brain.Type >> method = ttool[type].getActionById('view') >> method = getattr(o, method) >> return method() > > Thanks! This way I don't have to think on my own about it! This is the old way to do it. The CMF 1.5 way looks like this: ... ti = obj.getTypeInfo() method = ti.getMethodPath('view')[0] ... And BTW: tal:on-error is a bare except! Cheers, Yuppie From gregweb at gmx.ch Mon Aug 9 09:09:30 2004 From: gregweb at gmx.ch (=?ISO-8859-1?Q?=22Gr=E9goire_Weber=22?=) Date: Mon Aug 9 09:09:36 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! References: <41175CDB.1060102@wcm-solutions.de> Message-ID: <24474.1092056970@www14.gmx.net> Hi Yvo, > I had a closer look at the permalink stuff. And I don't think this idea > is mature enough to ship permalinks with CMF 1.5. > > - Permalinks should have speaking names, not numbers. > > - Permalinks should point to the primary location of the object. > Combined with a centralized content repository they make more sense. > > - Implementing permalinks as aliases causes a lot of problems: > > o do search engines index both locations? > > o do relative links work? > > o is the navigation consistent? I know. I'd liked to expose the unique id functionality a little bit. That's why I introduced the permalink feature. The question is if this is the right name. > This is the old way to do it. The CMF 1.5 way looks like this: > > ... > ti = obj.getTypeInfo() > method = ti.getMethodPath('view')[0] > ... ok > And BTW: tal:on-error is a bare except! I know and I don't like it neither. It's to catch exceptions if someone did not to install CMFUid. How to proceed? Shall the changes be reverted? I personally would like people to see the new functionality. I'm here on a modem. I'll check e-mail at 20:00 (european time). I can act if I hear something till then! Gregoire -- NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl From y.2004_ at wcm-solutions.de Mon Aug 9 12:18:42 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Mon Aug 9 12:19:51 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <24474.1092056970@www14.gmx.net> References: <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> Message-ID: <4117A3E2.4040209@wcm-solutions.de> Hi! Gr?goire Weber wrote: >>I had a closer look at the permalink stuff. And I don't think this idea >>is mature enough to ship permalinks with CMF 1.5. >> >>- Permalinks should have speaking names, not numbers. >> >>- Permalinks should point to the primary location of the object. >>Combined with a centralized content repository they make more sense. >> >>- Implementing permalinks as aliases causes a lot of problems: >> >> o do search engines index both locations? >> >> o do relative links work? >> >> o is the navigation consistent? > > > I know. I'd liked to expose the unique id functionality a little bit. > That's why I introduced the permalink feature. The question is if this > is the right name. It's the Right Thing to expose framework functionality in CMFDefault. This way the features are better tested (the permalink feature helped to find the Unauthorized bug) and people can see how to use them. The problem with CMFUid is that its function is to work in the background. IMHO the changes in Favorite are a much better example of how to use CMFUid. >>This is the old way to do it. The CMF 1.5 way looks like this: >> >>... >>ti = obj.getTypeInfo() >>method = ti.getMethodPath('view')[0] >>... > > > ok > > >>And BTW: tal:on-error is a bare except! > > > I know and I don't like it neither. It's to catch exceptions > if someone did not to install CMFUid. Did tal:condition="python: uidtool and not isFolderish" of your first checkin not do that job? > How to proceed? Shall the changes be reverted? I personally > would like people to see the new functionality. > > I'm here on a modem. I'll check e-mail at 20:00 (european time). > I can act if I hear something till then! I don't think this is urgent, changing this after the beta release should be fine. This gives us more time to think about a better solution. Just my 2 cents. Yuppie From chris at simplistix.co.uk Mon Aug 9 17:33:20 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Mon Aug 9 17:33:33 2004 Subject: [Zope-CMF] Re: Initial checkin of CMFUid (unique ids) and example usage diff for CMFDefault.Favorite In-Reply-To: <16641.20809.410019.595561@gargle.gargle.HOWL> References: <40FBE8E4.6020504@wcm-solutions.de> <40F66350.3080005@wcm-solutions.de> <40F72235.4000104@zope.com> <40F8070F.8020008@wcm-solutions.de> <40F81B10.8020908@zope.com> <40FBD498.2000706@wcm-solutions.de> <40FBDC66.5030003@zope.com> <5.1.0.14.2.20040721062337.02bae750@127.0.0.1> <40FE7410.7040604@zope.com> <40FF8351.6060805@simplistix.co.uk> <16640.5088.745452.450611@gargle.gargle.HOWL> <4100E053.9070809@simplistix.co.uk> <16641.20809.410019.595561@gargle.gargle.HOWL> Message-ID: <4117EDA0.6000703@simplistix.co.uk> Jim, any comment on this? Chris Dieter Maurer wrote: > Chris Withers wrote at 2004-7-23 10:54 +0100: > >>Dieter Maurer wrote: >> >>>Jim proposed a new ZODB concept "Multidatabases". >>>With it, storage level UIDs might be implemented. >>>But, "Multi databases" is not yet implemented... >> >>What happened to the proposal? > > > It might get implemented for ZODB 3.3/Zope 2.8. > But as mounting works again, it might get implemented later... > -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From chris at simplistix.co.uk Mon Aug 9 17:37:57 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Mon Aug 9 17:38:07 2004 Subject: [Zope-CMF] Re: [dev] Actions: lazy dict not working with DTML? In-Reply-To: <41124438.70606@wcm-solutions.de> References: <410E6A20.6070005@wcm-solutions.de> <16655.58020.872545.728912@gargle.gargle.HOWL> <4110AA88.2010900@wcm-solutions.de> <16657.23976.166211.714363@gargle.gargle.HOWL> <41124438.70606@wcm-solutions.de> Message-ID: <4117EEB5.6070406@simplistix.co.uk> yuppie wrote: > Thanks for the hint! I made a new checkin based on UserDict and > everything seems to work now. > > BTW: UserDict is deprecated, but that should be a minor issue. Yeah, you should be subclassing dict, but that's not a good idea until Zope 2.8... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From ben.j.dawson at gsk.com Tue Aug 10 05:23:37 2004 From: ben.j.dawson at gsk.com (ben.j.dawson@gsk.com) Date: Tue Aug 10 05:24:04 2004 Subject: [Zope-CMF] Customising the CMF Message-ID: Hi all, I'm a complete newbie to Zope and CMF, so please bear with me... I'm trying to design a content management site as part of a work project which can be used by my colleagues to collaborate with each other and to share documents over our Intranet site. I'm planning on using the CMF and customising it so that it suits our needs and so far I've been very impressed with what it has to offer. As part of the design, I need to give all users access to a global folder and also enable individual users to grant access to their own folders and documents to other users of their choice. I also need to add all kinds of other functionality to it, such as making the system send an email to certain people when a user adds a document to the site as well as having several forums. Is this going to be a possibility with the CMF? Could anyone point me in the direction of documentation that explains how I can customise the CMF to our needs? I've read ZWACK chapter 5 at the CMF Dogbowl which is good, but doesn't really go into enough detail for what I require. I've never touched DTML or Python before, but I'm assuming it would be important to learn these? Any pointers would be appreciated. Cheers, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope-cmf/attachments/20040810/9005876e/attachment.htm From andrew at logicalprogression.net Tue Aug 10 08:52:48 2004 From: andrew at logicalprogression.net (Andrew Veitch) Date: Tue Aug 10 08:52:14 2004 Subject: [Zope-CMF] Customising the CMF In-Reply-To: References: Message-ID: <2EEDF6A8-EACC-11D8-AC11-000D9329A36C@logicalprogression.net> Hi Ben I'd recommend you go with one of the Content Management Systems based on the CMF such as Plone. That'll save time and give you ready access to forums, etc. On the question of mailing out when a document is added I'd use DCWorkflow and a script. You can access this through the portal_workflow tool. There's really good docs for DCWorkflow if you do a Google. Andrew > As part of the design, I need to give all users access to a global > folder and also enable individual users to grant access to their own > folders and documents to other users of their choice. I also need to > add all kinds of other functionality to it, such as making the system > send an email to certain people when a user adds a document to the > site as well as having several forums. > > Is this going to be a possibility with the CMF? Could anyone point me > in the direction of documentation that explains how I can customise > the CMF to our needs? I've read ZWACK chapter 5 at the CMF Dogbowl > which is good, but doesn't really go into enough detail for what I > require. I've never touched DTML or Python before, but I'm assuming it > would be important to learn these? > > Any pointers would be appreciated. Cheers, > > Ben_______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > -- Logical Progression Ltd, 20 Forth Street, Edinburgh EH1 3LH, UK Tel: +44 (0)131 550 3733 Web: http://www.logicalprogression.net/ From regebro at nuxeo.com Tue Aug 10 09:01:28 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Tue Aug 10 09:01:33 2004 Subject: [Zope-CMF] Customising the CMF In-Reply-To: References: Message-ID: <4118C728.6060705@nuxeo.com> ben.j.dawson@gsk.com wrote: > Is this going to be a possibility with the CMF? Absolutely. > Could anyone point me in > the direction of documentation that explains how I can customise the CMF > to our needs? I've read ZWACK chapter 5 at the CMF Dogbowl which is > good, but doesn't really go into enough detail for what I require. I's recommend you to start with a finished CMF instead of building one from scratch. CPS (http://zope.org/Members/nuxeo/Products/CPS3) and Plone (http://www.plone.org/) are good places to start. > I've > never touched DTML or Python before, but I'm assuming it would be > important to learn these? Probably. From tseaver at zope.com Tue Aug 10 09:42:02 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 10 09:44:04 2004 Subject: [Zope-CMF] Hotfix-20040807 Released Message-ID: <4118D0AA.2060705@zope.com> Overview This hotfix addresses a security issue reported in CMF Collector #259 (http://zope.org/Collectors/CMF/259). This issue concerns a defective privilege check in the OFS.CopySupport module, which may permit unprivilieged (but authenticated) users of a site to move content into a folder under their control. Affected Versions This issue affects Zope version 2.7.2 and earlier, and has been resolved for Zope version 2.7.3 and later. Users of affected Zope versions should remove the hotfix after upgrading to version 2.7.3 or later. The hotfix has been tested against 2.6.x versions of Zope as well. Getting the Hotfix The hotfix product is available from the "zope.org site", http://zope.org/Products/Zope/Hotfix-200400807/Hotfix-20040807 - "Unix tarball", http://zope.org/Products/Zope/Hotfix-200400807/Hotfix-20040807/Hotfix-20040807.tar.gz - "Windows zipfile", http://zope.org/Products/Zope/Hotfix-200400807/Hotfix-20040807/Hotfix-20040807.zip - "README.txt", http://zope.org/Products/Zope/Hotfix-200400807/README.txt Installation To install the hotfix, unpack the tarball / zip file into the 'Products' directory of your site's INSTANCE_HOME, and then restart your Zope application server. For example, if on your system, the Zope software is installed in '/opt/lib/zope2.7', and your instance is in '/var/lib/zope':: # cd /var/lib/zope/Products # tar xzf /tmp/Hotfix-20040807.tar.gz # ../bin/zopectl restart Removal To remove the hotfix after upgrading Zope to version 2.7.3 or later, simply remove the product folder and restart the application server. For example, for the same setup:: # cd /var/lib/zope/Products # rm -r Hotfix-20040807 # ../bin/zopectl restart Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Tue Aug 10 09:47:55 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 10 09:49:31 2004 Subject: [Zope-CMF] Re: Customising the CMF In-Reply-To: References: Message-ID: <4118D20B.3010105@zope.com> ben.j.dawson@gsk.com wrote: > I'm a complete newbie to Zope and CMF, so please bear with me... > > I'm trying to design a content management site as part of a work project > which can be used by my colleagues to collaborate with each other and to > share documents over our Intranet site. > > I'm planning on using the CMF and customising it so that it suits our > needs and so far I've been very impressed with what it has to offer. > > As part of the design, I need to give all users access to a global folder > and also enable individual users to grant access to their own folders and > documents to other users of their choice. That functionality is already in the default CMF: see the "Local roles" action of any folder. > I also need to add all kinds of > other functionality to it, such as making the system send an email to > certain people when a user adds a document to the site Investigate DCWorkflow, which allows you to do arbitrary actions during "tranisitions" in the workflow state graph. > as well as having several forums. There are a number of add on products for doing forums within the CMF. > Is this going to be a possibility with the CMF? Yes, definitely. > Could anyone point me in > the direction of documentation that explains how I can customise the CMF > to our needs? I've read ZWACK chapter 5 at the CMF Dogbowl which is good, > but doesn't really go into enough detail for what I require. I've never > touched DTML or Python before, but I'm assuming it would be important to > learn these? I would recommend learning Zope Page Templates in place of DTML; ZPT has replaced DTML for almost all "current" web page templating. You are definitely well off knowing Python as well. > Any pointers would be appreciated. Cheers, Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From r.ritz at biologie.hu-berlin.de Tue Aug 10 10:20:53 2004 From: r.ritz at biologie.hu-berlin.de (Raphael Ritz) Date: Tue Aug 10 10:21:07 2004 Subject: [Zope-CMF] Re: Customising the CMF In-Reply-To: References: Message-ID: ben.j.dawson@gsk.com wrote: [...] > > Any pointers would be appreciated. Cheers, > See the Zope book for background info on Zope in general and security handling in particular http://www.plope.com/Books/2_7Edition/view Note that for the CMF you should also understand now to use and customize the workflow (look for DCWorkflow and its docs). Even if you are not using Plone (which is build on top of CMF) you might benefit from looking at Andy McKay's recent book. Most parts (currently chapters 2-9) are availble free of charge from SourceForge http://cvs.sourceforge.net/viewcvs.py/plone-docs/PloneBook/ (chapters 8 and 9 might be of particualr interest to you). Finally, my MySite tutorial may also give you some insights (don't be turned away by the fact that it's written for Plone; it covers Zope/CMF to some extend as well) http://www.neuroinf.de/LabTools/MySite Raphael From ben.j.dawson at gsk.com Wed Aug 11 09:00:37 2004 From: ben.j.dawson at gsk.com (ben.j.dawson@gsk.com) Date: Wed Aug 11 09:01:06 2004 Subject: [Zope-CMF] Customising the CMF In-Reply-To: <2EEDF6A8-EACC-11D8-AC11-000D9329A36C@logicalprogression.net> Message-ID: Many thanks for the replies. I've now installed Plone and am in the process of configuring it. This seems like a much simpler option than customising the CMF and I'm happy that it avoids having to trawl through all the CMF files to see how they all fit together. Thanks - I appreciate the pointers. Ben "Andrew Veitch" 10-Aug-2004 13:52 To ben.j.dawson@gsk.com cc zope-cmf@mail.zope.org Subject Re: [Zope-CMF] Customising the CMF Hi Ben I'd recommend you go with one of the Content Management Systems based on the CMF such as Plone. That'll save time and give you ready access to forums, etc. On the question of mailing out when a document is added I'd use DCWorkflow and a script. You can access this through the portal_workflow tool. There's really good docs for DCWorkflow if you do a Google. Andrew > As part of the design, I need to give all users access to a global > folder and also enable individual users to grant access to their own > folders and documents to other users of their choice. I also need to > add all kinds of other functionality to it, such as making the system > send an email to certain people when a user adds a document to the > site as well as having several forums. > > Is this going to be a possibility with the CMF? Could anyone point me > in the direction of documentation that explains how I can customise > the CMF to our needs? I've read ZWACK chapter 5 at the CMF Dogbowl > which is good, but doesn't really go into enough detail for what I > require. I've never touched DTML or Python before, but I'm assuming it > would be important to learn these? > > Any pointers would be appreciated. Cheers, > > Ben_______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > -- Logical Progression Ltd, 20 Forth Street, Edinburgh EH1 3LH, UK Tel: +44 (0)131 550 3733 Web: http://www.logicalprogression.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope-cmf/attachments/20040811/13a5c9f6/attachment.htm From tseaver at zope.com Wed Aug 11 20:41:38 2004 From: tseaver at zope.com (Tres Seaver) Date: Wed Aug 11 20:43:12 2004 Subject: [Zope-CMF] CMF 1.4.7 Released Message-ID: <411ABCC2.3000705@zope.com> Annoucement Zope Corporation is pleased to announce the release of version 1.4.7 of the Zope Content Management Framework (CMF). This release consists primarily of bug fixes for version 1.4, released in April, 2003. Because one of the bugs fixed is security-related (see http://zope.org/Collectors/CMF/259), we recommend that all users of CMF 1.4.6 and earlier upgrade to this version. What is the CMF? The Zope Content Management Framework provides a set of services and content objects useful for building highly dynamic, content-oriented portal sites. As packaged, the CMF generates a site much like the Zope.org site. The CMF is intended to be easily customizable, in terms of both the types of content used and the policies and services it provides. Where do I get it? Download it from "cmf.zope.org", http://zope.org/Products/CMF/CMF-1.4.7 Points of interest include: - "Windows ZIP file", http://zope.org/Products/CMF/CMF-1.4.7/CMF-1.4.7.zip - "Unix tar/gzip archive", http://zope.org/Products/CMF/CMF-1.4.7/CMF-1.4.7.tar.gz . - "Release notes", http://zope.org/Products/CMF/CMF-1.4.7/README.txt - "Change history", http://zope.org/Products/CMF/CMF-1.4.7/CHANGES.txt - "Installation instructions", http://zope.org/Products/CMF/CMF-1.4.7/INSTALL.txt Where do I go to learn more? The "CMF mailing list":mailto:zope-cmf@zope.org has many participants who are active in supporting the CMF. ...to report bugs? The "CMF Collector":http://zope.org/Collectors/CMF is ths place to report bugs (please search for existing reports of your issue first!) Bug Fixes in 1.4.7 - See the "change history", http://zope.org/Products/CMF/CMF-1.4.7/CHANGES.txt for the bugs fixed in this release. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From jens at dataflake.org Thu Aug 12 06:09:34 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Thu Aug 12 06:09:45 2004 Subject: [Zope-CMF] CMF License Message-ID: Tres et all, Wouldn't the release of 1.5 be a good point for putting CMF under the new ZPL 2.1? I'd volunteer to make all necessary changes. jens From y.2004_ at wcm-solutions.de Thu Aug 12 07:19:21 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 12 07:22:32 2004 Subject: [Zope-CMF] life after the shutdown of cmf.zope.org Message-ID: <411B5239.7000307@wcm-solutions.de> Hi! On the front page of zope.org there are links to The README.txt of CMF 1.4.7 and HEAD still points to I think CMF needs - a new home at zope.org - a redirect from cmf.zope.org to its new home - new links everywhere Cheers, Yuppie From y.2004_ at wcm-solutions.de Thu Aug 12 07:50:19 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 12 07:51:03 2004 Subject: [Zope-CMF] Re: CMF License In-Reply-To: References: Message-ID: <411B597B.5080108@wcm-solutions.de> Jens Vagelpohl wrote: > Wouldn't the release of 1.5 be a good point for putting CMF under the > new ZPL 2.1? I'd volunteer to make all necessary changes. +1 While you are at that, could you please add the missing period at the end of the copyright headers? That should not be much extra work. - # FOR A PARTICULAR PURPOSE + # FOR A PARTICULAR PURPOSE. Cheers, Yuppie From fg at nuxeo.com Thu Aug 12 09:12:33 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Thu Aug 12 09:12:42 2004 Subject: [Zope-CMF] Re: CMF 1.5 beta coming -- last call before feature freeze! In-Reply-To: <41175CDB.1060102@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <4113A03E.6000707@zope.com> <4113BBE7.20305@nuxeo.com> <4113ED6A.2070208@yahoo.de> <5.1.0.14.2.20040806231717.02d661c0@127.0.0.1> Message-ID: <20040812131222.GA16245@flo.in.nuxeo.com> In article <41175CDB.1060102@wcm-solutions.de> you write: > > And BTW: tal:on-error is a bare except! Urgh, good catch. I'll ask on zope-dev if there's any opposition to reraising any ConflictError in TALInterpreter::do_onError_tal. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From tseaver at zope.com Thu Aug 12 09:40:19 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 12 09:42:13 2004 Subject: [Zope-CMF] Re: CMF License In-Reply-To: References: Message-ID: <411B7343.4080906@zope.com> Jens Vagelpohl wrote: > Wouldn't the release of 1.5 be a good point for putting CMF under the > new ZPL 2.1? I'd volunteer to make all necessary changes. Sounds fine. I'd like to make the beta (and its branch) tomorrow; will you be able to change the HEAD by then? Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From jens at dataflake.org Thu Aug 12 11:11:08 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Thu Aug 12 11:11:23 2004 Subject: [Zope-CMF] CMF License In-Reply-To: References: Message-ID: OK, all done - get ready for some major noise from the checkins list... jens On Aug 12, 2004, at 12:09, Jens Vagelpohl wrote: > Tres et all, > > Wouldn't the release of 1.5 be a good point for putting CMF under the > new ZPL 2.1? I'd volunteer to make all necessary changes. > > jens > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests From tseaver at zope.com Thu Aug 12 19:30:13 2004 From: tseaver at zope.com (Tres Seaver) Date: Thu Aug 12 19:31:42 2004 Subject: [Zope-CMF] CMF 1.5.0beta Released Message-ID: <411BFD85.5050305@zope.com> Announcement Zope Corporation is pleased to announce the release of version 1.5.0beta of the Zope Content Management Framework (CMF). This release is intended for testing purposes only; we do not recommend deploying it to production servers. The final release of version 1.5.0 is expected by September 6th. What is the CMF? The Zope Content Management Framework provides a set of services and content objects useful for building highly dynamic, content-oriented portal sites. As packaged, the CMF generates a site much like the Zope.org site. The CMF is intended to be easily customizable, in terms of both the types of content used and the policies and services it provides. Where do I get it? Download it from "http://zope.org/Products/CMF/CMF-1.5.0beta", http://zope.org/Products/CMF/CMF-1.5.0beta Points of interest include: - "Windows ZIP file", http://zope.org/Products/CMF/CMF-1.5.0beta/CMF-1.5.0beta.zip - "Unix tar/gzip archive", http://zope.org/Products/CMF/CMF-1.5.0beta/CMF-1.5.0beta.tar.gz . - "Release notes", http://zope.org/Products/CMF/CMF-1.5.0beta/README.txt - "Change history", http://zope.org/Products/CMF/CMF-1.5.0beta/CHANGES.txt - "Installation instructions", http://zope.org/Products/CMF/CMF-1.5.0beta/INSTALL.txt Where do I go to learn more? The "CMF mailing list":mailto:zope-cmf@zope.org has many participants who are active in supporting the CMF. ...to report bugs? The "CMF Collector":http://zope.org/Collectors/CMF is ths place to report bugs (please search for existing reports of your issue first!) New Features in 1.5.0 beta - CMF 1.5 requires Zope 2.7.0 or later. - CMFActionIcons product is now shipped as part of the CMF release. - The new CMFUid product allows content objects to be labeled with a UID. The Favorite type now exploits this feature to track the target objects when moved. - New portal_setup tool provides export / import of various site configuration choices, both as tarballs and as TTW "snapshots". - Extended UI for site managers to create / review / delete members. - Method aliases ease localization / rationalization of action URLs. - ZPT skins no longer depend on older DTML skin directories. - See the "change history", http://zope.org/Products/CMF/CMF-1.5.0beta/CHANGES.txt for a complete listing of new features added and bugs fixed in this release. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Fri Aug 13 10:24:01 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 13 10:25:25 2004 Subject: [Zope-CMF] [dev] After the goldrush.... Message-ID: Some developer housekeeping / groundrule reminder stuff might be in order. - Last night, I created a new release branch, 'CMF-1_5-branch', which should be considered the new "supported" branch. - The 'CMF-1_4-branch' joins the ranks of "no longer active" release branches; please don't commit changes there unless: o you plan to volunteer to shepherd a release; o you persuade me that you have identified a security issue important enough to make another 1.4.x release urgent. I particularly want the 1.4 branch to be ultra-stable so that *if* a security-related issue comes up, we can make a release quickly without worrying about unintended consequences. - I would like to do another CMF bug day before the final release. Since "last Friday of the month" is already teed up for Zope, we could either piggyback that date (27 August) or avoid it (e.g., 3 September). Opinions? - New features should go in on the HEAD, unless you persuade me / the community that the lack of the feature is really a bug. ;). CHANGES.txt for the branch would ideally show only bugfixes from this point forward. - Please check bugfixes in on both the HEAD and the 'CMF-1_5-branch', and add them only to 'CHANGES.txt' on the branch. Debate on any of this is, of course, in order. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From dmitry at athabascau.ca Fri Aug 13 12:43:46 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Fri Aug 13 12:43:52 2004 Subject: [Zope-CMF] [dev] After the goldrush.... In-Reply-To: References: Message-ID: <200408131043.47685.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 13, 2004 08:24 am, Tres Seaver wrote: > Some developer housekeeping / groundrule reminder stuff might be in order. > > - Last night, I created a new release branch, 'CMF-1_5-branch', which > should be considered the new "supported" branch. > > - The 'CMF-1_4-branch' joins the ranks of "no longer active" release > branches; please don't commit changes there unless: Silly question: how much API changed in 1.5 since 1.4 in terms of broken applications? Any forseen problems? I'm going to put together 1.5b with all the software I need but just in case I wouldn't test all the features it'll be usefull to know. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBHO/CyDrVuGfS98QRAsXvAJ41uQTIQpRYpt+jav/oZgKo2bst0wCgrpy/ ft2yKhIWCkdBBG4ObsVsUWk= =ydRF -----END PGP SIGNATURE----- From dmitry at athabascau.ca Fri Aug 13 12:43:46 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Fri Aug 13 12:43:53 2004 Subject: [Zope-CMF] [dev] After the goldrush.... In-Reply-To: References: Message-ID: <200408131043.47685.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 13, 2004 08:24 am, Tres Seaver wrote: > Some developer housekeeping / groundrule reminder stuff might be in order. > > - Last night, I created a new release branch, 'CMF-1_5-branch', which > should be considered the new "supported" branch. > > - The 'CMF-1_4-branch' joins the ranks of "no longer active" release > branches; please don't commit changes there unless: Silly question: how much API changed in 1.5 since 1.4 in terms of broken applications? Any forseen problems? I'm going to put together 1.5b with all the software I need but just in case I wouldn't test all the features it'll be usefull to know. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBHO/CyDrVuGfS98QRAsXvAJ41uQTIQpRYpt+jav/oZgKo2bst0wCgrpy/ ft2yKhIWCkdBBG4ObsVsUWk= =ydRF -----END PGP SIGNATURE----- From chris at simplistix.co.uk Fri Aug 13 12:43:51 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Fri Aug 13 12:44:04 2004 Subject: [Zope-CMF] [dev] After the goldrush.... In-Reply-To: References: Message-ID: <411CEFC7.90307@simplistix.co.uk> Tres Seaver wrote: > > - I would like to do another CMF bug day before the final release. > Since "last Friday of the month" is already teed up for Zope, we > could either piggyback that date (27 August) or avoid it (e.g., > 3 September). Opinions? I'm currently teeing up Fri 3rd for the Zope one, since I'm hoping both Andreas and myself will be back in our respective countries by then... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From jens at dataflake.org Fri Aug 13 13:16:31 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Fri Aug 13 13:16:43 2004 Subject: [Zope-CMF] [dev] After the goldrush.... In-Reply-To: References: Message-ID: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> > - I would like to do another CMF bug day before the final release. > Since "last Friday of the month" is already teed up for Zope, we > could either piggyback that date (27 August) or avoid it (e.g., > 3 September). Opinions? +0 (Both dates are fine by me) > - Please check bugfixes in on both the HEAD and the 'CMF-1_5-branch', > and add them only to 'CHANGES.txt' on the branch. They should not be noted in CHANGES.txt on the HEAD if they end up there? jens From tseaver at zope.com Fri Aug 13 16:07:56 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 13 16:09:24 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> Message-ID: <411D1F9C.3050206@zope.com> Jens Vagelpohl wrote: >> - I would like to do another CMF bug day before the final release. >> Since "last Friday of the month" is already teed up for Zope, we >> could either piggyback that date (27 August) or avoid it (e.g., >> 3 September). Opinions? > > > +0 (Both dates are fine by me) Let's try for the 3rd then, in conjunction with the Zope bug day. >> - Please check bugfixes in on both the HEAD and the 'CMF-1_5-branch', >> and add them only to 'CHANGES.txt' on the branch. > > > They should not be noted in CHANGES.txt on the HEAD if they end up there? That is a good question. One of the things I want to do before the final release is weed out the duplicates in CHANGES.txt and HISTORY.txt. Maybe it makes most sense to continue recording the duplicates on the HEAD, just as a confirmation that the forward-port did occur. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From joel at joelburton.com Fri Aug 13 23:50:46 2004 From: joel at joelburton.com (Joel Burton) Date: Fri Aug 13 23:51:31 2004 Subject: [Zope-CMF] WorkflowMethod wrapper for Event/edit breaks XMLRPC Message-ID: <411D8C16.80403@joelburton.com> While trying to write an XMLRPC script that creates and edits both News and Event types, I tripped across a piece of the broken WorkflowMethod machinery. Event.edit() is workflow-method wrapped. NewsItems.edit() is not. News items are editable via XMLRPC, Events are not. ZPublisher/mapply.py, in mapply, checks for and uses func_code for the function called. Since Event.edit is wrapped, and doesn't expose it's func_code (it's on the ._m attribute, which is the actual method), mapply raises an exception that func_code can't be found. (I believe there were similar problems with WebDAV not playing well with WorkflowMethods) There seem to be a few possibilities: 1. Have the few pieces in CMFDefault that wrap edit have alternate, unwrapped edit functions. Then these could be called from XMLRPC. 2. Put a check in mapply that, if it can import WorkflowMethod, and object is of the class WorkflowMethod, uses the real method in _m. 3. Expose func_code in wrapped methods (not sure if this is feasible). 4. Remove the wrapping of edit on things in CMFDefault/CMFCalendar. I don't run the server I'm trying to execute XMLRPC on (actually, it's zope.org and plone.org!) so #1 seems unlikely, and a bad fix anyway. #2-4 seem better options. Is anyone using WorkflowMethods on CMFDefault stuff? They're inconsistently applied, so it seems unlikely that they're widely used. Any advice on how to proceed would be appreciated. Thanks! - j. From gregweb at gmx.ch Sat Aug 14 01:37:45 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Sat Aug 14 01:28:08 2004 Subject: [Zope-CMF] [dev] After the goldrush.... In-Reply-To: Message-ID: <5.1.0.14.2.20040814073133.02f35008@127.0.0.1> > - I would like to do another CMF bug day before the final release. > Since "last Friday of the month" is already teed up for Zope, we > could either piggyback that date (27 August) or avoid it (e.g., > 3 September). Opinions? Unfortunately I'm definitely not available the 3 september (holidays) and the 27 August I'm preparing departure (so only half available). I'll at least look before CMFUid is in good shape. Gregoire From jens at dataflake.org Sat Aug 14 01:48:46 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sat Aug 14 01:49:05 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411D1F9C.3050206@zope.com> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> <411D1F9C.3050206@zope.com> Message-ID: <9BACF5B8-EDB5-11D8-B91E-000D9368D272@dataflake.org> >>> - Please check bugfixes in on both the HEAD and the >>> 'CMF-1_5-branch', >>> and add them only to 'CHANGES.txt' on the branch. >> They should not be noted in CHANGES.txt on the HEAD if they end up >> there? > > That is a good question. One of the things I want to do before the > final release is weed out the duplicates in CHANGES.txt and > HISTORY.txt. Maybe it makes most sense to continue recording the > duplicates on the HEAD, just as a confirmation that the forward-port > did occur. Yes, let's do that. Who could keep track otherwise? jens From y.2004_ at wcm-solutions.de Sat Aug 14 06:03:35 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sat Aug 14 06:04:27 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <200408131043.47685.dmitry@athabascau.ca> References: <200408131043.47685.dmitry@athabascau.ca> Message-ID: <411DE377.7040900@wcm-solutions.de> Hi! Dmitry S. Makovey wrote: > Silly question: how much API changed in 1.5 since 1.4 in terms of broken > applications? Any forseen problems? I'm going to put together 1.5b with all > the software I need but just in case I wouldn't test all the features it'll > be usefull to know. Some things you should be aware of: - permission changes (_checkPermission now checks for executable owner and proxy roles, DublinCore accessors are now protected by 'View', ...) - exception changes (many string exceptions were replaced by class exceptions, ...) - new Method Aliases: If you are using other Portal Types than those shipped with the release, have a look at the 'Aliases' tab of the Types Tool to see if Method Aliases are set correctly. If you maintain a product with factory_type_informations, make sure to define 'aliases'. If you are using the CMFDefault ZPT skin: - The skin depends on some new / changed / moved Actions. There is currently no easy way to update them. If you install CMFSetup, you can replace *all* old Actions by the new set of default Actions. - If you customized the skin, parts of the skin might be broken. Most other changes should be backwards compatible. You'll see some deprecation warnings if you use products not written for CMF 1.5. As always: Make a backup before the update, read CHANGES.txt. HTH, Yuppie From y.2004_ at wcm-solutions.de Sat Aug 14 06:06:31 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sat Aug 14 06:07:55 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411D1F9C.3050206@zope.com> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> <411D1F9C.3050206@zope.com> Message-ID: <411DE427.5070302@wcm-solutions.de> Tres Seaver wrote: > Jens Vagelpohl wrote: > >>> - I would like to do another CMF bug day before the final release. >>> Since "last Friday of the month" is already teed up for Zope, we >>> could either piggyback that date (27 August) or avoid it (e.g., >>> 3 September). Opinions? >> >> +0 (Both dates are fine by me) > > Let's try for the 3rd then, in conjunction with the Zope bug day. +0 Can't tell if I'll be available at one of these days. >>> - Please check bugfixes in on both the HEAD and the 'CMF-1_5-branch', >>> and add them only to 'CHANGES.txt' on the branch. >> >> They should not be noted in CHANGES.txt on the HEAD if they end up there? > > That is a good question. One of the things I want to do before the > final release is weed out the duplicates in CHANGES.txt and HISTORY.txt. > Maybe it makes most sense to continue recording the duplicates on the > HEAD, just as a confirmation that the forward-port did occur. -1 Unless there is a very good reason I don't like to have different checkin policies for Zope and CMF. Branch and HEAD checkins should be done at the same time, so watching the checkin list it should be easy to spot missing forward-ports. If we change to the new policy: Checkin notes and their order should be identical to allow diffing. Just my 2 cents, Yuppie From y.2004_ at wcm-solutions.de Sat Aug 14 06:13:59 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sat Aug 14 06:15:22 2004 Subject: [Zope-CMF] Re: WorkflowMethod wrapper for Event/edit breaks XMLRPC In-Reply-To: <411D8C16.80403@joelburton.com> References: <411D8C16.80403@joelburton.com> Message-ID: <411DE5E7.9000702@wcm-solutions.de> Joel Burton wrote: > 4. Remove the wrapping of edit on things in CMFDefault/CMFCalendar. +1 If you ask me, the WorkflowMethod machinery is dead unmaintained code. Cheers, Yuppie From heimes at faho.rwth-aachen.de Sat Aug 14 11:34:51 2004 From: heimes at faho.rwth-aachen.de (Christian Heimes) Date: Sat Aug 14 11:34:54 2004 Subject: [Zope-CMF] CMFUid isn't generating real uids Message-ID: Hello everybody! I had a short look at CMFUid because I hoped we could replace the AT uid generator and lookup tool with a more general tool that's also working with non Archtypes types. I was disapointed to shocked as I saw how the uids are generated. It's just an incremental counter which is more likely a very simplistic id generator but not a real uid generator. It's not likely that other portals are using the same uid, it's a FACT because every portal is starting the with id 0. IMO that's not unique. In Archetypes we are also including informations about the machine in the uid to create uuid (universal unique ids). The uuid is created from the local host name, a time stamp, a random value and from abitrary arguments and the output of md5.md5(data).hexdigest() is used as uid. This makes it mathematical nearly impossible to have one uid twice over all cmf based sites on earth. A good uid should follow these rules (from the manual of uuidgen) DESCRIPTION The uuidgen program creates a new universally unique identifier (UUID) using the libuuid(3) library. The new UUID can reasonably be considered unique among all UUIDs created on the local system, and among UUIDs created on other systems in the past and in the future Christian From jmo at ita.chalmers.se Sat Aug 14 11:24:29 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Sat Aug 14 11:37:11 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411DE377.7040900@wcm-solutions.de> References: <200408131043.47685.dmitry@athabascau.ca> <411DE377.7040900@wcm-solutions.de> Message-ID: <411E2EAD.3040502@ita.chalmers.se> yuppie wrote: > Hi! > > > Dmitry S. Makovey wrote: > >> Silly question: how much API changed in 1.5 since 1.4 in terms of >> broken applications? Any forseen problems? I'm going to put together >> 1.5b with all the software I need but just in case I wouldn't test >> all the features it'll be usefull to know. > > > Some things you should be aware of: > > - permission changes (_checkPermission now checks for executable owner > and proxy roles, DublinCore accessors are now protected by 'View', ...) > > - exception changes (many string exceptions were replaced by class > exceptions, ...) > > - new Method Aliases: If you are using other Portal Types than those > shipped with the release, have a look at the 'Aliases' tab of the > Types Tool to see if Method Aliases are set correctly. If you maintain > a product with factory_type_informations, make sure to define 'aliases'. > > > If you are using the CMFDefault ZPT skin: > > - The skin depends on some new / changed / moved Actions. There is > currently no easy way to update them. If you install CMFSetup, you can > replace *all* old Actions by the new set of default Actions. > > - If you customized the skin, parts of the skin might be broken. > > > Most other changes should be backwards compatible. You'll see some > deprecation warnings if you use products not written for CMF 1.5. > > As always: Make a backup before the update, read CHANGES.txt. > > > HTH, Yuppie > Hi! One question: I have a tool based on 'CMFCore.PortalFolder'. The tool does not get listed by 'folder_view' but it gets listed by 'folder_contents' and 'index_html' on the root of the portal. It didn't get listed with CMF1.4 - so what has changed there? Regards /JM From tseaver at zope.com Sat Aug 14 12:03:42 2004 From: tseaver at zope.com (Tres Seaver) Date: Sat Aug 14 12:05:19 2004 Subject: [Zope-CMF] Re: WorkflowMethod wrapper for Event/edit breaks XMLRPC In-Reply-To: <411D8C16.80403@joelburton.com> References: <411D8C16.80403@joelburton.com> Message-ID: <411E37DE.4060806@zope.com> Joel Burton wrote: > While trying to write an XMLRPC script that creates and edits both News > and Event types, I tripped across a piece of the broken WorkflowMethod > machinery. > > Event.edit() is workflow-method wrapped. NewsItems.edit() is not. > News items are editable via XMLRPC, Events are not. > ZPublisher/mapply.py, in mapply, checks for and uses func_code for the > function called. Since Event.edit is wrapped, and doesn't expose it's > func_code (it's on the ._m attribute, which is the actual method), > mapply raises an exception that func_code can't be found. > > (I believe there were similar problems with WebDAV not playing well > with WorkflowMethods) > > There seem to be a few possibilities: > > 1. Have the few pieces in CMFDefault that wrap edit have alternate, > unwrapped edit functions. Then these could be called from XMLRPC. > > 2. Put a check in mapply that, if it can import WorkflowMethod, and > object is of the class WorkflowMethod, uses the real method in _m. > > 3. Expose func_code in wrapped methods (not sure if this is feasible). > > 4. Remove the wrapping of edit on things in CMFDefault/CMFCalendar. > > I don't run the server I'm trying to execute XMLRPC on (actually, it's > zope.org and plone.org!) so #1 seems unlikely, and a bad fix anyway. > #2-4 seem better options. > > Is anyone using WorkflowMethods on CMFDefault stuff? They're > inconsistently applied, so it seems unlikely that they're widely used. > > Any advice on how to proceed would be appreciated. We should rip out WorkflowMethod altogether; it wires policy (when to trigger workflow transitions) into mechanism: for instance, what if you have a "review" workflow which needs to record / react to the fact that a given user has *viewed* a document? A better way to achieve the same goals would be to add an event service, and change the default POST-handler skin methods to publish an IContentChanged event (perhaps we publish events from within view templatse, too?) The Events code is already under ZPL, and in heavy production use: http://cvs.zope.org/Products/Event/ Maybe we should move that code into CMF 1.6. In the meantime, stripping out WorkflowMethod is an obvious bit of cleanup. As a workaround for your current use case, I would recommend using a skin method, rather than the "native" 'edit' method. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Sat Aug 14 13:41:00 2004 From: tseaver at zope.com (Tres Seaver) Date: Sat Aug 14 13:42:23 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411DE427.5070302@wcm-solutions.de> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> <411D1F9C.3050206@zope.com> <411DE427.5070302@wcm-solutions.de> Message-ID: <411E4EAC.4040705@zope.com> yuppie wrote: > Tres Seaver wrote: > >> Jens Vagelpohl wrote: >> >>>> - I would like to do another CMF bug day before the final release. >>>> Since "last Friday of the month" is already teed up for Zope, we >>>> could either piggyback that date (27 August) or avoid it (e.g., >>>> 3 September). Opinions? >>> >>> >>> +0 (Both dates are fine by me) >> >> >> Let's try for the 3rd then, in conjunction with the Zope bug day. > > > +0 > > Can't tell if I'll be available at one of these days. > >>>> - Please check bugfixes in on both the HEAD and the 'CMF-1_5-branch', >>>> and add them only to 'CHANGES.txt' on the branch. >>> >>> >>> They should not be noted in CHANGES.txt on the HEAD if they end up >>> there? >> >> >> That is a good question. One of the things I want to do before the >> final release is weed out the duplicates in CHANGES.txt and >> HISTORY.txt. Maybe it makes most sense to continue recording the >> duplicates on the HEAD, just as a confirmation that the forward-port >> did occur. > > > -1 > > Unless there is a very good reason I don't like to have different > checkin policies for Zope and CMF. > > Branch and HEAD checkins should be done at the same time, so watching > the checkin list it should be easy to spot missing forward-ports. > > If we change to the new policy: Checkin notes and their order should be > identical to allow diffing. > > > Just my 2 cents, Yuppie > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > Here is the "official" policy (that I can find) on CHANGES.txt (from : The path to the file is doc/CHANGES.txt. It lists the changes that have been made to Zope since the last released version. If you're fixing a bug, you only need to add to CHANGES.txt in the branch. If you're adding a feature, you only need to add to CHANGES.txt in the trunk. Brian Lloyd later stitches them together. Although, in fact, this policy is not clearly followed on the main Zope tree, either. I can live with either way, I guess. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From fg at nuxeo.com Sat Aug 14 19:37:02 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Sat Aug 14 19:37:13 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411D1F9C.3050206@zope.com> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> Message-ID: <20040814233702.GA30047@bertha.in.nuxeo.com> In article <411D1F9C.3050206@zope.com> you write: > Jens Vagelpohl wrote: > >> - I would like to do another CMF bug day before the final release. > >> Since "last Friday of the month" is already teed up for Zope, we > >> could either piggyback that date (27 August) or avoid it (e.g., > >> 3 September). Opinions? > > > > > > +0 (Both dates are fine by me) > > Let's try for the 3rd then, in conjunction with the Zope bug day. Ok excellent because the 27th I can't (CPS sprint). Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From k_vertigo at objectrealms.net Sun Aug 15 03:29:38 2004 From: k_vertigo at objectrealms.net (Kapil Thangavelu) Date: Sun Aug 15 03:30:31 2004 Subject: [Zope-CMF] Re: [Plone-developers] Re: CMFUid isn't generating real uids In-Reply-To: References: Message-ID: <1092554978.3503.84.camel@hermes.objectrealms.net> On Sat, 2004-08-14 at 19:47, Jens W. Klein wrote: > FYI: another good ressource about uuid generation: > > http://ftp.ics.uci.edu/pub/ietf/webdav/uuid-guid/draft-leach-uuids-guids-01.txt > > Jensens > and some implementations for python pure python, minor peak depends that are easy to remove. http://cvs.eby-sarna.com/PEAK/src/peak/util/uuid.py?rev=1.14&content-type=text/vnd.viewcvs-markup extension, cross platform, well tested http://cvs.osafoundation.org/viewcvs.cgi/internal/UUIDext/ there's another one (extension) in the collective ticle project but sf viewcvs is dead for me at the moment. cheers, -kapil From jens at dataflake.org Sun Aug 15 03:37:34 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sun Aug 15 03:37:53 2004 Subject: [Zope-CMF] CHANGES.txt (was: After the goldrush....) In-Reply-To: <411E4EAC.4040705@zope.com> References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> <411D1F9C.3050206@zope.com> <411DE427.5070302@wcm-solutions.de> <411E4EAC.4040705@zope.com> Message-ID: > Here is the "official" policy (that I can find) on CHANGES.txt (from : > > The path to the file is doc/CHANGES.txt. It lists the changes that > have been made to Zope since the last released version. > > If you're fixing a bug, you only need to add to CHANGES.txt in the > branch. If you're adding a feature, you only need to add to > CHANGES.txt in the trunk. Brian Lloyd later stitches them together. > > Although, in fact, this policy is not clearly followed on the main > Zope tree, either. I can live with either way, I guess. Hmmmm, I wasn't even aware of such an odd policy. It's much more straightforward, IMHO, to mandate that changes are noted exactly where they are made. Branch or HEAD doesn't matter. Otherwise it is very hard for people looking at the HEAD to find out what has been done and what hasn't. Also, I bet it is even *less* work to weed out duplicates in CHANGES.txt than it is to stitch it all together from branches... yikes. Oh, and yes, I don't think that policy is followed at all on the Zope tree ;) jens From jens at dataflake.org Sun Aug 15 03:39:16 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sun Aug 15 03:39:36 2004 Subject: [Zope-CMF] life after the shutdown of cmf.zope.org In-Reply-To: <411B5239.7000307@wcm-solutions.de> References: <411B5239.7000307@wcm-solutions.de> Message-ID: <35B03FBA-EE8E-11D8-B8A7-000D9368D272@dataflake.org> I'd say all these issues would feel right at home in the CMF collector instead of just an email ;) jens On Aug 12, 2004, at 13:19, yuppie wrote: > Hi! > > > On the front page of zope.org there are links to > > > > > The README.txt of CMF 1.4.7 and HEAD still points to > > > > > I think CMF needs > > - a new home at zope.org > > - a redirect from cmf.zope.org to its new home > > - new links everywhere From stefan at epy.co.at Sun Aug 15 05:09:52 2004 From: stefan at epy.co.at (Stefan H. Holek) Date: Sun Aug 15 05:09:59 2004 Subject: [Zope-CMF] CMFUid isn't generating real uids In-Reply-To: Message-ID: Tiran, The way CMFUid is designed is so that you can very easily replace the UID generator. It's more about getting a mechanism in place than about generating "real" UIDs, AFAICT. Stefan On Samstag, Aug 14, 2004, at 17:34 Europe/Vienna, Christian Heimes wrote: > I had a short look at CMFUid because I hoped we could replace the AT > uid generator and lookup tool with a more general tool that's also > working with non Archtypes types. I was disapointed to shocked as I > saw how the uids are generated. -- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/ From jmo at ita.chalmers.se Sun Aug 15 05:46:01 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Sun Aug 15 06:06:58 2004 Subject: [Zope-CMF] CMFUid isn't generating real uids In-Reply-To: References: Message-ID: <411F30D9.8010004@ita.chalmers.se> Christian Heimes wrote: > Hello everybody! > > I had a short look at CMFUid because I hoped we could replace the AT > uid generator and lookup tool with a more general tool that's also > working with non Archtypes types. I was disapointed to shocked as I > saw how the uids are generated. > > It's just an incremental counter which is more likely a very > simplistic id generator but not a real uid generator. It's not likely > that other portals are using the same uid, it's a FACT because every > portal is starting the with id 0. IMO that's not unique. > In Archetypes we are also including informations about the machine in > the uid to create uuid (universal unique ids). The uuid is created > from the local host name, a time stamp, a random value and from > abitrary arguments and the output of md5.md5(data).hexdigest() is used > as uid. This makes it mathematical nearly impossible to have one uid > twice over all cmf based sites on earth. > > A good uid should follow these rules (from the manual of uuidgen) > DESCRIPTION > The uuidgen program creates a new universally unique > identifier (UUID) > using the libuuid(3) library. The new UUID can reasonably be > considered > unique among all UUIDs created on the local system, and among > UUIDs created > on other systems in the past and in the future > > Christian > The goal might be different here, There is a need for such a type of generator that creates short IDs, that are not 50 character long and that translate into human-friendly URLs. do you mean that AT will assume a priori that the generated ID is 100% unique? What happens when you create 500 documents with unique IDs inside a folder, export the folder as a .zexp archive and import it on another server? Will Zope take care of renaming all the ids according to the name of the new machine? What happens when you do a copy and paste? The idea is not simply to generate unique IDs but also to keep them unique. Uniqueness is not a quality that something has in itself it is always in relation to something else and "mathematically nearly impossible" is a contradiction in itself, you probably meant "statistically"? Regards /JM From tseaver at zope.com Sun Aug 15 11:02:05 2004 From: tseaver at zope.com (Tres Seaver) Date: Sun Aug 15 11:03:24 2004 Subject: [Zope-CMF] Re: life after the shutdown of cmf.zope.org In-Reply-To: <35B03FBA-EE8E-11D8-B8A7-000D9368D272@dataflake.org> References: <411B5239.7000307@wcm-solutions.de> <35B03FBA-EE8E-11D8-B8A7-000D9368D272@dataflake.org> Message-ID: <411F7AED.3070500@zope.com> Jens Vagelpohl wrote: > I'd say all these issues would feel right at home in the CMF collector > instead of just an email ;) Heh, the zope-web collector would be better. > jens > > On Aug 12, 2004, at 13:19, yuppie wrote: > >> Hi! >> >> >> On the front page of zope.org there are links to >> >> >> >> >> The README.txt of CMF 1.4.7 and HEAD still points to >> >> >> >> >> I think CMF needs >> >> - a new home at zope.org >> >> - a redirect from cmf.zope.org to its new home >> >> - new links everywhere -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From mkur at gazeta.pl Sun Aug 15 11:25:55 2004 From: mkur at gazeta.pl (Michal Kurowski) Date: Sun Aug 15 11:26:02 2004 Subject: [Zope-CMF] CMFTopic and catalog awareness Message-ID: <20040815152555.GA17579@calvados> Hi, I wonder what is the reason CMFTopics cannot be cataloged. It is already present in collector (bug no 53) but there's a comment it's rather a feature request (then a bug). It's seems to me topics that aren't indexed are pretty much useless - they are "canned queries" after all. I just changed the code to inherit from CMFCatalogAwareness (+ a "reindexObject" method). Is there a chance I broke anything doing so ? Cheers, -- Michal Kurowski perl -e '$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7: 12m m::#; y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print' From y.2004_ at wcm-solutions.de Sun Aug 15 12:33:33 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 15 12:34:20 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411E2EAD.3040502@ita.chalmers.se> References: <200408131043.47685.dmitry@athabascau.ca> <411DE377.7040900@wcm-solutions.de> <411E2EAD.3040502@ita.chalmers.se> Message-ID: <411F905D.7030605@wcm-solutions.de> Hi! Jean-Marc Orliaguet wrote: > One question: I have a tool based on 'CMFCore.PortalFolder'. The tool > does not get listed by 'folder_view' but it gets listed by > 'folder_contents' and 'index_html' on the root of the portal. It didn't > get listed with CMF1.4 - so what has changed there? If 'spec' is not specified, Meta Type based filtering is now disabled in contentItems(), contentIds(), contentValues() and listFolderContents(). Seems your tool claims to be an instance of a valid Portal Type, so the Portal Type based filtering fails to filter it out. Given your tool claims to be of the Portal Type 'Folder', I don't understand why 'folder_view' doesn't list the tool. HTH, Yuppie From y.2004_ at wcm-solutions.de Sun Aug 15 12:36:48 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 15 12:37:19 2004 Subject: [Zope-CMF] Re: CHANGES.txt In-Reply-To: References: <84F0BEC9-ED4C-11D8-A701-000D9368D272@dataflake.org> <411D1F9C.3050206@zope.com> <411DE427.5070302@wcm-solutions.de> <411E4EAC.4040705@zope.com> Message-ID: <411F9120.9060701@wcm-solutions.de> Hi! Jens Vagelpohl wrote: >> Here is the "official" policy (that I can find) on CHANGES.txt (from : >> >> The path to the file is doc/CHANGES.txt. It lists the changes that >> have been made to Zope since the last released version. >> >> If you're fixing a bug, you only need to add to CHANGES.txt in the >> branch. If you're adding a feature, you only need to add to >> CHANGES.txt in the trunk. Brian Lloyd later stitches them together. >> >> Although, in fact, this policy is not clearly followed on the main >> Zope tree, either. I can live with either way, I guess. > > > Hmmmm, I wasn't even aware of such an odd policy. I guess these are the more recent and more official documents: But the policy is basically the same: When you check in a bug fix, you almost always need to: * Check in the fix on the current release branch * Note the fix in the /doc/CHANGES.txt on the current release branch * Merge the fix to the trunk to be sure its fixed for the next feature release Note that you don't need to note the fix in the CHANGES.txt on the trunk if you don't want to. At the time a new feature release is made, we merge the items in CHANGES.txt from the trunk and current release branch so that for any given release it notes the actual changes as of that release. > It's much more straightforward, IMHO, to mandate that changes are noted > exactly where they are made. Branch or HEAD doesn't matter. Otherwise it > is very hard for people looking at the HEAD to find out what has been > done and what hasn't. Also, I bet it is even *less* work to weed out > duplicates in CHANGES.txt than it is to stitch it all together from > branches... yikes. > > Oh, and yes, I don't think that policy is followed at all on the Zope > tree ;) Seems most people *want to* note the fix in the CHANGES.txt on the trunk. That doesn't violate the policy. I think it is at least confusing that people add these change notes to the "HEAD only" section. Anyway, I also can live with either way. And I'm not the person who has to stitch things together. Cheers, Yuppie From regebro at nuxeo.com Sun Aug 15 12:54:44 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Sun Aug 15 12:55:06 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <1092554978.3503.84.camel@hermes.objectrealms.net> References: <1092554978.3503.84.camel@hermes.objectrealms.net> Message-ID: <411F9554.4010508@nuxeo.com> It may be worth noting the difference between a unique ID and a universally unique ID. These typically are very different with very different goals and applications. From y.2004_ at wcm-solutions.de Sun Aug 15 13:05:55 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 15 13:08:47 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: References: Message-ID: Hi! Christian Heimes wrote: > I had a short look at CMFUid because I hoped we could replace the AT uid > generator and lookup tool with a more general tool that's also working > with non Archtypes types. I was disapointed to shocked as I saw how the > uids are generated. Hope you've recovered from your shock! UID != UUID The way UIDs are generated is policy. Generating UUIDs would be overkill for the use cases implemented in CMFDefault. If you want to expose the UID to users, 128-bit UUIDs aren't very useful. CMF != CMS The CMF is a framework, and if the policy choice in the default tool is not what you need, you should replace the tool by a custom tool. Cheers, Yuppie From dieter at handshake.de Sun Aug 15 16:18:57 2004 From: dieter at handshake.de (Dieter Maurer) Date: Sun Aug 15 16:53:18 2004 Subject: [Zope-CMF] CMFUid isn't generating real uids In-Reply-To: References: Message-ID: <16671.50481.664415.270991@gargle.gargle.HOWL> Christian Heimes wrote at 2004-8-14 17:34 +0200: >I had a short look at CMFUid because I hoped we could replace the AT uid >generator and lookup tool with a more general tool that's also working >with non Archtypes types. I was disapointed to shocked as I saw how the >uids are generated. The name is "CMFUid" and not "CMFUuid" :-) For the currend use case, locally (with respect to one CMF instance) unique ids may be sufficient. Universally unique ids may not be required. -- Dieter From jmo at ita.chalmers.se Sun Aug 15 17:26:47 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Sun Aug 15 17:29:02 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <411F9554.4010508@nuxeo.com> References: <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> Message-ID: <411FD517.2040608@ita.chalmers.se> Lennart Regebro wrote: > It may be worth noting the difference between a unique ID and a > universally unique ID. These typically are very different with very > different goals and applications. > Hi! I think that the confusion comes from the fact being "unique" is not a property that something has intrinsically (as for an object being "red", "blue", ...) even though the expression 'X is unique ' is a one-place predicate. - but in fact it always has to be taken in relation to a policy that needs to be enforced throughout. In the context of a "unique ID" the policy can be enforced inside a same folder, in the case of a universally unique ID the policy must be enforced inside the context that the term "universal" refers too - So "uniqueness" is more of the nature of laws, regulations, concepts, habits (...) than of the nature of a quality, and this is why the best UID generator is the one that can best enforce a given policy. Regards /JM From jmo at ita.chalmers.se Sun Aug 15 17:49:36 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Sun Aug 15 17:52:07 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411F905D.7030605@wcm-solutions.de> References: <200408131043.47685.dmitry@athabascau.ca> <411DE377.7040900@wcm-solutions.de> <411E2EAD.3040502@ita.chalmers.se> <411F905D.7030605@wcm-solutions.de> Message-ID: <411FDA70.8040609@ita.chalmers.se> yuppie wrote: > Hi! > > > Jean-Marc Orliaguet wrote: > >> One question: I have a tool based on 'CMFCore.PortalFolder'. The >> tool does not get listed by 'folder_view' but it gets listed by >> 'folder_contents' and 'index_html' on the root of the portal. It >> didn't get listed with CMF1.4 - so what has changed there? > > > If 'spec' is not specified, Meta Type based filtering is now disabled > in contentItems(), contentIds(), contentValues() and > listFolderContents(). Seems your tool claims to be an instance of a > valid Portal Type, so the Portal Type based filtering fails to filter > it out. > > Given your tool claims to be of the Portal Type 'Folder', I don't > understand why 'folder_view' doesn't list the tool. > > > HTH, > Yuppie > > Hi! Thanks, -- it disappears if I change the Portal Type from 'Folder' to 'Portal Themes Tool' or to any name that is not a registered Portal Type. /JM From jens at dataflake.org Sun Aug 15 19:11:34 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sun Aug 15 19:11:48 2004 Subject: [Zope-CMF] CMFTopic and catalog awareness In-Reply-To: <20040815152555.GA17579@calvados> References: <20040815152555.GA17579@calvados> Message-ID: <73533B32-EF10-11D8-9E41-000D9368D272@dataflake.org> > I wonder what is the reason CMFTopics cannot be cataloged. > It is already present in collector (bug no 53) but there's a comment > it's rather a feature request (then a bug). > > It's seems to me topics that aren't indexed are pretty much useless - > they are "canned queries" after all. IMHO a topic is more of a structural site item, something that isn't part of the "normal" content but part of the site's structure. I personally would use a topic in a situation where it is linked to explicitly and people would never have to try and "find" it using catalog queries. jens From jens at dataflake.org Sun Aug 15 19:16:47 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Sun Aug 15 19:17:01 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: References: Message-ID: <2E487A55-EF11-11D8-9E41-000D9368D272@dataflake.org> > CMF != CMS > > The CMF is a framework, and if the policy choice in the default tool > is not what you need, you should replace the tool by a custom tool. This should be written in bold red letters on the default portal home page of a CMFDefault CMF Site :) Maybe then people would understand the real difference between the CMF and Plone. Right now most everyone seems to think that the CMF is an ugly CMS that's lacking in functionality, as opposed to Plone. jens From robert at redcor.ch Mon Aug 16 00:57:53 2004 From: robert at redcor.ch (robert rottermann) Date: Mon Aug 16 00:58:09 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <411F9554.4010508@nuxeo.com> References: <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> Message-ID: <41203ED1.50003@redcor.ch> they are different. UUID is more generall. But why should they have a different goals? Mere UID are not worth any effort since their scope is so limited! Robert Lennart Regebro wrote: > It may be worth noting the difference between a unique ID and a > universally unique ID. These typically are very different with very > different goals and applications. > > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests > > From robert at redcor.ch Mon Aug 16 01:06:59 2004 From: robert at redcor.ch (robert rottermann) Date: Mon Aug 16 01:07:14 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: References: Message-ID: <412040F3.6040409@redcor.ch> yuppie wrote: > Hi! > > > Christian Heimes wrote: > >> I had a short look at CMFUid because I hoped we could replace the AT >> uid generator and lookup tool with a more general tool that's also >> working with non Archtypes types. I was disapointed to shocked as I >> saw how the uids are generated. > > > Hope you've recovered from your shock! > > > UID != UUID > > The way UIDs are generated is policy. Generating UUIDs would be overkill > for the use cases implemented in CMFDefault. If you want to expose the > UID to users, 128-bit UUIDs aren't very useful. Genertaing an UIID costs nearly nothing And why should any UID or UUID ever be presented to the user? I think UUID should be default. If it is overkill in a given case, then it should be replaced. But I never want to run the risk to hit duplicate UID's when I import some documents from one Data.fs into an other. UID's are just to restricted to be worthwile. Robert From dieter at handshake.de Sun Aug 15 17:01:25 2004 From: dieter at handshake.de (Dieter Maurer) Date: Mon Aug 16 01:10:42 2004 Subject: [Zope-CMF] CMFTopic and catalog awareness In-Reply-To: <20040815152555.GA17579@calvados> References: <20040815152555.GA17579@calvados> Message-ID: <16671.53029.823680.845484@gargle.gargle.HOWL> Michal Kurowski wrote at 2004-8-15 17:25 +0200: > ... >It's seems to me topics that aren't indexed are pretty much useless - >they are "canned queries" after all. Which does not require that they themselves are indexed. Note, that you can only find them via their meta data. Finding them via their "content" would be very difficult to implement reliably and efficiently. -- Dieter From mkur at gazeta.pl Mon Aug 16 02:48:23 2004 From: mkur at gazeta.pl (Michal Kurowski) Date: Mon Aug 16 02:48:38 2004 Subject: [Zope-CMF] Re: CMFTopic and catalog awareness In-Reply-To: <73533B32-EF10-11D8-9E41-000D9368D272@dataflake.org> References: <20040815152555.GA17579@calvados> <73533B32-EF10-11D8-9E41-000D9368D272@dataflake.org> Message-ID: <20040816064823.GC5350@calvados> Jens Vagelpohl [jens@dataflake.org] wrote: > > IMHO a topic is more of a structural site item, something that isn't > part of the "normal" content but part of the site's structure. I > personally would use a topic in a situation where it is linked to > explicitly and people would never have to try and "find" it using > catalog queries. I think it depends. It's perfectly reasonable not to let people search for Topics and just allow a content manager to structure the site with them. But sometimes not. For example, you might want to bind keywords management and Topics together and use them to let content be found according to some logic. That's what I do. The major objective is to be able to catalog pdf-s and categorize them using keywords and many other criteria. I use Topics for that. I just wonder why Topics inherit from PloneFolder only. -- Michal Kurowski perl -e '$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7: 12m m::#; y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print' From jmo at ita.chalmers.se Mon Aug 16 05:28:50 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Mon Aug 16 05:35:32 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <412040F3.6040409@redcor.ch> References: <412040F3.6040409@redcor.ch> Message-ID: <41207E52.80400@ita.chalmers.se> robert rottermann wrote: > > > yuppie wrote: > >> Hi! >> >> >> Christian Heimes wrote: >> >>> I had a short look at CMFUid because I hoped we could replace the AT >>> uid generator and lookup tool with a more general tool that's also >>> working with non Archtypes types. I was disapointed to shocked as I >>> saw how the uids are generated. >> >> >> >> Hope you've recovered from your shock! >> >> >> UID != UUID >> >> The way UIDs are generated is policy. Generating UUIDs would be >> overkill for the use cases implemented in CMFDefault. If you want to >> expose the UID to users, 128-bit UUIDs aren't very useful. > > Hi! > Genertaing an UIID costs nearly nothing but it costs a lot to keep them unique, how do you enforce a policy between sites? > And why should any UID or UUID ever be presented to the user? > they appear in URLs, in Plone's navigation tree, - this is what you see for instance when you create a document before it gets a title, since Plone invokes the factory before having all the necessary information about the document and complains afterwards that the title is missing (which is basically putting the cart before the horse), so the left column momentarily covers 50% of the screen until you input a title, and if you don't input a title you will have created an orphaned document with a 128 bit long id lying around... this is then the only way you have to identify the document. > I think UUID should be default. If it is overkill in a given case, > then it should be replaced. > But I never want to run the risk to hit duplicate UID's when I import > some documents from one Data.fs into an other. > UID's are just to restricted to be worthwile. as soon as you import documents as they are from another place (through Data.fs, .zexp, ...), they from then on reside in at least two places, and the UUIDs are no longer universal, are they? regards /JM > Robert > From regebro at nuxeo.com Mon Aug 16 06:36:37 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Mon Aug 16 06:36:41 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <41203ED1.50003@redcor.ch> References: <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> <41203ED1.50003@redcor.ch> Message-ID: <41208E35.3010107@nuxeo.com> robert rottermann wrote: > they are different. UUID is more generall. > But why should they have a different goals? Because the goal of a UID is to generate an id for use withing a limited scope. An UUID has an unlimited scope. UUID is something you use when you know that the think that needs an ID will have to be used all over the world. LDAP fields are good examples of this. So they typically are called.12.334534.5434.5365.123232.34. A bit unweildy. A UID is something you need to avoid two people or two processes or two documents claiming the same id, within a limited scope, such as a folder or a site. One of the most common need is so that you don't get some kind of weird clash when two people press the same button simultaneously. > Mere UID are not worth any effort since their scope is so limited! Sure it is. Because it's needed so often. In 20 years of computing I have never needed to write a piece of software that create a UUID. Maybe it's just me... From robert at redcor.ch Mon Aug 16 07:08:37 2004 From: robert at redcor.ch (robert rottermann) Date: Mon Aug 16 07:08:42 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <41208E35.3010107@nuxeo.com> References: <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> <41203ED1.50003@redcor.ch> <41208E35.3010107@nuxeo.com> Message-ID: <412095B5.9050604@redcor.ch> Lennart Regebro wrote: > robert rottermann wrote: > >> they are different. UUID is more generall. >> But why should they have a different goals? > > > Because the goal of a UID is to generate an id for use withing a limited > scope. An UUID has an unlimited scope. UUID is something you use when > you know that the think that needs an ID will have to be used all over > the world. LDAP fields are good examples of this. So they typically are > called.12.334534.5434.5365.123232.34. A bit unweildy. I do not say that windows represents the best of all worlds. But using it you can not pick your nose without generating a couple of them. And you never have to know. Dealing with them directly is a pain. However you seldomly do. And if you do it makes no real difference whether you have to enter 12.334534.5434.5365.123232.34. or 12.334534.5434. An UID how many U it may sport, should never be entered "by hand". > > A UID is something you need to avoid two people or two processes or two > documents claiming the same id, within a limited scope, such as a folder > or a site. One of the most common need is so that you don't get some > kind of weird clash when two people press the same button simultaneously. > >> Mere UID are not worth any effort since their scope is so limited! > > > Sure it is. Because it's needed so often. In 20 years of computing I > have never needed to write a piece of software that create a UUID. Maybe > it's just me... Only because you have not dealt with sharing documents. The moment you do, you start to wish you had a way to uniquely identify documents or parts of documents. I was involved in creating a Document-Management system some 15 years ago for users of a CAD system (Autocad). Allready then we had to provide a solution for this very problem, and where happy that we (much later) could use Microsoft s GUUID. I think it would be wrong not to use a UUID when ever a UID is called for. Robert From robert at redcor.ch Mon Aug 16 08:05:09 2004 From: robert at redcor.ch (robert rottermann) Date: Mon Aug 16 08:05:15 2004 Subject: [Plone-developers] Re: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: References: <412040F3.6040409@redcor.ch> Message-ID: <4120A2F5.7070403@redcor.ch> yuppie wrote: > Hi! > > > robert rottermann wrote: > >> I think UUID should be default. If it is overkill in a given case, >> then it should be replaced. >> But I never want to run the risk to hit duplicate UID's when I import >> some documents from one Data.fs into an other. > > > Unless you make sure the source of your import including all copies is > destroyed after the import, importing is just a special way of copying. > > If your application doesn't generate new UIDs on import of single > content items, it is broken with and without UUIDs. > > Using UUIDs, you even have to generate new UUIDs if you copy (import) a > complete site. Depends on your use case. I have been using UUID's to uniquely identfy a document. Across copies. So the original and the copy both point to the same "piece of real world" If you "only" want to make sure there is no Zope/CMF/Whatsoever object with the same UID you are right. > > > Note that I'm not against adding an UUID generator to the CMF. The > GeneratorTool could be made configurable, allowing to select different > generators. I agree. I just see no advantage *NOT* to generate UUID's as default. Robert From jmo at ita.chalmers.se Mon Aug 16 09:26:08 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Mon Aug 16 09:35:44 2004 Subject: [Plone-developers] Re: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: References: <412040F3.6040409@redcor.ch> <41207E52.80400@ita.chalmers.se> Message-ID: <4120B5F0.1020207@ita.chalmers.se> Alexander Limi wrote: > On Mon, 16 Aug 2004 11:28:50 +0200, Jean-Marc Orliaguet > wrote: > > >> they appear in URLs, in Plone's navigation tree, > > Hi! > You're confusing (U)UIDs with temporary object names. > well, that is just a semantic distinction as I see, but in reality there are the same concepts since the temporary object names eventually become permanent UIDs which they did last time I checked, unless the user modifies the UID.. I have quite a lot of 'file.2004-08-06.5903528396' lying around and these are the ones that I saw in the navtree upon their creation before I changed my mind and thought 'no, this is not a file that I wanted to create', but a news document.. >> - this is what you see for instance when you create a document >> before it gets a title, since Plone invokes the factory before >> having all the necessary information about the document and >> complains afterwards that the title is missing (which is basically >> putting the cart before the horse), so > > > This is a CMF behaviour, not a Plone behaviour. And it's very silly. But CMF is the framework, the UI implementation done in CMFDefault is simply an illustration of how the user interface can take care of the user-computer interaction. Nothing prevents the CMS from actually creating the documents once all the information about them has been gathered, this is what CPS3 which is built on CMF does, CPS2 did it too... This is only a matter of customizing a template in CMFDefault ('folder_factories'), and nothing needs to be changed in CMFCore. Basically you don't need to create a document in order to create a form for it. First create the form based on the document's schema and layout ('...document_create_form.pt'), do the validation and then invoke the script that will actually create the document ('document_create.py' or whatever). In this way no document is created before it has been validated. > >> the left column momentarily covers 50% of the screen until you input >> a title > > > Only in Mozilla. Mozilla doesn't break at hyphens, all other browsers do. > but this is UI problem basically, couldn't an ellipsis (...) be used instead? Regards /JM From fg at nuxeo.com Mon Aug 16 09:49:49 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Mon Aug 16 09:49:55 2004 Subject: [Zope-CMF] CMFTopic and catalog awareness In-Reply-To: <20040815152555.GA17579@calvados> Message-ID: <20040816134949.GA31570@flo.in.nuxeo.com> > I wonder what is the reason CMFTopics cannot be cataloged. > It is already present in collector (bug no 53) but there's a comment > it's rather a feature request (then a bug). It's mainly historical, folderish objects didn't use to be cataloged. I don't see the problem with making them cataloged. Note though, as someone mentionned, that it would mean cataloging only its metadata (title and description mainly). Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From gregweb at gmx.ch Mon Aug 16 10:03:21 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Mon Aug 16 09:53:38 2004 Subject: [Zope-CMF] CMFUid isn't generating real uids In-Reply-To: Message-ID: <5.1.0.14.2.20040816150110.01ead230@127.0.0.1> Hi Christian, even though some of the following points already got mentioned by others, I'd like as originator of CMFUid to answer them from my point of view: 1) CMFUid uids are ensured to be unique (per instance), really!!!: By the way: the first uid returned is 1 (one) not zero to avoid malfunctions if people do (wrongly) do tests like 'if returned_uid: do some stuff' instead of 'if returned_uid is not None: do seome stuff'. 2) I looked for a mathematical proof that "md5.md5(data).hexdigest()" encoding does not generate doubles for the first 2^64 unique ids. I didn't find such a proof so I felt back to the simple uncode counter. I had a look at AT's uuid implementation and felt badly mimicing this behaviour. I just didn't want to feel guilty in case someone write on the zope-cmf list that he has two content object having the same "unique id". From my experience as realtime system programmer everything even with negligible probabilty happens once a time. You can bet your life on that. Sorry, that's life, that's not me! Due to my lack of mathematical foundations the idea was not to write a sophisticated unique id generation algorithm (this should be done by mathematicians!) 3) I'm played with the idea of letting people pre or append a kind of site identifier to simply make the ids "more" universally unique (seeing the problem of "more") through the ZMI. By giving people control on this 'site identifier' we give away the responability chosing the "right" policy. Because of lack of time, I couldn't do that. Contributions desired! 4) Architecture (IMPORTANT): In the spirit of Zope3 the main goal of the design of CMFUid was to write an extensible mini framework where everybody can replace parts of the functionality if needed without the need to replace parts which already do the job "as expected". I know this point stands in contrast to AT's uid/reference engines design where everything is addressed through the bloated Archetypes tool. This architectural problem was one of the main reasons to write a totaly new implementation. So: 'portal_uidgenerator' is one of many possible implementations. Replacing it with your own should not affect applications using it as long the interface contract is met. 5) I first thought I would build a 'portal_uidgen' registry where different uid and uuid implementations could be pluged in. But I didn't have enough time to do this. For the moment I'm even not sure this is a good idea! See additional comments below: At 17:34 14.08.2004 +0200, Christian Heimes wrote: >Hello everybody! > >I had a short look at CMFUid because I hoped we could replace the AT uid generator and lookup tool with a more general tool that's also working with non Archtypes types. That was one of the main intentions. >I was disapointed to shocked as I saw how the uids are generated. Hope you recovered well ;-) >It's just an incremental counter which is more likely a very simplistic id generator but not a real uid generator. simple/simplistic: Yes not a real unique id generator: Sorry, it is! >It's not likely that other portals are using the same uid, it's a FACT because every portal is starting the with id 0. IMO that's not unique. CMFUid does not ensure universally unique ids and does not encode uids in some manner because: - I didn't feel capable to ensure universality - Some people like short unique ids like 'article/1876' >In Archetypes we are also including informations about the machine in the uid to create uuid (universal unique ids). The uuid is created from the local host name, a time stamp, a random value and from abitrary arguments and the output of md5.md5(data).hexdigest() is used as uid. This makes it mathematical nearly impossible to have one uid twice over all cmf based sites on earth. I read the word 'mathematically nearly' and feel bad (Sorry about that). >A good uid should follow these rules (from the manual of uuidgen) >DESCRIPTION > The uuidgen program creates a new universally unique > identifier (UUID) > using the libuuid(3) library. The new UUID can reasonably be > considered > unique among all UUIDs created on the local system, and among > UUIDs created > on other systems in the past and in the future From http://www.die.net/doc/linux/man/man3/libuuid.3.html: The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all systems. They could be used, for instance, to generate unique HTTP cookies across multiple web servers without communication between the servers, and without fear of a name clash. I'm not feeling much better with 'be reasonably expected' but it's perhaps a better solution than the archetypes one. IMHO: The requirements need not be such hard for shop sites as for sites holding content over years or decades. It's not so important (for me) that perhaps some chinese computer users harddisk uuid is the same as the one of my harddsik. So less sophisticated algoritmns are ok. Gregoire From gregweb at gmx.ch Mon Aug 16 10:15:13 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Mon Aug 16 10:05:23 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <411FD517.2040608@ita.chalmers.se> References: <411F9554.4010508@nuxeo.com> <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> Message-ID: <5.1.0.14.2.20040816161219.00af8758@127.0.0.1> Salut Jean-Marc, >I think that the confusion comes from the fact being "unique" is not a property that something has intrinsically (as for an object being "red", "blue", ...) even though the expression 'X is unique ' is a one-place predicate. - but in fact it always has to be taken in relation to a policy that needs to be enforced throughout. In the context of a "unique ID" the policy can be enforced inside a same folder, in the case of a universally unique ID the policy must be enforced inside the context that the term "universal" refers too - So "uniqueness" is more of the nature of laws, regulations, concepts, habits (...) than of the nature of a quality, and this is why the best UID generator is the one that can best enforce a given policy. Well stated! I'll updating the README.txt this week by something similar to that: The unique ids generated by CMFUid *are unique by CMF instance*. On imports existing CMFUid uids get deleted to avoid doubling uids. Gregoire From gregweb at gmx.ch Mon Aug 16 10:11:23 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Mon Aug 16 10:05:32 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <412040F3.6040409@redcor.ch> References: Message-ID: <5.1.0.14.2.20040816160503.03ef7d68@127.0.0.1> Hi Robert, >I think UUID should be default. If it is overkill in a given case, then it should be replaced. >But I never want to run the risk to hit duplicate UID's when I import some documents from one Data.fs into an other. >UID's are just to restricted to be worthwile. > >Robert The current policy of CMFUid is that uids get deleted on import (if you leave the "Remove the objects unique id on add (and import)" flag in 'portal_uidannotation' checked). Thus your code has to register the object a second time a unique id. This ensures that on imports no duplication happens. I know it get's tricky if you want to import objects beeing related if they rely on unique ids. But this is out of scope of CMFUid. This is in scope of a hypothetical CMFRelation product managing that. See 'portal_uidannotation' (UniqueIdAnnotationTool.py) for this. Gregoire From gregweb at gmx.ch Mon Aug 16 10:23:37 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Mon Aug 16 10:14:27 2004 Subject: [Plone-developers] Re: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <4120A2F5.7070403@redcor.ch> References: <412040F3.6040409@redcor.ch> Message-ID: <5.1.0.14.2.20040816162105.03ef7eb0@127.0.0.1> Hi Robert, >>Note that I'm not against adding an UUID generator to the CMF. The GeneratorTool could be made configurable, allowing to select different generators. > >I agree. I just see no advantage *NOT* to generate UUID's as default. I agree as long the universally unique id algorithm ensures it really returns unniverally unique ids. Still looking for a universally unique id generator ... Gregoire From robert at redcor.ch Mon Aug 16 10:29:33 2004 From: robert at redcor.ch (robert rottermann) Date: Mon Aug 16 10:29:41 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <5.1.0.14.2.20040816160503.03ef7d68@127.0.0.1> References: <5.1.0.14.2.20040816160503.03ef7d68@127.0.0.1> Message-ID: <4120C4CD.1010407@redcor.ch> Hi Gregoire, I am happy with any form of UID we get. However I think the necessary libraries exists to have an UUID generated on both Windows and Linux (do not know about other systems) . I therefore wonder why we should not use them. We will not loose anything, but gain the ability to use the same code as base to create relations and such. Robert Gregoire Weber wrote: > Hi Robert, > > > >>I think UUID should be default. If it is overkill in a given case, then it should be replaced. >>But I never want to run the risk to hit duplicate UID's when I import some documents from one Data.fs into an other. >>UID's are just to restricted to be worthwile. >> >>Robert > > > The current policy of CMFUid is that uids get deleted on import > (if you leave the "Remove the objects unique id on add (and import)" flag > in 'portal_uidannotation' checked). > > Thus your code has to register the object a second time a unique id. > This ensures that on imports no duplication happens. > > I know it get's tricky if you want to import objects beeing related > if they rely on unique ids. But this is out of scope of CMFUid. > This is in scope of a hypothetical CMFRelation product managing that. > > See 'portal_uidannotation' (UniqueIdAnnotationTool.py) for this. > > Gregoire > > > From jmo at ita.chalmers.se Mon Aug 16 11:01:39 2004 From: jmo at ita.chalmers.se (Jean-Marc Orliaguet) Date: Mon Aug 16 11:12:31 2004 Subject: [Plone-developers] Re: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <4120C4CD.1010407@redcor.ch> References: <5.1.0.14.2.20040816160503.03ef7d68@127.0.0.1> <4120C4CD.1010407@redcor.ch> Message-ID: <4120CC53.4080406@ita.chalmers.se> robert rottermann wrote: > Hi Gregoire, > > I am happy with any form of UID we get. > However I think the necessary libraries exists to have an UUID > generated on both Windows and Linux (do not know about other systems) . > > I therefore wonder why we should not use them. > We will not loose anything, but gain the ability to use the same code > as base to create relations and such. > Robert, when something is unique there is no such concept as being "more unique" - either it is unique or it is not. What CMFUid guarantees is that the IDs that it generates are unique within a same CMF site as long as all applications that generate UIDs do it through CMFUid. The goal is to remove the ID-checking logic from the application and move it to a central tool that takes care of it instead. Using a more complex ID generator won't make IDs more unique than they are, it will simply make them longer and more difficult to read. So if you want universally unique IDs you need to write a tool that enforces a policy on the scale of your "universal" scope, be it within a same server, a same domain, a same university, a same country, a same continent etc. You will probably need to set up a central ID repository, connect servers together and define rules and policies that every connected server will have to follow, and that is far beyond the scope of CMFUid. Regards /JM From dmitry at athabascau.ca Mon Aug 16 12:39:43 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Mon Aug 16 12:39:10 2004 Subject: [Zope-CMF] Re: [dev] After the goldrush.... In-Reply-To: <411DE377.7040900@wcm-solutions.de> References: <200408131043.47685.dmitry@athabascau.ca> <411DE377.7040900@wcm-solutions.de> Message-ID: <200408161039.46899.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 thanks. Looks like it's not all that simple after I started to play with it: some methods/functions disapeared and products I used relied on them and some products where importing stuff from the wrong module (function was imported into module in 1.4 branch and now it's not so it doesn't appear in the module). Anyway short conclusion (if you're interested): it's not quite backward compatible with 1.4 branch so far, although with some easy tweaks some products could be fixed but the rest of them needs much more attention :( If you're interested I can enumerate things I've encountered and products I've tried but I guess you might know it already. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBIONPyDrVuGfS98QRAskoAJ9nWFjBpqyK0kYCr7OxWLTHaiEHuwCfadpx hlxT//gHHPi+77qbIQbRYsI= =wbA8 -----END PGP SIGNATURE----- From dmitry at athabascau.ca Mon Aug 16 12:59:38 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Mon Aug 16 12:59:13 2004 Subject: [Zope-CMF] DCWorkflow "cheat" question Message-ID: <200408161059.40120.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everybody, sorry for cross-posting but it seems that those two audiences would know the most about DCWorkflow applications. We're trying to implement workflow which works as follows: private--(show)-->visible--(submit)-->pending--(publish)-->published (after that some hairy stuff): published--(edit)-->locked--(unlock)-->published now when we execute transition "edit" document is getting locked and it's copy is placed under the same folder with changed name (or under "special" subfolder) then the copy itself goes through private_c--(submit)-->pending_c--(publish2)-->X where X is "dissapear" as on publish we want to copy document back to it's original and put it in the state "published". Now when if I delete old object before paste new one I'll loose state as new object will get default state which is "private". Is it possible to "cheat" and get right to "published" state? Or any other alternatives with the same functionality? Oh, and if I paste copy of an object back into it's original place I would be doing it as Reviewer so owner of new object is changed then and I have no idea how to solve this one. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBIOf6yDrVuGfS98QRAnFoAKCVf2gsLLjCaT23Cemmabm+WI0kDQCeIEMS WRl1hlfyVrWhJDybhZOKepw= =4EXQ -----END PGP SIGNATURE----- From y.2004_ at wcm-solutions.de Mon Aug 16 13:27:36 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Mon Aug 16 13:29:02 2004 Subject: [Zope-CMF] Re: CMF 1.5 migration issues (was: [dev] After the goldrush....) In-Reply-To: <200408161039.46899.dmitry@athabascau.ca> References: <200408131043.47685.dmitry@athabascau.ca> <411DE377.7040900@wcm-solutions.de> <200408161039.46899.dmitry@athabascau.ca> Message-ID: <4120EE88.2040309@wcm-solutions.de> Hi! Dmitry S. Makovey wrote: > thanks. Looks like it's not all that simple after I started to play with it: > some methods/functions disapeared and products I used relied on them and some > products where importing stuff from the wrong module (function was imported > into module in 1.4 branch and now it's not so it doesn't appear in the > module). Hope these are just methods / functions that were marked as deprecated or not part of the public interfaces (as the imports you mentioned). > Anyway short conclusion (if you're interested): it's not quite backward > compatible with 1.4 branch so far, although with some easy tweaks some > products could be fixed but the rest of them needs much more attention :( > > If you're interested I can enumerate things I've encountered and products I've > tried but I guess you might know it already. I'm interested. Maybe the backwards compatibility can be improved with some small changes. Cheers, Yuppie From dieter at handshake.de Mon Aug 16 13:59:26 2004 From: dieter at handshake.de (Dieter Maurer) Date: Mon Aug 16 13:59:57 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <412040F3.6040409@redcor.ch> References: <412040F3.6040409@redcor.ch> Message-ID: <16672.62974.384394.212839@gargle.gargle.HOWL> robert rottermann wrote at 2004-8-16 07:06 +0200: > ... >But I never want to run the risk to hit duplicate UID's when I import >some documents from one Data.fs into an other. Importing is a kind of copying. Any correct UID implementation (and not only an UUID implementation) *MUST* create a new UID when an object is copied. Thus, you should not see the problem you expect. However, it is quite likely that importing will break all references (due to the creation of new UIDs). -- Dieter From jens at dataflake.org Mon Aug 16 14:18:24 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Mon Aug 16 14:18:35 2004 Subject: [Zope-CMF] CMFTopic and catalog awareness In-Reply-To: <20040816134949.GA31570@flo.in.nuxeo.com> References: <20040816134949.GA31570@flo.in.nuxeo.com> Message-ID: >> I wonder what is the reason CMFTopics cannot be cataloged. >> It is already present in collector (bug no 53) but there's a comment >> it's rather a feature request (then a bug). > > It's mainly historical, folderish objects didn't use to be cataloged. > I don't see the problem with making them cataloged. > > Note though, as someone mentionned, that it would mean cataloging > only its metadata (title and description mainly). Actually, they are cataloged, but not fully. I noticed that they show up in the catalog on a fresh CMF install, but they weren't cataloged all the way. IIRC Title and Description were missing. jens From dmitry at athabascau.ca Mon Aug 16 18:10:19 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Mon Aug 16 18:10:50 2004 Subject: [Zope-CMF] Re: CMF 1.5 migration issues (was: [dev] After the goldrush....) In-Reply-To: <4120EE88.2040309@wcm-solutions.de> References: <200408161039.46899.dmitry@athabascau.ca> <4120EE88.2040309@wcm-solutions.de> Message-ID: <200408161610.20429.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 16, 2004 11:27 am, yuppie wrote: > I'm interested. Maybe the backwards compatibility can be improved with > some small changes. Ok, basicaly I did try to run Plone as the base for the rest of application which involves using all the required apps like QuickInstaller, Formulator etc. Formulator used in Products/Formulator/FSForm.py: from Products.CMFCore.DirectoryView import expandpath instead of from Products.CMFCore.utils import expandpath Plone gives an error: File "/home/dimon/Zope27/instances/cmf_beta/Products/CMFPlone/ActionsTool.py", line 68, in listFilteredAct ionsFor self._listActions(append,provider,info,ec) AttributeError: _listActions which means that really Plone used part of non-public interface and that should be fixed there (in Plone that is). I cheated a bit re-adding _listActions from 1.4.7 which gave me next: * Module Products.CMFCore.ActionsTool, line 265, in _listActions * Module Products.CMFCore.ActionInformation, line 228, in testCondition * Module Products.CMFCore.Expression, line 44, in __call__ * Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__ __traceback_info__: member and portal.portal_membership.getHomeFolder() * Module Python expression "member and portal.portal_membership.getHomeFolder()", line 1, in * Module Products.CMFDefault.MembershipTool, line 279, in getHomeFolder * Module Products.BTreeFolder2.BTreeFolder2, line 197, in _getOb KeyError: 'dimon' which meant that I didn't have member folder created for me (?) manualy creating folder fixed problem. Can't remember if I changed more stuff but the rest (at least visualy) appears to work. Although tests are not that bright: Ran 515 tests in 66.744s FAILED (failures=11, errors=8) I can give you full traceback privately to save list's bandwidth. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBITDLyDrVuGfS98QRAg4RAKCKK3j9nW8CG5cL9nwDM28EHHG0wwCfSIKr s0aGXi6kKXkFNZM5BGV7h/A= =iI5z -----END PGP SIGNATURE----- From chris at simplistix.co.uk Tue Aug 17 03:01:02 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Tue Aug 17 03:05:19 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <16672.62974.384394.212839@gargle.gargle.HOWL> References: <412040F3.6040409@redcor.ch> <16672.62974.384394.212839@gargle.gargle.HOWL> Message-ID: <4121AD2E.50705@simplistix.co.uk> Dieter Maurer wrote: > Importing is a kind of copying. Not always... what if you're using it to move data between Zope instances or just between ZODB's? > However, it is quite likely that importing will break > all references (due to the creation of new UIDs). Indeed, which effectively makes import/export useless, right? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From y.2004_ at wcm-solutions.de Tue Aug 17 04:20:18 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Tue Aug 17 04:20:59 2004 Subject: [Zope-CMF] Re: CMF 1.5 migration issues In-Reply-To: <200408161610.20429.dmitry@athabascau.ca> References: <200408161039.46899.dmitry@athabascau.ca> <4120EE88.2040309@wcm-solutions.de> <200408161610.20429.dmitry@athabascau.ca> Message-ID: <4121BFC2.4010604@wcm-solutions.de> Hi! Dmitry S. Makovey wrote: > Ok, basicaly I did try to run Plone as the base for the rest of application > which involves using all the required apps like QuickInstaller, Formulator > etc. > Formulator used in Products/Formulator/FSForm.py: > > from Products.CMFCore.DirectoryView import expandpath > > instead of > > from Products.CMFCore.utils import expandpath Thanks! expandpath was once defined in DirectoryView, so it was wrong to remove it silently. Readded it at CMF-1_5-branch with a deprecation warning. > Plone gives an error: > [...] Plone anyway needs a new release to work with CMF 1.5, so other people will have to look into these issues. Cheers, Yuppie From r.ritz at biologie.hu-berlin.de Tue Aug 17 04:40:42 2004 From: r.ritz at biologie.hu-berlin.de (Raphael Ritz) Date: Tue Aug 17 04:40:51 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <4121AD2E.50705@simplistix.co.uk> References: <412040F3.6040409@redcor.ch> <16672.62974.384394.212839@gargle.gargle.HOWL> <4121AD2E.50705@simplistix.co.uk> Message-ID: Chris Withers wrote: > Dieter Maurer wrote: > >> Importing is a kind of copying. > > > Not always... what if you're using it to move data between Zope > instances or just between ZODB's? > >> However, it is quite likely that importing will break >> all references (due to the creation of new UIDs). > > > Indeed, which effectively makes import/export useless, right? > Not if you take care to provide a relationship manager or reference engine that can handle these changes (using, e.g., an event service to be notified) Raphael > Chris > From y.2004_ at wcm-solutions.de Tue Aug 17 12:26:27 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Tue Aug 17 12:27:45 2004 Subject: [Zope-CMF] [dev] CMFSetup issues (was: Re: CMF 1.5 beta coming ...) In-Reply-To: <41139898.7070100@wcm-solutions.de> References: <41125846.8000303@wcm-solutions.de> <41125F99.3060108@zope.com> <41127A60.8080207@wcm-solutions.de> <41135CB6.2060200@wcm-solutions.de> <41137729.1070602@zope.com> <41139898.7070100@wcm-solutions.de> Message-ID: <412231B3.8070107@wcm-solutions.de> Hi! > #10: Not purging the existing setup seems to have some issues > >>> How is not-purging supposed to work? Currently existing Actions are >>> deleted, reimporting raises errors. >> >> >> Each import step is supposed to know whether "don't purge" is sensible >> for it. and what to do when purging. Running the same import twice >> without purging is highly likely to create conflicts (the same actions >> will be created twice, etc). > > > Well. The code could add actions only if they don't exist already. > >> In theory, "don't purge" will be useful when applying a profile as an >> "update" to an existing site; for it to work cleanly, the steps in >> the profile need to be designed for that. > > > CMF 1.5 needs some new / moved actions. It would be quite helpful if > CMFSetup could be used for migration. > > I'd like to see the "update" use case work against customized sites. Added the other open issues to the collector. Still need some feedback on this one: Would the migration use case fit into the concept of CMFSetup? I'd volunteer to adjust the "don't purge" behavior. Cheers, Yuppie From dieter at handshake.de Tue Aug 17 14:47:10 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Aug 17 15:46:38 2004 Subject: [Zope-CMF] Re: [Plone-users] DCWorkflow "cheat" question In-Reply-To: <200408161059.40120.dmitry@athabascau.ca> References: <200408161059.40120.dmitry@athabascau.ca> Message-ID: <16674.21166.87676.570237@gargle.gargle.HOWL> Dmitry S. Makovey wrote at 2004-8-16 10:59 -0600: > ... >Now when if I delete old object >before paste new one I'll loose state as new object will get default state >which is "private". Is it possible to "cheat" and get right to "published" >state? You can cheat with the "{get|set}StatusOf" WorkflowTool methods. Note that cheating is potentially dangerous. >Or any other alternatives with the same functionality? I use automatic transitions for a similar purpose. -- Dieter From dieter at handshake.de Tue Aug 17 15:08:54 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Aug 17 15:46:43 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <4121AD2E.50705@simplistix.co.uk> References: <412040F3.6040409@redcor.ch> <16672.62974.384394.212839@gargle.gargle.HOWL> <4121AD2E.50705@simplistix.co.uk> Message-ID: <16674.22470.153948.160714@gargle.gargle.HOWL> Chris Withers wrote at 2004-8-17 09:01 +0200: >Dieter Maurer wrote: >> Importing is a kind of copying. > >Not always... what if you're using it to move data between Zope >instances or just between ZODB's? Then you abuse "export/import": Both "export" as well as "import" create copies. You may later delete them but they are copies in the first place and there is nothing that forces you to delete all copies (but one). A safe implementation must reassign UUIDs. UIDs may be preserved provided the complete CMF instance is copied as a whole. >> However, it is quite likely that importing will break >> all references (due to the creation of new UIDs). > >Indeed, which effectively makes import/export useless, right? Rafael already told you how to fix this... -- Dieter From gregweb at gmx.ch Tue Aug 17 18:15:55 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Tue Aug 17 18:33:19 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <4121AD2E.50705@simplistix.co.uk> References: <412040F3.6040409@redcor.ch> <16672.62974.384394.212839@gargle.gargle.HOWL> <4121AD2E.50705@simplistix.co.uk> Message-ID: <6.0.3.0.2.20040818000826.04c9a808@127.0.0.1> Hi Chris! There is a flag (boolean) in 'portal_uidannotation' named 'Remove the objects unique id on add (and import)' (the properties name is 'remove_on_add'). If you unckeck it before importing your content the uids will be retained. Gregoire >>Importing is a kind of copying. > >Not always... what if you're using it to move data between Zope instances >or just between ZODB's? > >>However, it is quite likely that importing will break >>all references (due to the creation of new UIDs). > >Indeed, which effectively makes import/export useless, right? _____________________________________ Gr?goire Weber mailto:gregoire.weber@switzerland.org From mkur at gazeta.pl Tue Aug 17 22:15:51 2004 From: mkur at gazeta.pl (Michal Kurowski) Date: Tue Aug 17 22:16:20 2004 Subject: [Zope-CMF] Re: CMFTopic and catalog awareness In-Reply-To: <20040816134949.GA31570@flo.in.nuxeo.com> References: <20040815152555.GA17579@calvados> <20040816134949.GA31570@flo.in.nuxeo.com> Message-ID: <20040818021551.GA23864@calvados> Florent Guillaume [fg@nuxeo.com] wrote: > > It's mainly historical, folderish objects didn't use to be cataloged. > I don't see the problem with making them cataloged. All right. So, what's going to happen with the collector entry ? Is a simple solution (like mine) enough ? > Note though, as someone mentionned, that it would mean cataloging > only its metadata (title and description mainly). I am aware of it. But exactly this seems to be the point - a topic should have its metadata indexed, its content is other objects which are supposed to be already taken care off. -- Michal Kurowski perl -e '$_=q#: 13_2: 12/o{>: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7: 12m m::#; y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print' From dmitry at athabascau.ca Wed Aug 18 10:49:13 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Wed Aug 18 10:48:09 2004 Subject: [Zope-CMF] Re: [Plone-users] DCWorkflow "cheat" question In-Reply-To: <16674.21166.87676.570237@gargle.gargle.HOWL> References: <200408161059.40120.dmitry@athabascau.ca> <16674.21166.87676.570237@gargle.gargle.HOWL> Message-ID: <200408180849.14256.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 17, 2004 12:47 pm, Dieter Maurer wrote: > You can cheat with the "{get|set}StatusOf" WorkflowTool methods. > Note that cheating is potentially dangerous. those are "private" anyway -no cheating :) > >Or any other alternatives with the same functionality? > > I use automatic transitions for a similar purpose. Thanks for suggestion it did work for me although automatic transition are kind of strange in a way that those are not "executed as soon as guardian conditions met" but "executed right after another workflow transition finished and if guardian conditions set" unless I'm missing something I had to adjust to that model rather than just modify part of an object and have transition activated automaticaly :( - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBI2xpyDrVuGfS98QRAs2+AKDFNXSE0qdM5i8QUQFnt4HLvp8ZiQCcCo3T YUK8M0AlwJUiCSIcyNEmUC4= =6dR5 -----END PGP SIGNATURE----- From gerry at faithonline.com Wed Aug 18 11:37:23 2004 From: gerry at faithonline.com (Gerry Kirk) Date: Wed Aug 18 11:37:36 2004 Subject: [Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE In-Reply-To: <40607731.5050908@zope.com> References: <405F370E.6020600@wcm-solutions.de> <405F4146.8030903@zope.com> <40602FB8.9030606@wcm-solutions.de> <406056C6.7000501@zope.com> <406060FC.60507@wcm-solutions.de> <40607731.5050908@zope.com> Message-ID: <412377B3.5060100@faithonline.com> Was anything more done on this? - Gerry Tres Seaver wrote: > yuppie wrote: > >> Hi! >> >> >> Tres Seaver wrote: >> >>> yuppie wrote: >>> >>>> As proposed in we would need to >>>> support old and new indexes because Zope 2.5 doesn't have DateIndex >>>> / DateRangeIndex. >>>> >>>> What about adding additional methods to the CatalogableDublinCore >>>> interface that return the values needed by the new indexes? This way >>>> they could co-exist with the old indexes that use the old methods. >>> >>> >>> >>> >>> I would rather kill off the _CEILING_DATE / _FLOOR_DATE bit >>> altogether; perhaps what we really need is three indexes: >>> >>> 'effectiveRange' -- a DateRangeIndex against 'effective' / 'expires'; >> >> >> >> Maybe we should better use a Dublin Core term: 'available' (or 'valid'?) >> >> > > > 'valid' is probably a closer match, I think. > >>> 'effective' -- an as-yet notional DefaultedDateIndex against >>> 'effective', mapping 'None' as "earliest" >>> >>> 'expires' -- a DefaultedDateIndex against 'expires', mapping 'None' >>> as "latest". >> >> >> >> I'm not sure if we still need these two at all. Are they used in any >> place where we can't use the range index instead? > > > There are a number of different use cases which might need one or the > other, but not the range. E.g., archiving wants to find only content > which has expired, in order to remove it. DateRangeIndex is optimized > for a different query. > >>> This DefaultedDateIndex class would derive from DateIndex, special >>> casing its handling of 'None', presumably via a radio button on the >>> index UI itself, which would offer: >>> >>> "earliest" -- map 'None' or "missing" as earlier than all possible >>> dates >>> >>> "latest" -- map 'None' or "missing" as later than all possible dates >>> >>> "ignore" -- don't index content with 'None' or missing values. >>> >>> We could propose adding this functionality to the Zope core (in the >>> DateIndex package), but supply our own implementation in the >>> meanwhile, using importability tests. >> >> >> >> That might make sense. Are there any volunteers for this work? > > > Hmm... /me could be traveling a bit soon. > > Tres. From chris at simplistix.co.uk Thu Aug 19 02:52:14 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Thu Aug 19 02:52:44 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <16674.22470.153948.160714@gargle.gargle.HOWL> References: <412040F3.6040409@redcor.ch> <16672.62974.384394.212839@gargle.gargle.HOWL> <4121AD2E.50705@simplistix.co.uk> <16674.22470.153948.160714@gargle.gargle.HOWL> Message-ID: <41244E1E.4030005@simplistix.co.uk> Dieter Maurer wrote: >>Not always... what if you're using it to move data between Zope >>instances or just between ZODB's? > > Then you abuse "export/import": Rubbish. That's the main reason the functionality is there. It's also the reason why an option to do what I want has already been added ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From regebro at nuxeo.com Thu Aug 19 05:17:34 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Thu Aug 19 05:17:37 2004 Subject: [Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE In-Reply-To: <412377B3.5060100@faithonline.com> References: <405F370E.6020600@wcm-solutions.de> <405F4146.8030903@zope.com> <40602FB8.9030606@wcm-solutions.de> <406056C6.7000501@zope.com> <406060FC.60507@wcm-solutions.de> <40607731.5050908@zope.com> <412377B3.5060100@faithonline.com> Message-ID: <4124702E.4090302@nuxeo.com> Gerry Kirk wrote: > Was anything more done on this? > - Gerry Not that I know of. I tried to get the unittests running during last bugday, so I could make a unittest that failed and then fix the bug. But after an hour the unittest still would not run and I gave up. Unified unittesting between Zope, CMF and thirdparty products would be nice. From y.2004_ at wcm-solutions.de Thu Aug 19 07:27:46 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 19 07:28:57 2004 Subject: [Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE In-Reply-To: <4124702E.4090302@nuxeo.com> References: <405F370E.6020600@wcm-solutions.de> <405F4146.8030903@zope.com> <40602FB8.9030606@wcm-solutions.de> <406056C6.7000501@zope.com> <406060FC.60507@wcm-solutions.de> <40607731.5050908@zope.com> <412377B3.5060100@faithonline.com> <4124702E.4090302@nuxeo.com> Message-ID: <41248EB2.7010000@wcm-solutions.de> Lennart Regebro wrote: > Gerry Kirk wrote: > >> Was anything more done on this? > > Not that I know of. __CEILING_DATE was changed to a value that also works with DateIndex. Nothing else was done. > I tried to get the unittests running during last bugday, so I could make > a unittest that failed and then fix the bug. But after an hour the > unittest still would not run and I gave up. On which platform? Can you tell us how you tried it and how far you got? Maybe unittests or documentation can be improved based on your experience. Cheers, Yuppie From regebro at nuxeo.com Thu Aug 19 07:45:03 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Thu Aug 19 07:45:08 2004 Subject: [Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE In-Reply-To: <41248EB2.7010000@wcm-solutions.de> References: <405F370E.6020600@wcm-solutions.de> <405F4146.8030903@zope.com> <40602FB8.9030606@wcm-solutions.de> <406056C6.7000501@zope.com> <406060FC.60507@wcm-solutions.de> <40607731.5050908@zope.com> <412377B3.5060100@faithonline.com> <4124702E.4090302@nuxeo.com> <41248EB2.7010000@wcm-solutions.de> Message-ID: <412492BF.5040201@nuxeo.com> yuppie wrote: > On which platform? Unix. > Can you tell us how you tried it and how far you got? I already forgot... From stefan at epy.co.at Thu Aug 19 08:39:54 2004 From: stefan at epy.co.at (Stefan H. Holek) Date: Thu Aug 19 08:40:07 2004 Subject: [Zope-CMF] Re: [dev] DateIndex and __CEILING_DATE In-Reply-To: <4124702E.4090302@nuxeo.com> Message-ID: With test.py from 2.7 branch or trunk: cd /path/to/instance /path/to/Zope/bin/test.py -C etc/zope.conf --libdir Products -v With testrunner.py from http://zope.org/Members/shh/Testrunner: cd /path/to/instance /path/to/Zope/bin/testrunner.py -q -i -d Products On Donnerstag, Aug 19, 2004, at 11:17 Europe/Vienna, Lennart Regebro wrote: > Unified unittesting between Zope, CMF and thirdparty products would be > nice. -- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/ From regebro at nuxeo.com Thu Aug 19 08:44:39 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Thu Aug 19 08:44:44 2004 Subject: [Zope-CMF] Unified unittests. In-Reply-To: References: Message-ID: <4124A0B7.9090905@nuxeo.com> Stefan H. Holek wrote: > With testrunner.py from http://zope.org/Members/shh/Testrunner: > > cd /path/to/instance > /path/to/Zope/bin/testrunner.py -q -i -d Products Last time this was discussed there was some reason given NOT to merge this tesrunners modifications into Zope itself. I did not understand those reasons. Could somebody that understands them reiterate them and we can try again? I still don't see why we can't use one testrunner to run all tests, including CMF tests. It would be nice it ZopeTestCase was included with Zope default too, since it really makes it much easier to write unit tests in Zope. From dmitry at athabascau.ca Thu Aug 19 12:36:07 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Thu Aug 19 12:34:53 2004 Subject: [Zope-CMF] Bugs, bugs, bugs... Message-ID: <200408191036.11394.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've filed bug report here: http://plone.org/collector/3384 which relates to both Plone and CMF as both use similar scripts for folder_{copy,delete,cut} Scripts are broken in CMF-1.4+, CMF-1.5x and Plone-2.0.x - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBJNb6yDrVuGfS98QRAn7xAKCR2XsjSXGLW05Lza3oeloUZg5mawCgktH0 HBLH+YGWrLJ+K5M98B1TyMk= =uN0c -----END PGP SIGNATURE----- From y.2004_ at wcm-solutions.de Thu Aug 19 13:34:19 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 19 13:34:59 2004 Subject: [Zope-CMF] Re: Bugs, bugs, bugs... In-Reply-To: <200408191036.11394.dmitry@athabascau.ca> References: <200408191036.11394.dmitry@athabascau.ca> Message-ID: <4124E49B.4020408@wcm-solutions.de> Dmitry S. Makovey wrote: > I've filed bug report here: > http://plone.org/collector/3384 which relates to both Plone and CMF as both > use similar scripts for folder_{copy,delete,cut} > > Scripts are broken in CMF-1.4+, CMF-1.5x and Plone-2.0.x Fixed folder_copy_control and folder_cut_control on CMF-1_5-branch and HEAD. Can't reproduce it with delete. Cheers, Yuppie From dmitry at athabascau.ca Thu Aug 19 14:14:48 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Thu Aug 19 14:13:32 2004 Subject: [Zope-CMF] Re: Bugs, bugs, bugs... In-Reply-To: <4124E49B.4020408@wcm-solutions.de> References: <200408191036.11394.dmitry@athabascau.ca> <4124E49B.4020408@wcm-solutions.de> Message-ID: <200408191214.49645.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 19, 2004 11:34 am, yuppie wrote: > Dmitry S. Makovey wrote: > > I've filed bug report here: > > http://plone.org/collector/3384 which relates to both Plone and CMF as > > both use similar scripts for folder_{copy,delete,cut} > > > > Scripts are broken in CMF-1.4+, CMF-1.5x and Plone-2.0.x > > Fixed folder_copy_control and folder_cut_control on CMF-1_5-branch and > HEAD. cool, thanks. But no fixes for 1.4? :( > Can't reproduce it with delete. right. there's confusion with those permissions - copy&move are for object itself and delete is for folder containing object. setting it up on object doesn't change a thing, although I wish it did (even if it's not logical in some cases) > > Cheers, Yuppie > > _______________________________________________ > Zope-CMF maillist - Zope-CMF@lists.zope.org > http://mail.zope.org/mailman/listinfo/zope-cmf > > See http://collector.zope.org/CMF for bug reports and feature requests - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBJO4YyDrVuGfS98QRArYeAKCIOkQrcLnyjznptW90sY09QBF/9ACguXHY 62soM44BWLgwvt5i/Shd71g= =tffT -----END PGP SIGNATURE----- From y.2004_ at wcm-solutions.de Thu Aug 19 14:20:44 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 19 14:21:38 2004 Subject: [Zope-CMF] Re: Bugs, bugs, bugs... In-Reply-To: <200408191214.49645.dmitry@athabascau.ca> References: <200408191036.11394.dmitry@athabascau.ca> <4124E49B.4020408@wcm-solutions.de> <200408191214.49645.dmitry@athabascau.ca> Message-ID: <4124EF7C.6000208@wcm-solutions.de> Dmitry S. Makovey wrote: >>>Scripts are broken in CMF-1.4+, CMF-1.5x and Plone-2.0.x >> >>Fixed folder_copy_control and folder_cut_control on CMF-1_5-branch and >>HEAD. > > cool, thanks. But no fixes for 1.4? :( No. The CMF-1_4-branch is no longer active. See: Cheers, Yuppie From chris at simplistix.co.uk Fri Aug 20 01:16:18 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Fri Aug 20 01:17:00 2004 Subject: [Zope-CMF] Unified unittests. In-Reply-To: <4124A0B7.9090905@nuxeo.com> References: <4124A0B7.9090905@nuxeo.com> Message-ID: <41258922.4000703@simplistix.co.uk> Lennart Regebro wrote: > I still don't see why we can't use one testrunner to run all tests, > including CMF tests. It would be nice it ZopeTestCase was included with > Zope default too, since it really makes it much easier to write unit > tests in Zope. Open an issue in the Zope collector and we can have a look on the next bug day, which, I believe, is also due to be a CMF bug day :-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From regebro at nuxeo.com Fri Aug 20 04:20:59 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Fri Aug 20 04:21:00 2004 Subject: [Zope-CMF] Unified unittests. In-Reply-To: <41258922.4000703@simplistix.co.uk> References: <4124A0B7.9090905@nuxeo.com> <41258922.4000703@simplistix.co.uk> Message-ID: <4125B46B.4070409@nuxeo.com> Chris Withers wrote: > Lennart Regebro wrote: > >> I still don't see why we can't use one testrunner to run all tests, >> including CMF tests. It would be nice it ZopeTestCase was included >> with Zope default too, since it really makes it much easier to write >> unit tests in Zope. > > > Open an issue in the Zope collector Doh! *slaps forhead* OK, I'll do that. From dario at ita.chalmers.se Fri Aug 20 10:24:15 2004 From: dario at ita.chalmers.se (=?ISO-8859-1?Q?Dario_Lopez-K=E4sten?=) Date: Fri Aug 20 10:24:22 2004 Subject: [Zope-CMF] Re: CMFUid isn't generating real uids In-Reply-To: <5.1.0.14.2.20040816161219.00af8758@127.0.0.1> References: <411F9554.4010508@nuxeo.com> <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> <5.1.0.14.2.20040816161219.00af8758@127.0.0.1> Message-ID: <4126098F.2070909@ita.chalmers.se> Gregoire Weber wrote: > Salut Jean-Marc, > > >>I think that the confusion comes from the fact being "unique" is not a property that something has intrinsically (as for an object being "red", "blue", ...) even though the expression 'X is unique ' is a one-place predicate. - but in fact it always has to be taken in relation to a policy that needs to be enforced throughout. In the context of a "unique ID" the policy can be enforced inside a same folder, in the case of a universally unique ID the policy must be enforced inside the context that the term "universal" refers too - So "uniqueness" is more of the nature of laws, regulations, concepts, habits (...) than of the nature of a quality, and this is why the best UID generator is the one that can best enforce a given policy. > > > Well stated! > > I'll updating the README.txt this week by something similar to that: > > The unique ids generated by CMFUid *are unique by CMF instance*. > > On imports existing CMFUid uids get deleted to avoid doubling > uids. > > Gregoire http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761 for a micro-discussion on where to get references to UUID's. Or we could just use a base counter, and base the UID on an OID, that we get ourselves assigned either from IANA, ANSI or BSI, http://www.alvestrand.no/objectid/ or if we need not be that formal, from a regsitry we create ourselves: oid.zope.org or oid.plone.org or whatever. OIDs could effetively be served on a first come, first served basis. Just some random thoughts. /dario -- -- ------------------------------------------------------------------- Dario Lopez-K?sten, IT Systems & Services Chalmers University of Tech. From regebro at nuxeo.com Fri Aug 20 11:39:43 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Fri Aug 20 11:39:51 2004 Subject: [Zope-CMF] More unit test questions In-Reply-To: <41260F41.8040106@regebro.nu> References: <41260F41.8040106@regebro.nu> Message-ID: <41261B3F.4080705@nuxeo.com> OK, I got test.py running. But if I run bin/python test.py Products it will happily try to run the tests in all products. But if I type bin/python test.py Products/Productname It will find no tests at all. bin/python test.py Products/Productname/tests is no better. BUT! If I type bin/python test.py lib/python/Products/ZCTextIndex it does find the tests for ZCTextIndex. In short: Heuh? What are the difference that makes it impossible to test just one products unit test if it's located in Products instead of lib/python/Products. Or is there a difference in how the CMF tests are written? Anybody know? From regebro at nuxeo.com Fri Aug 20 12:05:23 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Fri Aug 20 12:05:28 2004 Subject: [Zope-CMF] More unit test questions In-Reply-To: <41261B3F.4080705@nuxeo.com> References: <41260F41.8040106@regebro.nu> <41261B3F.4080705@nuxeo.com> Message-ID: <41262143.7050003@nuxeo.com> Lennart Regebro wrote: > OK, I got test.py running. But if I run > bin/python test.py Products > it will happily try to run the tests in all products. But if I type > bin/python test.py Products/Productname > It will find no tests at all. > bin/python test.py Products/Productname/tests > is no better. M??p! I was wrong. In fact, I have so far been completely unable to run any unit tests outside of lib/python with test.py. Running "bin/python test.py Products" will run all tests in lib/python/Products. Hardly obvious I must say... From y.2004_ at wcm-solutions.de Fri Aug 20 12:42:47 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Fri Aug 20 12:43:43 2004 Subject: [Zope-CMF] Re: More unit test questions In-Reply-To: <41262143.7050003@nuxeo.com> References: <41260F41.8040106@regebro.nu> <41261B3F.4080705@nuxeo.com> <41262143.7050003@nuxeo.com> Message-ID: <41262A07.50803@wcm-solutions.de> Lennart Regebro wrote: > Lennart Regebro wrote: > >> OK, I got test.py running. But if I run >> bin/python test.py Products >> it will happily try to run the tests in all products. But if I type >> bin/python test.py Products/Productname >> It will find no tests at all. >> bin/python test.py Products/Productname/tests >> is no better. > > > M??p! I was wrong. In fact, I have so far been completely unable to run > any unit tests outside of lib/python with test.py. > > Running "bin/python test.py Products" will run all tests in > lib/python/Products. Hardly obvious I must say... The easiest way is to run test.py from within zopectl. This way you don't have to care about Zope configuration. test.py --help shows you the available options. These work for me on linux: $ path/to/zopectl run path/to/test.py --libdir path/to/Products -v $ path/to/zopectl run path/to/test.py --libdir path/to/Products/CMFCore -v HTH, Yuppie From gregweb at gmx.ch Fri Aug 20 13:23:31 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 20 13:13:39 2004 Subject: [Zope-CMF] Resources about generating real UUIDs/GUIDs In-Reply-To: <4126098F.2070909@ita.chalmers.se> References: <5.1.0.14.2.20040816161219.00af8758@127.0.0.1> <411F9554.4010508@nuxeo.com> <1092554978.3503.84.camel@hermes.objectrealms.net> <411F9554.4010508@nuxeo.com> <5.1.0.14.2.20040816161219.00af8758@127.0.0.1> Message-ID: <5.1.0.14.2.20040820190011.02c9bb88@127.0.0.1> Just for the memory: A UUID URN Namespace: draft-mealling-uuid-urn-03.txt: [3] in http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761 has a C-Implementation but seems expired. Another resource on standard conforming UUIDs/GUIDs: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/163604 http://lists.oasis-open.org/archives/security-services/200403/msg00183.html Not sure if I have time to integrate such a generator before CMF 1.5 final. IMHO, actually a UUID/GUID-Library should be part of python. Gregoire At 16:24 20.08.2004 +0200, you wrote: >Gregoire Weber wrote: > >>Salut Jean-Marc, >> >>>I think that the confusion comes from the fact being "unique" is not a property that something has intrinsically (as for an object being "red", "blue", ...) even though the expression 'X is unique ' is a one-place predicate. - but in fact it always has to be taken in relation to a policy that needs to be enforced throughout. In the context of a "unique ID" the policy can be enforced inside a same folder, in the case of a universally unique ID the policy must be enforced inside the context that the term "universal" refers too - So "uniqueness" is more of the nature of laws, regulations, concepts, habits (...) than of the nature of a quality, and this is why the best UID generator is the one that can best enforce a given policy. >> >>Well stated! >>I'll updating the README.txt this week by something similar to that: >> The unique ids generated by CMFUid *are unique by CMF instance*. >> On imports existing CMFUid uids get deleted to avoid doubling >> uids. >>Gregoire > >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/213761 > >for a micro-discussion on where to get references to UUID's. > >Or we could just use a base counter, and base the UID on an OID, that we get ourselves assigned either from IANA, ANSI or BSI, > >http://www.alvestrand.no/objectid/ > >or if we need not be that formal, from a regsitry we create ourselves: > >oid.zope.org > >or > >oid.plone.org > >or whatever. OIDs could effetively be served on a first come, first served basis. > > >Just some random thoughts. > >/dario > >-- >-- ------------------------------------------------------------------- >Dario Lopez-K?sten, IT Systems & Services Chalmers University of Tech. >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From gregweb at gmx.ch Fri Aug 20 13:30:59 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Fri Aug 20 13:21:08 2004 Subject: [Zope-CMF] Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <4117A3E2.4040209@wcm-solutions.de> References: <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> Message-ID: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> Hi! just before the beta 1.5 release there was a discussion about permanent urls which stoped suddenly. If this feature has to go into CMF 1.5 definitively and the current implementation in CMFDeafult isn't satisfying enough we should restart the discussion to get to a definitive decission how to do it (if we do it). Thoughts? I'll be away from the 28. september for a little more than two weeks. I'll have a look at it the next week but would apreciate input from people. Gregoire At 18:18 09.08.2004 +0200, yuppie wrote: >Hi! > > >Gr?goire Weber wrote: >>>I had a closer look at the permalink stuff. And I don't think this idea is mature enough to ship permalinks with CMF 1.5. >>> >>>- Permalinks should have speaking names, not numbers. >>> >>>- Permalinks should point to the primary location of the object. Combined with a centralized content repository they make more sense. >>> >>>- Implementing permalinks as aliases causes a lot of problems: >>> >>> o do search engines index both locations? >>> >>> o do relative links work? >>> >>> o is the navigation consistent? >> >>I know. I'd liked to expose the unique id functionality a little bit. >>That's why I introduced the permalink feature. The question is if this >>is the right name. > >It's the Right Thing to expose framework functionality in CMFDefault. This way the features are better tested (the permalink feature helped to find the Unauthorized bug) and people can see how to use them. > >The problem with CMFUid is that its function is to work in the background. IMHO the changes in Favorite are a much better example of how to use CMFUid. > >>>This is the old way to do it. The CMF 1.5 way looks like this: >>> >>>... >>>ti = obj.getTypeInfo() >>>method = ti.getMethodPath('view')[0] >>>... >> >>ok >> >>>And BTW: tal:on-error is a bare except! >> >>I know and I don't like it neither. It's to catch exceptions if someone did not to install CMFUid. > >Did tal:condition="python: uidtool and not isFolderish" of your first checkin not do that job? > >>How to proceed? Shall the changes be reverted? I personally >>would like people to see the new functionality. >>I'm here on a modem. I'll check e-mail at 20:00 (european time). >>I can act if I hear something till then! > >I don't think this is urgent, changing this after the beta release should be fine. This gives us more time to think about a better solution. > > >Just my 2 cents. > >Yuppie > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From regebro at nuxeo.com Fri Aug 20 13:35:16 2004 From: regebro at nuxeo.com (Lennart Regebro) Date: Fri Aug 20 13:35:28 2004 Subject: [Zope-CMF] Re: More unit test questions In-Reply-To: <41262A07.50803@wcm-solutions.de> References: <41260F41.8040106@regebro.nu> <41261B3F.4080705@nuxeo.com> <41262143.7050003@nuxeo.com> <41262A07.50803@wcm-solutions.de> Message-ID: <41263654.6030601@nuxeo.com> yuppie wrote: > $ path/to/zopectl run path/to/test.py --libdir path/to/Products -v > $ path/to/zopectl run path/to/test.py --libdir path/to/Products/CMFCore -v OK, I got it to work now. The bug is that it stops working if you have a trailing slash on the path. From dieter at handshake.de Fri Aug 20 14:44:30 2004 From: dieter at handshake.de (Dieter Maurer) Date: Fri Aug 20 14:58:36 2004 Subject: [Zope-CMF] More unit test questions In-Reply-To: <41261B3F.4080705@nuxeo.com> References: <41260F41.8040106@regebro.nu> <41261B3F.4080705@nuxeo.com> Message-ID: <16678.18062.970923.907474@gargle.gargle.HOWL> Lennart Regebro wrote at 2004-8-20 17:39 +0200: >OK, I got test.py running. But if I run > bin/python test.py Products This should probably be: ... test.py --libdir Products Note also, that "test.py" treats symbolic links in an unexpected way (it resolves the path and may then no longer find its library). -- Dieter From tseaver at zope.com Fri Aug 20 17:29:45 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 20 17:30:52 2004 Subject: [Zope-CMF] Re: Bugs, bugs, bugs... In-Reply-To: <4124EF7C.6000208@wcm-solutions.de> References: <200408191036.11394.dmitry@athabascau.ca> <4124E49B.4020408@wcm-solutions.de> <200408191214.49645.dmitry@athabascau.ca> <4124EF7C.6000208@wcm-solutions.de> Message-ID: <41266D49.9070107@zope.com> yuppie wrote: > Dmitry S. Makovey wrote: > >>>> Scripts are broken in CMF-1.4+, CMF-1.5x and Plone-2.0.x >>> >>> >>> Fixed folder_copy_control and folder_cut_control on CMF-1_5-branch and >>> HEAD. >> >> >> cool, thanks. But no fixes for 1.4? :( > > > No. The CMF-1_4-branch is no longer active. See: > The "official" line is that 1.4 is now inactive. If somebody wants to step up and take on the release management chores (e.g., to support further Plone releases which depend on 1.4), I will be happy to work with them on the process / permissions. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From tseaver at zope.com Fri Aug 20 17:33:18 2004 From: tseaver at zope.com (Tres Seaver) Date: Fri Aug 20 17:51:16 2004 Subject: [Zope-CMF] Re: [Plone-users] DCWorkflow "cheat" question In-Reply-To: <200408180849.14256.dmitry@athabascau.ca> References: <200408161059.40120.dmitry@athabascau.ca> <16674.21166.87676.570237@gargle.gargle.HOWL> <200408180849.14256.dmitry@athabascau.ca> Message-ID: <41266E1E.40101@zope.com> Dmitry S. Makovey wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On August 17, 2004 12:47 pm, Dieter Maurer wrote: > >>You can cheat with the "{get|set}StatusOf" WorkflowTool methods. >>Note that cheating is potentially dangerous. > > > those are "private" anyway -no cheating :) > > >>>Or any other alternatives with the same functionality? >> >>I use automatic transitions for a similar purpose. > > > Thanks for suggestion it did work for me although automatic transition are > kind of strange in a way that those are not "executed as soon as guardian > conditions met" but "executed right after another workflow transition > finished and if guardian conditions set" unless I'm missing something I had > to adjust to that model rather than just modify part of an object and have > transition activated automaticaly :( Right; the workflow system is "reactive", and needs to be notified that an object might need to transit. E.g., imagine the case where your guard condition for the "expire" transition is "object.expired() < ZopeTime()". Unless you trigger the workflow mechanism, the transition won't occur. You could also arrange to trigger workflow transitions during your "edit" handling scripts; this is what the old, now-deprecated WorkflowMethod wrapper did. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From y.2004_ at wcm-solutions.de Sun Aug 22 11:36:16 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 22 11:37:45 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> References: <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> Message-ID: <4128BD70.7090308@wcm-solutions.de> Hi! Gregoire Weber wrote: > If this feature has to go into CMF 1.5 definitively and the current > implementation in CMFDeafult isn't satisfying enough we should restart > the discussion to get to a definitive decission how to do it (if we do > it). Adding UID based aliases for content items introduced many problems. As long as these issues are not resolved I don't like to have permalinks in the 'Basic' skin. But what about adding a second ZPT skin? I think the DTML skins should be removed after CMF 1.5. If people agree, we would anyway need another ZPT skin to show the skin switching feature. An 'Experimental' skin that shows some concepts that aren't mature or don't fit into the 'Basic' skin could be quite useful. > I'll be away from the 28. september for a little more than two weeks. You mean August? Cheers, Yuppie From y.2004_ at wcm-solutions.de Sun Aug 22 12:48:31 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 22 12:50:31 2004 Subject: [Zope-CMF] Re: WorkflowMethod wrapper for Event/edit breaks XMLRPC In-Reply-To: <411E37DE.4060806@zope.com> References: <411D8C16.80403@joelburton.com> <411E37DE.4060806@zope.com> Message-ID: <4128CE5F.50507@wcm-solutions.de> Hi! Tres Seaver wrote: > [...] In the meantime, stripping > out WorkflowMethod is an obvious bit of cleanup. If there are no objections, I'll - remove the remaining WorkflowMethod wrappers (CMF 1.5) - mark WorkflowMethod as deprecated (CMF 1.5) - remove WorkflowMethod and related code (HEAD / CMF 1.6), including o WorkflowTool: wrapWorkflowMethod o DCWorkflow: isWorkflowMethodSupported, wrapWorkflowMethod o Trigger type "WorkflowMethod" in DCWorkflow and CMFSetup Cheers, Yuppie From y.2004_ at wcm-solutions.de Sun Aug 22 14:51:29 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Sun Aug 22 14:53:03 2004 Subject: [Zope-CMF] [dev] small WebDAV improvement Message-ID: <4128EB31.8020605@wcm-solutions.de> Hi! If there are no objections or better ideas, I'd like to add this code to PortalFolder (CMF 1.5 and HEAD): def listDAVObjects(self): if _checkPermission(ManagePortal, self): return self.objectValues() else: return self.listFolderContents() This way hidden objects like tools are only shown to managers. Cheers, Yuppie From sidnei at awkly.org Sun Aug 22 15:53:10 2004 From: sidnei at awkly.org (Sidnei da Silva) Date: Sun Aug 22 17:30:41 2004 Subject: [Zope-CMF] [dev] small WebDAV improvement In-Reply-To: <4128EB31.8020605@wcm-solutions.de> References: <4128EB31.8020605@wcm-solutions.de> Message-ID: <20040822195310.GI14794@cotia.awkly.org> On Sun, Aug 22, 2004 at 08:51:29PM +0200, yuppie wrote: | Hi! | | | If there are no objections or better ideas, I'd like to add this code to | PortalFolder (CMF 1.5 and HEAD): | | def listDAVObjects(self): | if _checkPermission(ManagePortal, self): | return self.objectValues() | else: | return self.listFolderContents() | | This way hidden objects like tools are only shown to managers. Just to confirm, listFolderContents also hides objects the user is not allowed to see? If yes, I give a +1 for it. I have been asked yesterday for the exact same feature. -- Sidnei da Silva http://awkly.org - dreamcatching :: making your dreams come true http://www.enfoldsystems.com http://plone.org/about/team#dreamcatcher You are in a maze of little twisting passages, all alike. From y.2004_ at wcm-solutions.de Mon Aug 23 08:05:08 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Mon Aug 23 08:05:40 2004 Subject: [Zope-CMF] Re: [dev] small WebDAV improvement In-Reply-To: <20040822195310.GI14794@cotia.awkly.org> References: <4128EB31.8020605@wcm-solutions.de> <20040822195310.GI14794@cotia.awkly.org> Message-ID: <4129DD74.4050209@wcm-solutions.de> Sidnei da Silva wrote: > On Sun, Aug 22, 2004 at 08:51:29PM +0200, yuppie wrote: > | If there are no objections or better ideas, I'd like to add this code to > | PortalFolder (CMF 1.5 and HEAD): > | > | def listDAVObjects(self): > | if _checkPermission(ManagePortal, self): > | return self.objectValues() > | else: > | return self.listFolderContents() > | > | This way hidden objects like tools are only shown to managers. > > Just to confirm, listFolderContents also hides objects the user is not > allowed to see? Yes. Cheers, Yuppie From fg at nuxeo.com Mon Aug 23 10:31:21 2004 From: fg at nuxeo.com (Florent Guillaume) Date: Mon Aug 23 10:31:30 2004 Subject: [Zope-CMF] errors in FS PT Message-ID: <4129FFB9.4030601@nuxeo.com> CMFCore/FSPageTemplate.py has this code: def pt_render(self, source=0, extra_context={}): ... try: result = FSPageTemplate.inheritedAttribute('pt_render')( self, source, extra_context) ... return result except RuntimeError: if Globals.DevelopmentMode: err = FSPageTemplate.inheritedAttribute('pt_errors')( self) if not err: err = sys.exc_info() err_type = err[0] err_msg = '
%s
' % replace( str(err[1]), "\'", "'" ) msg = 'FS Page Template %s has errors: %s.
%s' % ( self.id, err_type, html_quote(err_msg) ) raise RuntimeError, msg else: raise This codes actully dumbs down error in debug mode to a simple "there are errors" without detailed info, and leaves the complete useful traceback in non-debug mode. I feel this is backwards. In development mode I want to view the whole traceback, with the details of where in what macro there is a problem! And in non-debug mode few people see the errors anyway. In all my development instances I've added a 'raise' after the except because it prevents me from finding bugs. I want to change the test to its opposite. Anyone against that? I could even remove the dumbing down altogether. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 71 59 http://nuxeo.com mailto:fg@nuxeo.com From simon at joyful.com Mon Aug 23 17:48:30 2004 From: simon at joyful.com (Simon Michael) Date: Mon Aug 23 17:51:45 2004 Subject: [Zope-CMF] Re: Major performance booster for your site [IssueNo0115] In-Reply-To: References: Message-ID: <412A662E.6030305@joyful.com> For reference: Gerry Kirk wrote: > Hi, > > I switched to the newer DateIndex and DateRangeIndex indexes and saw a > tremendous boost in the performance of my site, especially by using a > DateRangeIndex for the effective/expires keywords which are part of > every standard catalog search in CMF/Plone. More information on how to > make the change here: > http://plone.org/documentation/howto/OptimizingCatalogs > > Thanks to Dieter, Tres and others who posted info on various mailing > lists about this. From gregweb at gmx.ch Mon Aug 23 18:03:14 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Mon Aug 23 17:53:42 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <4128BD70.7090308@wcm-solutions.de> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> Message-ID: <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> Hi! >Gregoire Weber wrote: >>If this feature has to go into CMF 1.5 definitively and the current >>implementation in CMFDeafult isn't satisfying enough we should restart >>the discussion to get to a definitive decission how to do it (if we do it). > >Adding UID based aliases for content items introduced many problems. As long as these issues are not resolved I don't like to have permalinks in the 'Basic' skin. Ok, I could aggree. What about puting logic into a PyScript and circumvent the tal:on-error hack? >But what about adding a second ZPT skin? I think the DTML skins should be removed after CMF 1.5. If people agree, we would anyway need another ZPT skin to show the skin switching feature. An 'Experimental' skin that shows some concepts that aren't mature or don't fit into the 'Basic' skin could be quite useful. Could CMFUrlSkinSwitcher be a candidate or a base of your "skins switcher feature"? http://cvs.sourceforge.net/viewcvs.py/collective/CMFUrlSkinSwitcher/ Unfortuanately doesn't work fully in Stock CMF. Needs Plone 2.0.x login and logout script infrastructure. Another question: Who is currently *really* using the CMFDefault skin? >>I'll be away from the 28. september for a little more than two weeks. > >You mean August? ... (really need these vacations :-) Gregoire From tseaver at zope.com Mon Aug 23 18:26:44 2004 From: tseaver at zope.com (Tres Seaver) Date: Mon Aug 23 18:27:48 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> Message-ID: <412A6F24.5080307@zope.com> Gregoire Weber wrote: > Hi! > > >>Gregoire Weber wrote: >> >>>If this feature has to go into CMF 1.5 definitively and the current >>>implementation in CMFDeafult isn't satisfying enough we should restart >>>the discussion to get to a definitive decission how to do it (if we do it). >> >>Adding UID based aliases for content items introduced many problems. As long as these issues are not resolved I don't like to have permalinks in the 'Basic' skin. > > > Ok, I could aggree. What about puting logic into a PyScript and > circumvent the tal:on-error hack? > > > >>But what about adding a second ZPT skin? I think the DTML skins should be removed after CMF 1.5. If people agree, we would anyway need another ZPT skin to show the skin switching feature. An 'Experimental' skin that shows some concepts that aren't mature or don't fit into the 'Basic' skin could be quite useful. > > > Could CMFUrlSkinSwitcher be a candidate or a base of your > "skins switcher feature"? > > http://cvs.sourceforge.net/viewcvs.py/collective/CMFUrlSkinSwitcher/ > > Unfortuanately doesn't work fully in Stock CMF. Needs Plone 2.0.x login > and logout script infrastructure. > > > Another question: Who is currently *really* using the CMFDefault skin? I'll bet $10USD that every Plone site in the world depends on at least some of the templates / controller scripts in those skins. I have a number of non-Plone sites which make use of CMFDefault with a minimal amount of 'main_template' tweakery on top. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From jens at dataflake.org Tue Aug 24 02:24:38 2004 From: jens at dataflake.org (Jens Vagelpohl) Date: Tue Aug 24 02:24:55 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <412A6F24.5080307@zope.com> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> <412A6F24.5080307@zope.com> Message-ID: <4690D503-F596-11D8-BCA7-000D9368D272@dataflake.org> >> Another question: Who is currently *really* using the CMFDefault skin? > > I'll bet $10USD that every Plone site in the world depends on at least > some of the templates / controller scripts in those skins. > > I have a number of non-Plone sites which make use of CMFDefault with a > minimal amount of 'main_template' tweakery on top. How about inciting some riots at the Plone conference with a t-shirt that says "Real men use CMFDefault"? ;) jens From y.2004_ at wcm-solutions.de Tue Aug 24 03:28:09 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Tue Aug 24 03:30:43 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> Message-ID: <412AEE09.8010901@wcm-solutions.de> Hi! Gregoire Weber wrote: >>Adding UID based aliases for content items introduced many problems. As long as these issues are not resolved I don't like to have permalinks in the 'Basic' skin. > > Ok, I could aggree. What about puting logic into a PyScript and > circumvent the tal:on-error hack? Not sure I understand what you propose. With "introduced problems" I don't mean the implementation details, but issues like broken relative links and confusing navigation. >>But what about adding a second ZPT skin? I think the DTML skins should be removed after CMF 1.5. If people agree, we would anyway need another ZPT skin to show the skin switching feature. An 'Experimental' skin that shows some concepts that aren't mature or don't fit into the 'Basic' skin could be quite useful. > > Could CMFUrlSkinSwitcher be a candidate or a base of your > "skins switcher feature"? It seems I wasn't clear enough. I just meant the already built in ways to switch skins. If we remove the DTML skins, there is only one skin left. So all I was talking about is: - adding a new skin folder with the 2 files you modified - adding a new skin in setupDefaultSkins > Another question: Who is currently *really* using the CMFDefault skin? Me ;) If you don't need a sexy and feature loaded community site, CMFDefault has some advantages over CPS or Plone: - it's leaner and faster - it depends only on Zope - it has a more flexible license And last but not least: It's easier to work on the CMF if you use it. Cheers, Yuppie From chris at simplistix.co.uk Tue Aug 24 04:25:23 2004 From: chris at simplistix.co.uk (Chris Withers) Date: Tue Aug 24 04:25:50 2004 Subject: [Zope-CMF] errors in FS PT In-Reply-To: <4129FFB9.4030601@nuxeo.com> References: <4129FFB9.4030601@nuxeo.com> Message-ID: <412AFB73.5020304@simplistix.co.uk> Florent Guillaume wrote: > In all my development instances I've added a 'raise' after the except > because it prevents me from finding bugs. > > I want to change the test to its opposite. Anyone against that? I could > even remove the dumbing down altogether. Sounds good :-) BTW, maybe you could look and is if PageTemplateFile does the same thing? (even more scary, you could look at unifying the two, since they do almost the same thing...) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk From r.ritz at biologie.hu-berlin.de Tue Aug 24 07:25:07 2004 From: r.ritz at biologie.hu-berlin.de (Raphael Ritz) Date: Tue Aug 24 07:31:01 2004 Subject: [Zope-CMF] Re: Major performance booster for your site In-Reply-To: References: Message-ID: Geoff Davis wrote: > This might be worth setting up by default in Plone 2.1. You might want to > file something in the collector so we don't forget. Note that this breaks backwards compatibility and the CMF is going to do the same move anyway sometime soon. (Just to make sure this gets considered and documented and to avoid duplications of efforts) Raphael > > "Gerry Kirk" wrote in > message news:cgdaph$437$1@sea.gmane.org... > >>Hi, >> >>I switched to the newer DateIndex and DateRangeIndex indexes and saw a >>tremendous boost in the performance of my site, especially by using a >>DateRangeIndex for the effective/expires keywords which are part of >>every standard catalog search in CMF/Plone. More information on how to >>make the change here: >>http://plone.org/documentation/howto/OptimizingCatalogs >> >>Thanks to Dieter, Tres and others who posted info on various mailing >>lists about this. >> >>- Gerry From gregweb at gmx.ch Tue Aug 24 08:31:59 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Tue Aug 24 08:22:18 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <412A6F24.5080307@zope.com> References: <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> Message-ID: <5.1.0.14.2.20040824142211.01e5fd80@127.0.0.1> Hi Tres, >>Another question: Who is currently *really* using the CMFDefault skin? > >I'll bet $10USD that every Plone site in the world depends on at least some of the templates / controller scripts in those skins. You're right, there are some scripts and dtml methods fro CMF in cmf_legacy. >I have a number of non-Plone sites which make use of CMFDefault with a minimal amount of 'main_template' tweakery on top. I just wondered if the CMFDefault skin in the meanwhile has "converted" to a kind of demo skin. But its indeed not the case. What's your opinion about permalinks? Gregoire From gregweb at gmx.ch Tue Aug 24 08:37:56 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Tue Aug 24 08:28:02 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <412AEE09.8010901@wcm-solutions.de> References: <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> Message-ID: <5.1.0.14.2.20040824143331.028f5e08@127.0.0.1> Hi Yvo, >Not sure I understand what you propose. With "introduced problems" I don't mean the implementation details, but issues like broken relative links and confusing navigation. Ok, I admit it isn't well thought through. >It seems I wasn't clear enough. I just meant the already built in ways to switch skins. If we remove the DTML skins, there is only one skin left. > >So all I was talking about is: >- adding a new skin folder with the 2 files you modified >- adding a new skin in setupDefaultSkins Ok, you didn't mean to allow switching skins by some criteria on runtime. Any objections adding a news skin? If no, does somebody have a good name for it? >>Another question: Who is currently *really* using the CMFDefault skin? > >Me ;) > >If you don't need a sexy and feature loaded community site, CMFDefault has some advantages over CPS or Plone: > >- it's leaner and faster Definitively :-) and :-( for Plone. >- it depends only on Zope :-) Gregoire From andrew at zope.com Tue Aug 24 09:34:32 2004 From: andrew at zope.com (Andrew Sawyers) Date: Tue Aug 24 09:34:36 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <412AEE09.8010901@wcm-solutions.de> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> <412AEE09.8010901@wcm-solutions.de> Message-ID: <412B43E8.2030608@zope.com> yuppie wrote: > Hi! > > > Gregoire Weber wrote: > >>> Adding UID based aliases for content items introduced many problems. >>> As long as these issues are not resolved I don't like to have >>> permalinks in the 'Basic' skin. >> >> >> Ok, I could aggree. What about puting logic into a PyScript and >> circumvent the tal:on-error hack? > > > Not sure I understand what you propose. With "introduced problems" I > don't mean the implementation details, but issues like broken relative > links and confusing navigation. > >>> But what about adding a second ZPT skin? I think the DTML skins >>> should be removed after CMF 1.5. If people agree, we would anyway >>> need another ZPT skin to show the skin switching feature. An >>> 'Experimental' skin that shows some concepts that aren't mature or >>> don't fit into the 'Basic' skin could be quite useful. >> >> >> Could CMFUrlSkinSwitcher be a candidate or a base of your "skins >> switcher feature"? > > > It seems I wasn't clear enough. I just meant the already built in ways > to switch skins. If we remove the DTML skins, there is only one skin left. > > So all I was talking about is: > - adding a new skin folder with the 2 files you modified > - adding a new skin in setupDefaultSkins > >> Another question: Who is currently *really* using the CMFDefault skin? > > > Me ;) > > If you don't need a sexy and feature loaded community site, CMFDefault > has some advantages over CPS or Plone: > > - it's leaner and faster > - it depends only on Zope > - it has a more flexible license > > And last but not least: It's easier to work on the CMF if you use it. > > > Cheers, > Yuppie > Tres and I have had some pretty heated discussions in the past about skins. I'm not sure his position today, but I'd be interested in seeing what kind of traction an independent skin project might come up with (i.e. no expectations outside the framework). I have a designer who claims he can step up - but regardless, the look and feel of things has always been important to me - a nicer and option skin might be worth looking at adding after 1.5? On a related note, one thing that's always surprised me is the lack of skins from the community - many other skinnable frameworks and applications have thriving skinning initiatives. I'm curious why we don't and what might be the cause of that? Andrew -- Zope Corporation Software Engineer (540) 361-1700 From pw_lists at slinkp.com Tue Aug 24 10:46:00 2004 From: pw_lists at slinkp.com (Paul Winkler) Date: Tue Aug 24 10:46:08 2004 Subject: [Zope-CMF] Re: Permalinks in CMF 1.5 (CMFDefault) In-Reply-To: <4690D503-F596-11D8-BCA7-000D9368D272@dataflake.org> References: <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <24474.1092056970@www14.gmx.net> <41175CDB.1060102@wcm-solutions.de> <24474.1092056970@www14.gmx.net> <4117A3E2.4040209@wcm-solutions.de> <5.1.0.14.2.20040820192443.01f7be60@127.0.0.1> <4128BD70.7090308@wcm-solutions.de> <5.1.0.14.2.20040823235449.040ee490@127.0.0.1> <412A6F24.5080307@zope.com> <4690D503-F596-11D8-BCA7-000D9368D272@dataflake.org> Message-ID: <20040824144600.GC2913@slinkp.com> On Tue, Aug 24, 2004 at 08:24:38AM +0200, Jens Vagelpohl wrote: > >>Another question: Who is currently *really* using the CMFDefault skin? > > > >I'll bet $10USD that every Plone site in the world depends on at least > >some of the templates / controller scripts in those skins. > > > >I have a number of non-Plone sites which make use of CMFDefault with a > >minimal amount of 'main_template' tweakery on top. Me too. > How about inciting some riots at the Plone conference with a t-shirt > that says "Real men use CMFDefault"? ;) Ooh, I want one of those :-P -- Paul Winkler http://www.slinkp.com From andrew at zope.com Tue Aug 24 11:40:34 2004 From: andrew at zope.com (Andrew Sawyers) Date: Tue Aug 24 11:40:39 2004 Subject: [Zope-CMF] cmf.zope.org Message-ID: <412B6172.5010303@zope.com> I've fixed the DNS for cmf.zope.org and also added in a squid redirector so that cmf.zope.org now points to the Product page on zope.org Andrew -- Zope Corporation Software Engineer (540) 361-1700 From dmitry at athabascau.ca Tue Aug 24 12:08:50 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Tue Aug 24 12:06:27 2004 Subject: [Zope-CMF] DTML, RSS customization and my incompetency... Message-ID: <200408241008.53229.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi everybody, I'm playing with RSS feeds in Plone (actually those are scripts from CMF unaltered) and what I was trying to do is make RSS feeds more flexible. Usecase: I need link objects in RSS feed to come up with link they point to and not link to the object itself. Let's say I have Link: id: my_link title: moo link remote_url: http://some.com as itemRSS renders it: - --------snippet from RSS------- moo link http://localhost:8080/hc/my_folder/my_link desc No publisher dimon 2004-08-23T14:38+00:00 - --------end of snippet from RSS------- And I want: - --------snippet from RSS------- moo link http://some.com desc No publisher dimon 2004-08-23 14:38:16 - --------end of snippet from RSS------- What I did: in rssBody there's statement: ... itemRSS(obj) ... so I created my class MyLink with method itemRSS rendering it differently and I changed a call to: ... obj.ItemRSS() ... but that brought some errors with non-customized types: .... KeyError: 'Identifier' .... Anybody has any idea what's going on? And can anybody show me right direction (I don't want to put more logic in itemRSS - I'd like to make it per-type customizable)? P.S. Also rssBody doesn't really care for state of the documents which worries me somewhat. - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBK2gSyDrVuGfS98QRAlINAJ9optLGVWmQo0hlEtIL2QQj4qJFvgCfdG/c EjKFvEb0YCU83pFQqN6M/Pk= =5F3e -----END PGP SIGNATURE----- From michael at d2m.at Tue Aug 24 14:51:51 2004 From: michael at d2m.at (Michael Haubenwallner) Date: Tue Aug 24 14:52:21 2004 Subject: [Zope-CMF] Re: DTML, RSS customization and my incompetency... In-Reply-To: <200408241008.53229.dmitry@athabascau.ca> References: <200408241008.53229.dmitry@athabascau.ca> Message-ID: Dmitry S. Makovey wrote: > Anybody has any idea what's going on? And can anybody show me right direction > (I don't want to put more logic in itemRSS - I'd like to make it per-type > customizable)? > don't do that - just alter itemRSS and switch formating per portal_type you want a different rendering for. this is easy to do, fast and scales well. RSS in CMFDefault is 'just' a collection of dtml methods that issue a query to portal_catalog and format the results to a template. > P.S. > Also rssBody doesn't really care for state of the documents which worries me > somewhat. > you get the objects you are allowed to view by your role - try access the feed as 'anonymous' and you will only get published objects in the results. > - -- > Dmitry Makovey > Web Systems Administrator > Athabasca University > (780) 675-6245 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (FreeBSD) -- Michael http://planetzope.org From gerry at faithonline.com Tue Aug 24 15:58:10 2004 From: gerry at faithonline.com (Gerry Kirk) Date: Tue Aug 24 15:58:23 2004 Subject: [Zope-CMF] using caching policy manager to cache anon vs. auth content Message-ID: <412B9DD2.3080801@faithonline.com> Hi, I would like to cache all pages for anon users, but then when someone logs in, the cache would no longer apply. Is it possible to do on the same domain? My experiments tell me 'no'. I have the following set-up, copying an example from a Nuxeo whitepaper: policy: anon predicate: member == none mod time: content/bobobase_modification_time max age (secs): 3600 policy: authenticated predicate: member != none mod time: content/bobobase_modification_time max age (secs): 0 no-cache: true From tseaver at zope.com Tue Aug 24 17:11:03 2004 From: tseaver at zope.com (Tres Seaver) Date: Tue Aug 24 17:12:05 2004 Subject: [Zope-CMF] Re: using caching policy manager to cache anon vs. auth content In-Reply-To: <412B9DD2.3080801@faithonline.com> References: <412B9DD2.3080801@faithonline.com> Message-ID: <412BAEE7.7050801@zope.com> Gerry Kirk wrote: > Hi, > > I would like to cache all pages for anon users, but then when someone > logs in, the cache would no longer apply. > > Is it possible to do on the same domain? My experiments tell me 'no'. > > I have the following set-up, copying an example from a Nuxeo whitepaper: > > policy: anon > predicate: member == none > mod time: content/bobobase_modification_time > max age (secs): 3600 > > policy: authenticated > predicate: member != none > mod time: content/bobobase_modification_time > max age (secs): 0 > no-cache: true The predicate is a TALES path expression by default. I think the spelling you want is: - 'not: member' (for anonymous) - 'member' (for authenticated) You could also spell out the Python bit: - 'python: member == None' - 'python: member != None' Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From gerry at faithonline.com Tue Aug 24 17:19:08 2004 From: gerry at faithonline.com (Gerry Kirk) Date: Tue Aug 24 17:19:19 2004 Subject: [Zope-CMF] Re: using caching policy manager to cache anon vs. auth content In-Reply-To: <412BAEE7.7050801__816.309222909872$1093381932$gmane$org@zope.com> References: <412B9DD2.3080801@faithonline.com> <412BAEE7.7050801__816.309222909872$1093381932$gmane$org@zope.com> Message-ID: <412BB0CC.9080804@faithonline.com> Tres Seaver wrote: > Gerry Kirk wrote: > You could also spell out the Python bit: > > - 'python: member == None' > > - 'python: member != None' > > Tres. Actually, that is what I have. Bad copy/paste on my part. - Gerry From dmitry at athabascau.ca Tue Aug 24 19:40:21 2004 From: dmitry at athabascau.ca (Dmitry S. Makovey) Date: Tue Aug 24 19:37:54 2004 Subject: [Zope-CMF] Re: DTML, RSS customization and my incompetency... In-Reply-To: References: <200408241008.53229.dmitry@athabascau.ca> Message-ID: <200408241740.22422.dmitry@athabascau.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On August 24, 2004 12:51 pm, Michael Haubenwallner wrote: > Dmitry S. Makovey wrote: > > Anybody has any idea what's going on? And can anybody show me right > > direction (I don't want to put more logic in itemRSS - I'd like to make > > it per-type customizable)? > > don't do that - just alter itemRSS and switch formating per portal_type > you want a different rendering for. this is easy to do, fast and scales > well. Actually it seems to scale worse than what I was trying to do as it requires modifications to itemRSS every time I introduce new type, unless I'm going to provide some kind of central registry for renderers, which generates some overhead in performace IMO. > RSS in CMFDefault is 'just' a collection of dtml methods that issue a > query to portal_catalog and format the results to a template. > > > P.S. > > Also rssBody doesn't really care for state of the documents which worries > > me somewhat. > > you get the objects you are allowed to view by your role - try access > the feed as 'anonymous' and you will only get published objects in the > results. oops didn't think about that... > > > - -- > > Dmitry Makovey > > Web Systems Administrator > > Athabasca University > > (780) 675-6245 > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.2.4 (FreeBSD) - -- Dmitry Makovey Web Systems Administrator Athabasca University (780) 675-6245 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBK9HlyDrVuGfS98QRAnN9AJ9Gv9mgRs5dNUxiYq8roWRAxiSHMwCgiLU0 KN6q+Ucxl0IIrbAw25Qov4c= =9/PV -----END PGP SIGNATURE----- From timh at zute.net Wed Aug 25 02:33:21 2004 From: timh at zute.net (Tim Hoffman) Date: Wed Aug 25 03:01:09 2004 Subject: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. Message-ID: Hi I am exploring/testing the CMFUid functionality of the new CMF 1.5.0 Beta, (I have been using my own Uid tool for some time, but it relied on the use of a monkey patch which added a mixin class to all PortalContent and PortalFolder plus a few others to ensure that all CMFContent automgically got unique ids and managment and control of the uid generation (especially after copying ;-) could be enforced. This approach is a support nightmare however, so I have always been looking for a more supportable mechanism hence the investigation of CMFUid.) Anyway I am trying to fathom exactly how CMFUid works and have a couple of questions. (plus I have noticed what I believe to be a bug) As I understand it, a call to uidtool.register(object) is in main template. This gets called and if the object doesn't have a uid a new uid (UniqueIdAnnotion instance) is created and stored as an attribute if the content object (currently named cmf_uid). (UniqueIdAnnotation has manage_afterAdd and manage_afterClone methods etc). So far so good. However I don't understand how the manage_afterAdd/Clone methods get called. A normal content object has manage_afterClone/Add by virtue of ultimately subclassing things like ObjectManager/CatalogAware (CopySupport Mixin) etc. But all of these methods iterate over result of objectValues() calling manage_afterClone,manage_afterAdd on each as appropriate. But becuase the UniqueIdAnnotation is stored as an attribute calling contentValues on a content object that has a uid doesn't return the UniqueIdAnnotation object (it isn't based on SimpleContent/ObjectManager but Persistent and Implicit). SO I am a bit confused how when one copies a content object how the uid is being updated. As I can't find anything that might call object.cmf_uid.manage_afterClone/Add and cmf_uid will never be returned from a call to objectValues(). Am I missing something here? Now I come to the bug I think I have encountered. If you copy a folder with content, the contained contents UID's do not get updated ending up with duplicate UID's. Which I believe is a bug. If you copy the content directly the uid does get updated. I have spent ages playing with manage_afterClone in the past with my own UniqueId implementation so am reasonably familiar with the mechanism, but can't for the life of me work out how it is supposed to work in CMFUid. Any pointers would be welcome. Rgds Tim From gregweb at gmx.ch Wed Aug 25 05:10:53 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Wed Aug 25 05:01:46 2004 Subject: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: Message-ID: <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> Thanks Tim! There is definitely a bug. There is a short term fix for CMFUid but it seems the real cause (and bug) lives in CMFCatalogAware. There seems to be a problem with the handling of opaque items (non SimpleItems). I'm currently investigating on that. Tres: A e-mail about the behaviour of __recurse calling opaque items will follow today. Gregoire My answers to your questions: At 14:33 25.08.2004 +0800, Tim Hoffman wrote: >I am exploring/testing the CMFUid functionality of the new CMF 1.5.0 Beta, >(I have been using my own Uid tool for some time, but it >relied on the use of a monkey patch which added a mixin class to >all PortalContent and PortalFolder plus a few others to ensure that all >CMFContent automgically got unique ids and managment and control of the >uid generation (especially after copying ;-) could be enforced. > >This approach is a support nightmare however, so I have always been >looking for a more supportable mechanism hence the investigation of >CMFUid.) CMFUid enforces that in marking the annotation object as 'ICallableOpaqueItem' (see 'IUniqueIdAnnotation' in interfaces.py). This way it gets called on copying and can destroy itself. >Anyway I am trying to fathom exactly how CMFUid works and have a couple >of questions. (plus I have noticed what I believe to be a bug) > >As I understand it, a call to uidtool.register(object) is in main >template. This gets called and if the object doesn't have a uid a new uid >(UniqueIdAnnotion instance) is created and stored as an attribute >if the content object (currently named cmf_uid). (UniqueIdAnnotation has >manage_afterAdd and manage_afterClone methods etc). So far so good. Ok. >However I don't understand how the manage_afterAdd/Clone methods get >called. > >A normal content object has manage_afterClone/Add by virtue of >ultimately subclassing things like ObjectManager/CatalogAware (CopySupport >Mixin) etc. > >But all of these methods iterate over result of objectValues() calling >manage_afterClone,manage_afterAdd on each as appropriate. > >But becuase the UniqueIdAnnotation is stored as an attribute calling >contentValues on a content object that has a uid doesn't return >the UniqueIdAnnotation object (it isn't based on >SimpleContent/ObjectManager but Persistent and Implicit). > >SO I am a bit confused how when one copies a content object how the >uid is being updated. As I can't find anything that might call >object.cmf_uid.manage_afterClone/Add and cmf_uid will never be >returned from a call to objectValues(). Am I missing something here? 'cmf_uid' get's called by the 'opaqueItems' method in CMFCatalogAware.py in CMFCore because it is marked withe the 'ICallableOpaqueItem' interface. This is new in CMF 1.5 also (I integrated that in to CMFCore this january). >Now I come to the bug I think I have encountered. >If you copy a folder with content, the contained contents UID's >do not get updated ending up with duplicate UID's. Which I believe is a >bug. If you copy the content directly the uid does get updated. Uuups! See above. From gregweb at gmx.ch Wed Aug 25 05:49:47 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Wed Aug 25 05:40:34 2004 Subject: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: References: <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> Message-ID: <5.1.0.14.2.20040825113638.03286008@127.0.0.1> Hi Tim, At 16:45 25.08.2004 +0800, Tim Hoffman wrote: >Hi Gregoire > >Thanks, I missed the significance of opaqueValues in CatalogAware. >Nice method. > >Whilst I am at I have one more question. How come Portal Folders don't get >Uids ? There are two reasons - Can you answer me the question what the view of a folder is? An example: 1. t=0: just added a folder 'fol'. The view is 'folder_view'. Added uid 1 to 'fol'. --> searching the folder by uid 1 returns .../fol showing .../fol/folder_view 2. t=1: add a 'index_html' to 'fol'. The view is now the view of 'index_html'. Added uid 2 to 'index_html'. --> searching the folder by uid 1 returns .../fol showing .../fol/index_html/document_view (showing a permalink with uid 2) So probably the uid of 'fol' has to be deleted at the moment a 'index_html' gets added while the uid of 'index_html' has to be set to 1. Upon deleting of 'index_html' the folder has to be given back the uid of 1. arrghhh! See it? - There was a problem because folders could not be called. This prevented adding uids the way it is done currently. (there isn't a problem adding uids to folders at all, but it was a problem doing this from the template, sorry I don't remember anymore exactly). With the reason above I decided that folders do not have permanent urls. Additional note: Probably the permalinks will go away in the final CMF 1.5. There are some additional objections on the list concerning permanent links how they're done currently. The feature isn't thought through enough as it seems. Gregoire From timh at zute.net Wed Aug 25 05:54:58 2004 From: timh at zute.net (Tim Hoffman) Date: Wed Aug 25 06:22:36 2004 Subject: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <5.1.0.14.2.20040825113638.03286008@127.0.0.1> Message-ID: Hi Gregoire Thanks for the reply On the folder and uid front we often use folders with custom views rather than index_html so the actual Uid is used for folders. (At least in our use pattern and our own implementation of Uniqieids. (or the content item is folderish and again has a view) I haven't tried SkinnedFolders with CMFUid - do they get UIds Rgds Tim On Wed, 25 Aug 2004, Gregoire Weber wrote: > Hi Tim, > > At 16:45 25.08.2004 +0800, Tim Hoffman wrote: > >Hi Gregoire > > > >Thanks, I missed the significance of opaqueValues in CatalogAware. > >Nice method. > > > >Whilst I am at I have one more question. How come Portal Folders don't get > >Uids ? > > There are two reasons > > - Can you answer me the question what the view of a folder is? > An example: > > 1. t=0: just added a folder 'fol'. The view is 'folder_view'. > Added uid 1 to 'fol'. > --> searching the folder by uid 1 returns .../fol showing > .../fol/folder_view > 2. t=1: add a 'index_html' to 'fol'. The view is now the view > of 'index_html'. > Added uid 2 to 'index_html'. > --> searching the folder by uid 1 returns .../fol showing > .../fol/index_html/document_view (showing a permalink > with uid 2) > > So probably the uid of 'fol' has to be deleted at the moment a > 'index_html' gets added while the uid of 'index_html' has to be > set to 1. Upon deleting of 'index_html' the folder has to be > given back the uid of 1. > > arrghhh! See it? > > - There was a problem because folders could not be called. This prevented > adding uids the way it is done currently. > (there isn't a problem adding uids to folders at all, but it was a problem > doing this from the template, sorry I don't remember anymore exactly). > With the reason above I decided that folders do not have permanent urls. > > > Additional note: > > Probably the permalinks will go away in the final CMF 1.5. There are some > additional objections on the list concerning permanent links how they're > done currently. The feature isn't thought through enough as it seems. > > Gregoire > > From gregweb at gmx.ch Wed Aug 25 10:45:29 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Wed Aug 25 10:36:32 2004 Subject: Bug with recursing into opaque items (__recurse in CMFCatalogAware) was: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> References: Message-ID: <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> Hi Tres, I have a fix for the bug Tim found. '__recurse' in CMFCatalogAware has to be fixed. As this is a central part of the code beeing called on all add/clone/move and delete actions I'd like to put the solution under discussion. Index: CMFCatalogAware.py =================================================================== RCS file: /cvs-repository/Products/CMFCore/CMFCatalogAware.py,v retrieving revision 1.21 diff -r1.21 CMFCatalogAware.py 194,200c194,213 < for subobjects in values, opaque_values: < for ob in subobjects: < s = getattr(ob, '_p_changed', 0) < if hasattr(aq_base(ob), name): < getattr(ob, name)(*args) < if s is None: ob._p_deactivate() < --- > > for ob in values: > s = getattr(ob, '_p_changed', 0) > if hasattr(aq_base(ob), name): > getattr(ob, name)(*args) > if s is None: ob._p_deactivate() > > # opaque items are subitems of self and not ofsubitems > # self's parent. So before recursing the arguments have to be set: > # arg[0] to self (the opaque item) > # arg[1] to item (the item the opaque item is attachted at) > # the container of the item isn't relevant for recursing into > # opaque items > args = [self, args[0]][:len(args)] > for ob in opaque_values: > s = getattr(ob, '_p_changed', 0) > if hasattr(aq_base(ob), name): > getattr(ob, name)(*args) > if s is None: ob._p_deactivate() > I'm pretty sure the old soultion is a bug that never appeared because the wrong parameters passed were never really used by the 'talkback' object. If there are no objections, I'll check this in friday morning. Unit tests pass (except those who were broken anyway under Win2k). Gregoire At 11:10 25.08.2004 +0200, Gregoire Weber wrote: >Thanks Tim! > >There is definitely a bug. There is a short term fix for CMFUid but it >seems the real cause (and bug) lives in CMFCatalogAware. There seems to >be a problem with the handling of opaque items (non SimpleItems). > >I'm currently investigating on that. > >Tres: A e-mail about the behaviour of __recurse calling opaque items > will follow today. > >Gregoire > >My answers to your questions: > >At 14:33 25.08.2004 +0800, Tim Hoffman wrote: >>I am exploring/testing the CMFUid functionality of the new CMF 1.5.0 Beta, >>(I have been using my own Uid tool for some time, but it >>relied on the use of a monkey patch which added a mixin class to >>all PortalContent and PortalFolder plus a few others to ensure that all >>CMFContent automgically got unique ids and managment and control of the >>uid generation (especially after copying ;-) could be enforced. >> >>This approach is a support nightmare however, so I have always been >>looking for a more supportable mechanism hence the investigation of >>CMFUid.) > >CMFUid enforces that in marking the annotation object as 'ICallableOpaqueItem' >(see 'IUniqueIdAnnotation' in interfaces.py). This way it gets called on >copying and can destroy itself. > >>Anyway I am trying to fathom exactly how CMFUid works and have a couple >>of questions. (plus I have noticed what I believe to be a bug) >> >>As I understand it, a call to uidtool.register(object) is in main >>template. This gets called and if the object doesn't have a uid a new uid >>(UniqueIdAnnotion instance) is created and stored as an attribute >>if the content object (currently named cmf_uid). (UniqueIdAnnotation has >>manage_afterAdd and manage_afterClone methods etc). So far so good. > >Ok. > >>However I don't understand how the manage_afterAdd/Clone methods get >>called. >> >>A normal content object has manage_afterClone/Add by virtue of >>ultimately subclassing things like ObjectManager/CatalogAware (CopySupport >>Mixin) etc. >> >>But all of these methods iterate over result of objectValues() calling >>manage_afterClone,manage_afterAdd on each as appropriate. >> >>But becuase the UniqueIdAnnotation is stored as an attribute calling >>contentValues on a content object that has a uid doesn't return >>the UniqueIdAnnotation object (it isn't based on >>SimpleContent/ObjectManager but Persistent and Implicit). >> >>SO I am a bit confused how when one copies a content object how the >>uid is being updated. As I can't find anything that might call >>object.cmf_uid.manage_afterClone/Add and cmf_uid will never be >>returned from a call to objectValues(). Am I missing something here? > >'cmf_uid' get's called by the 'opaqueItems' method in CMFCatalogAware.py >in CMFCore because it is marked withe the 'ICallableOpaqueItem' interface. > >This is new in CMF 1.5 also (I integrated that in to CMFCore this january). > >>Now I come to the bug I think I have encountered. >>If you copy a folder with content, the contained contents UID's >>do not get updated ending up with duplicate UID's. Which I believe is a >>bug. If you copy the content directly the uid does get updated. > >Uuups! See above. > >_______________________________________________ >Zope-CMF maillist - Zope-CMF@lists.zope.org >http://mail.zope.org/mailman/listinfo/zope-cmf > >See http://collector.zope.org/CMF for bug reports and feature requests From tseaver at zope.com Wed Aug 25 10:49:16 2004 From: tseaver at zope.com (Tres Seaver) Date: Wed Aug 25 10:50:20 2004 Subject: [Zope-CMF] Re: DTML, RSS customization and my incompetency... In-Reply-To: <200408241740.22422.dmitry@athabascau.ca> References: <200408241008.53229.dmitry@athabascau.ca> <200408241740.22422.dmitry@athabascau.ca> Message-ID: <412CA6EC.2030408@zope.com> Dmitry S. Makovey wrote: > On August 24, 2004 12:51 pm, Michael Haubenwallner wrote: > >>Dmitry S. Makovey wrote: >> >>>Anybody has any idea what's going on? And can anybody show me right >>>direction (I don't want to put more logic in itemRSS - I'd like to make >>>it per-type customizable)? >> >>don't do that - just alter itemRSS and switch formating per portal_type >>you want a different rendering for. this is easy to do, fast and scales >>well. > > > Actually it seems to scale worse than what I was trying to do as it requires > modifications to itemRSS every time I introduce new type, unless I'm going to > provide some kind of central registry for renderers, which generates some > overhead in performace IMO. Create a non-visible action, say 'rss', for each type you want to syndicate. Then, have your template grab the method for that action an render it. I don't believe the performance overhead is going to be significant here, compared to what else you want to do. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com From A.Cruickshank at bbk.ac.uk Wed Aug 25 11:13:51 2004 From: A.Cruickshank at bbk.ac.uk (Agata Cruickshank) Date: Wed Aug 25 11:11:50 2004 Subject: [Zope-CMF] Accessing object properties from URL, displaying image Message-ID: I have a sequence of news articles which display article's title plus image called news + sequence-number (news1, news2, news3). The images are independent from news and stored in a different directory. The below code works, but I wonder how can I access the image properties (title) to display in the alt tag  - I need something like "> , but don't know how to make it work in CMF. and return the string rather than image. Many thanks for any suggestions, Agata From timh at zute.net Wed Aug 25 19:57:55 2004 From: timh at zute.net (Tim Hoffman) Date: Wed Aug 25 19:58:15 2004 Subject: [Zope-CMF] (CMFUid) Folders should have Uids - was: Bug with CMFUid content. In-Reply-To: <5.1.0.14.2.20040825113638.03286008@127.0.0.1> References: <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> <5.1.0.14.2.20040825113638.03286008@127.0.0.1> Message-ID: <412D2783.6000701@zute.net> HI Gregoire I think all content objects amd folders created should have a Uid. I'll answer your questions first then provide a couple of other reasons Gregoire Weber wrote: > >There are two reasons > >- Can you answer me the question what the view of a folder is? > An example: > > 1. t=0: just added a folder 'fol'. The view is 'folder_view'. > Added uid 1 to 'fol'. > --> searching the folder by uid 1 returns .../fol showing > .../fol/folder_view > > Yep no problem. Uid lets lou locate content entities idependant of path, IMO it says nothing about how it will/should be viewed. Tying identity of the a content object (uniqely within a site) to how it might be viewed is, I think not a good idea. > 2. t=1: add a 'index_html' to 'fol'. The view is now the view > of 'index_html'. > Added uid 2 to 'index_html'. > --> searching the folder by uid 1 returns .../fol showing > .../fol/index_html/document_view (showing a permalink > with uid 2) > > > IMO thats fine, and would be expected behaviour see my answer above. > So probably the uid of 'fol' has to be deleted at the moment a > 'index_html' gets added while the uid of 'index_html' has to be > set to 1. Upon deleting of 'index_html' the folder has to be > given back the uid of 1. > > arrghhh! See it? > > > Sorry I don't agree with this position at all. Folder will still retain it's Uid of 1. If someone does get confused about this behaviour then I feel they are mis-using the whole notion of Uid's. Folder should have its Uid of 1, and index_html should have it's Uid of 2. >- There was a problem because folders could not be called. This prevented > adding uids the way it is done currently. > (there isn't a problem adding uids to folders at all, but it was a problem > doing this from the template, sorry I don't remember anymore exactly). > With the reason above I decided that folders do not have permanent urls. > > > Again I feel strongly that folders should have permanent Uids. How they manifest and are used is a seperate issue in my opinion. I will give you an example of how we use Uid's in an existing application. We have the concept of an Artwork content object. It is a notional representation of the concept of a piece of art. However it is just a folder (actually skinned folder with custom view methods). That will contain a collection of images that represent the artwork. Each image might be a different view, maybe a dfiferent angle. the artwork during construction etc.. (Also in our case each image has multiple views of itself in different resolutions scaling and cropping factors, but thats another story). We use this model as it makes it much easier to author the artwork being able to navigate into it to manage content. (Also the artwork may contain audio - describing the image for deaf, or the artwork consists of audio, text describing the artwork - especially if the art consists of audio and we want a text description for deaf people). These are all just manifestations or different perspectives of the artwork. Now we create exhibition objects which are either topic based or are an object with a single property which is an order list of Uid's, that way if any of the Artwork (folders) are moved around the site, that behaviour will not break the exhibition. Now the view of the folder you get when you retrieve the folder when viewing the exhibition is based on your context or that of the exhibition or both . Not the location of the folder (Atrtwork). In fact you are normally viewing the Artwork (Folder) in a completley different location You can see this all in action at www.designingfutures.com.au (3rd gen of the site went up a few weeks ago). I hope this helps convince you that Folders should also have Uid's Thanks for your time Tim From y.2004_ at wcm-solutions.de Thu Aug 26 03:42:15 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 26 03:43:22 2004 Subject: [Zope-CMF] Re: Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: References: Message-ID: <412D9457.8080802@wcm-solutions.de> Hi Tim! Tim Hoffman wrote: > As I understand it, a call to uidtool.register(object) is in main > template. This gets called and if the object doesn't have a uid a new uid > (UniqueIdAnnotion instance) is created and stored as an attribute > if the content object (currently named cmf_uid). (UniqueIdAnnotation has > manage_afterAdd and manage_afterClone methods etc). So far so good. Reading your later mails, I think this is the basic misunderstanding. The call to uidtool.register(object) in main_template is no general mechanism to assign UIDs. It's just a part of the permalinks implementation. UIDs are not assigned by default. If your application needs UIDs for folders, it has to register them. Writing that, I wonder why you have to use 'register' to make sure you get an UID. Wouldn't it be better if 'getUid' registers objects if necessary? Cheers, Yuppie From y.2004_ at wcm-solutions.de Thu Aug 26 03:49:45 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 26 03:51:02 2004 Subject: [Zope-CMF] Re: Bug with recursing into opaque items (__recurse in CMFCatalogAware) In-Reply-To: <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> References: <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> Message-ID: <412D9619.4090307@wcm-solutions.de> Hi! Gregoire Weber wrote: > I have a fix for the bug Tim found. '__recurse' in CMFCatalogAware has to be fixed. > As this is a central part of the code beeing called on all add/clone/move and > delete actions I'd like to put the solution under discussion. > > Index: CMFCatalogAware.py > =================================================================== > RCS file: /cvs-repository/Products/CMFCore/CMFCatalogAware.py,v > retrieving revision 1.21 > diff -r1.21 CMFCatalogAware.py > 194,200c194,213 > < for subobjects in values, opaque_values: > < for ob in subobjects: > < s = getattr(ob, '_p_changed', 0) > < if hasattr(aq_base(ob), name): > < getattr(ob, name)(*args) > < if s is None: ob._p_deactivate() > < > --- > >> for ob in values: >> s = getattr(ob, '_p_changed', 0) >> if hasattr(aq_base(ob), name): >> getattr(ob, name)(*args) >> if s is None: ob._p_deactivate() >> >> # opaque items are subitems of self and not ofsubitems >> # self's parent. So before recursing the arguments have to be set: >> # arg[0] to self (the opaque item) >> # arg[1] to item (the item the opaque item is attachted at) >> # the container of the item isn't relevant for recursing into >> # opaque items >> args = [self, args[0]][:len(args)] >> for ob in opaque_values: >> s = getattr(ob, '_p_changed', 0) >> if hasattr(aq_base(ob), name): >> getattr(ob, name)(*args) >> if s is None: ob._p_deactivate() >> > > > I'm pretty sure the old soultion is a bug that never appeared because > the wrong parameters passed were never really used by the 'talkback' > object. If this is a bug, it's a general bug, not one related to opaque items. After staring for a while at this code, at ZCatalog.CatalogAwareness and at OFS.ObjectManager, I came to these conclusions: - Nowhere is defined which values should be passed to the 'item' and 'container' arguments of the manage_before*/manage_after* methods. Most manage_before*/manage_after* methods don't use these arguments at all. - The recursive manage_before*/manage_after* methods in CatalogAware and ObjectManager pass 'item' and 'container' just through, so by default 'item' is always the object and 'container' the container of the object on which the method was called first. This is also the behavior of CMFCatalogAware. 'item' and 'container' as used by default seem to be quite useless, so giving them a new meaning in ICallableOpaqueItemEvents would not really hurt. But on the other hand the proposed meaning - 'item' for the container of the opaque item and container defunct - makes things not more intuitive. Why not just taking the parent from the acquisition context and ignoring 'item' and 'container' completely? Cheers, Yuppie From gregweb at gmx.ch Thu Aug 26 05:03:28 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Thu Aug 26 04:54:14 2004 Subject: [Zope-CMF] Re: Bug with recursing into opaque items (__recurse in CMFCatalogAware) In-Reply-To: <412D9619.4090307@wcm-solutions.de> References: <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> <5.1.0.14.2.20040825095328.02e8f008@127.0.0.1> <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> Message-ID: <5.1.0.14.2.20040826105521.03212708@127.0.0.1> Hi, >If this is a bug, it's a general bug, not one related to opaque items. Yes. >After staring for a while at this code, at ZCatalog.CatalogAwareness and at OFS.ObjectManager, I came to these conclusions: > >- Nowhere is defined which values should be passed to the 'item' and 'container' arguments of the manage_before*/manage_after* methods. Most manage_before*/manage_after* methods don't use these arguments at all. That's it! I guessed their meaning by inserting prints in the respective SimpleItem manage_after/before methods to find out what the parameters are. >- The recursive manage_before*/manage_after* methods in CatalogAware and ObjectManager pass 'item' and 'container' just through, so by default 'item' is always the object and 'container' the container of the object on which the method was called first. This is also the behavior of CMFCatalogAware. Yes. But for a callable attribute the item and container must have another meaning because the attribute is kind of deeper in the tree. >'item' and 'container' as used by default seem to be quite useless, They're used somewhere (As I remember in ObjectManager). There is a check if self == container: do some stuff. >so giving them a new meaning in ICallableOpaqueItemEvents would not really hurt. But on the other hand the proposed meaning - 'item' for the container of the opaque item and container defunct - makes things not more intuitive. Ok. Unfortnately my analysis is some weeks away and I can't remember the details in which case item and container carry which meaning. But as I remember it makes some sense. >Why not just taking the parent from the acquisition context and ignoring 'item' and 'container' completely? Yes, this was/is a solution I thought also about. I tested it and worked also. But for me the handling of opaque items in __recurse is buggy. I can live with both solutions. Gregoire From timh at zute.net Thu Aug 26 04:55:14 2004 From: timh at zute.net (Tim Hoffman) Date: Thu Aug 26 04:55:30 2004 Subject: [Zope-CMF] Re: Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <412D9457.8080802@wcm-solutions.de> References: <412D9457.8080802@wcm-solutions.de> Message-ID: <412DA572.8060006@zute.net> Hi As opposed to understanding I was in fact just summarising how it is currently implemented, to make sure I did understand what was going on. CMF 1.5Beta and CMFUid "advertises" that all your favoutite content types automatically get a UID. And the mechanism they have used is register being called in main template. (This probably should be documented - it took my quite a while to find it - cause I wouldn't have looked for it there ;-) >Writing that, I wonder why you have to use 'register' to make sure you get an UID. Wouldn't it be better if 'getUid' registers >objects if necessary? I suppose you could, - my presonal preference would in fact be to create a UID in every object at creation time and some how hook that in through the Type Tool content creation factory. See ya Tim yuppie wrote: > Hi Tim! > > > Tim Hoffman wrote: > >> As I understand it, a call to uidtool.register(object) is in main >> template. This gets called and if the object doesn't have a uid a new >> uid >> (UniqueIdAnnotion instance) is created and stored as an attribute if >> the content object (currently named cmf_uid). (UniqueIdAnnotation has >> manage_afterAdd and manage_afterClone methods etc). So far so good. > > > Reading your later mails, I think this is the basic misunderstanding. > The call to uidtool.register(object) in main_template is no general > mechanism to assign UIDs. It's just a part of the permalinks > implementation. > > UIDs are not assigned by default. If your application needs UIDs for > folders, it has to register them. > > > Writing that, I wonder why you have to use 'register' to make sure you > get an UID. Wouldn't it be better if 'getUid' registers objects if > necessary? > > > Cheers, > Yuppie > From gregweb at gmx.ch Thu Aug 26 05:07:27 2004 From: gregweb at gmx.ch (Gregoire Weber) Date: Thu Aug 26 04:58:52 2004 Subject: [Zope-CMF] Re: Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <412D9457.8080802@wcm-solutions.de> References: Message-ID: <5.1.0.14.2.20040826110339.032076a8@127.0.0.1> Hi! At 09:42 26.08.2004 +0200, yuppie wrote: >Hi Tim! > >Tim Hoffman wrote: >>As I understand it, a call to uidtool.register(object) is in main >>template. This gets called and if the object doesn't have a uid a new uid >>(UniqueIdAnnotion instance) is created and stored as an attribute if the content object (currently named cmf_uid). (UniqueIdAnnotation has >>manage_afterAdd and manage_afterClone methods etc). So far so good. > >Reading your later mails, I think this is the basic misunderstanding. The call to uidtool.register(object) in main_template is no general mechanism to assign UIDs. It's just a part of the permalinks implementation. > >UIDs are not assigned by default. If your application needs UIDs for folders, it has to register them. That's it! Sorry Tim, I didn't factor that out enough exactly inmy e-mails. >Writing that, I wonder why you have to use 'register' to make sure you get an UID. Wouldn't it be better if 'getUid' registers objects if necessary? It is the easiest way to get an uid if it not yet exists. The proper solution would be to attach uids after they have been added and then ask for the uid with the get/query methods. Gregoire From y.2004_ at wcm-solutions.de Thu Aug 26 06:22:06 2004 From: y.2004_ at wcm-solutions.de (yuppie) Date: Thu Aug 26 06:23:26 2004 Subject: [Zope-CMF] Re: Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <5.1.0.14.2.20040826110339.032076a8@127.0.0.1> References: <412D9457.8080802@wcm-solutions.de> <5.1.0.14.2.20040826110339.032076a8@127.0.0.1> Message-ID: <412DB9CE.7050108@wcm-solutions.de> Hi! Gregoire Weber wrote: >>Writing that, I wonder why you have to use 'register' to make sure you get an UID. Wouldn't it be better if 'getUid' registers objects if necessary? > > > It is the easiest way to get an uid if it not yet exists. > The proper solution would be to attach uids after they have been added > and then ask for the uid with the get/query methods. Currently the framework doesn't make sure that all objects have an UID. So the default way to get an UID is calling 'register'. The examples you implemented in CMFDefault don't use the get/query methods. While the "proper solution" might be nice, people can't use it. Cheers, Yuppie From sf at nuxeo.com Mon Aug 30 06:32:05 2004 From: sf at nuxeo.com (Stefane Fermigier) Date: Mon Aug 30 06:32:11 2004 Subject: [Zope-CMF] Slides and pictures from the Zope/CPS/ERP5 sprint in Paris Message-ID: <41330225.2090804@nuxeo.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.zope.org/pipermail/zope-cmf/attachments/20040830/cd573164/sprint-result.html -------------- next part -------------- A non-text attachment was scrubbed... Name: sf.vcf Type: text/x-vcard Size: 275 bytes Desc: not available Url : http://mail.zope.org/pipermail/zope-cmf/attachments/20040830/cd573164/sf.vcf From marc at bowery.com Mon Aug 30 11:28:03 2004 From: marc at bowery.com (Marc Lindahl) Date: Mon Aug 30 11:28:18 2004 Subject: [Zope-CMF] Re: howto localize it In-Reply-To: <41331C0C.3080000@gemodek.de> Message-ID: <2F1CCD29-FA99-11D8-8B8D-0030656A1306@bowery.com> Hi Stephane, I ported that old product, since I had collectors I needed to maintain (and at the time Plone collector didn't support AT1.2)... but I didn't write it... maybe someone else has a clue about localizing. Sorry... Marc On Monday, August 30, 2004, at 08:22 AM, Stephane Matamontero wrote: > Hi Marc, > > I use now your collector with my plone 2.0.4 instance. > Unfortunately all text is in english, but I am in germany. > > In my old plone 1.0.3 site+collector 0.9b I had german stuff > but it used localizer+translationservice > > But polne 2.x uses PlacelessTranslationService, I suppose > this is the point. > > Do you have some english template-files which I could translate? > (Or do you have some other hints??) > > Thanks, > > Stephane > > From monster at spiderplant.net Tue Aug 31 10:09:53 2004 From: monster at spiderplant.net (Dan Fairs) Date: Tue Aug 31 10:10:04 2004 Subject: [Zope-CMF] Programmatically installing a workflow script Message-ID: <57675.147.114.226.182.1093961393.squirrel@147.114.226.182> Hi, I'm trying to programmatically add a Python script in my product's Install.py and assign it to run before a DCWorkflow transition takes place. I've managed to add a workflow programmatically (thanks to dumpDCWorkflow) but I can't see how you add a script. I've seen that PythonScript.py has a manage_addPythonScript, but I don't know how to call it I've tried: portal.portal_workflow.workflow.scripts.manage_addPythonScript() ... and variations on the theme, but I can't get it to work. Does anyone have any examples? Cheers, Dan From jean at upfrontsystems.co.za Tue Aug 31 10:26:42 2004 From: jean at upfrontsystems.co.za (Jean Jordaan) Date: Tue Aug 31 10:27:17 2004 Subject: [Zope-CMF] Programmatically installing a workflow script In-Reply-To: <57675.147.114.226.182.1093961393.squirrel@147.114.226.182> References: <57675.147.114.226.182.1093961393.squirrel@147.114.226.182> Message-ID: <41348AA2.7050007@upfrontsystems.co.za> Hi Dan From CMFBoard/ForumWorkflow.py (grabbed at random): from Products.PythonScripts.PythonScript import manage_addPythonScript manage_addPythonScript(wf.scripts, 'stateChanged') scr = getattr(wf.scripts, 'stateChanged') scr.write( """##parameters=sci sci.object.notifyStateChanged() """) -- Jean Jordaan http://www.upfrontsystems.co.za From monster at spiderplant.net Tue Aug 31 10:30:33 2004 From: monster at spiderplant.net (Dan Fairs) Date: Tue Aug 31 10:30:42 2004 Subject: [Zope-CMF] Programmatically installing a workflow script In-Reply-To: <41348AA2.7050007@upfrontsystems.co.za> References: <57675.147.114.226.182.1093961393.squirrel@147.114.226.182> <41348AA2.7050007@upfrontsystems.co.za> Message-ID: <63242.147.114.226.182.1093962633.squirrel@147.114.226.182> > Hi Dan > > From CMFBoard/ForumWorkflow.py (grabbed at random): Aha! I shall try that. You are a gentleman and a scholar :) Cheers, Dan From dieter at handshake.de Tue Aug 31 15:31:14 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Aug 31 18:30:42 2004 Subject: [Zope-CMF] using caching policy manager to cache anon vs. auth content In-Reply-To: <412B9DD2.3080801@faithonline.com> References: <412B9DD2.3080801@faithonline.com> Message-ID: <16692.53762.362711.35988@gargle.gargle.HOWL> Gerry Kirk wrote at 2004-8-24 15:58 -0400: >I would like to cache all pages for anon users, but then when someone >logs in, the cache would no longer apply. No good chance... The CPM sets HTTP cache headers. Once, an object is in an HTTP cache, the CPM is only consulted when the object expires unless you specify "must-revalidate". Unfortunately, many browsers appear not to honor "must-revalidate". -- Dieter From dieter at handshake.de Tue Aug 31 15:58:57 2004 From: dieter at handshake.de (Dieter Maurer) Date: Tue Aug 31 18:30:46 2004 Subject: Bug with recursing into opaque items (__recurse in CMFCatalogAware) was: [Zope-CMF] Bug with CMFUid content when copied indirectly and some confusion. In-Reply-To: <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> References: <5.1.0.14.2.20040825155046.02ef80f0@127.0.0.1> Message-ID: <16692.55425.906218.251605@gargle.gargle.HOWL> Gregoire Weber wrote at 2004-8-25 16:45 +0200: > ... >> args = [self, args[0]][:len(args)] >> for ob in opaque_values: >> s = getattr(ob, '_p_changed', 0) >> if hasattr(aq_base(ob), name): >> getattr(ob, name)(*args) This patch looks wrong: "item" and "container" specify the top level "item" added/deleted and its container. This means, they must not change in the recursive call. This is essential, e.g., to recognize whether the copy/move it within a given context (e.g. a CMF site). We use this, e.g., to allow for an efficient move/rename of complete CMF sites (we use CMF site relative paths rather than physical paths for cataloguing; this implies that nothing needs to be done when a complete CMF site is moved/renamed/copied). -- Dieter