Re: [Zope] Does anyone care whether we deprecate ZClasses?
Yes, but BEFORE do a tool to convert them in a python product or archetype similar, a tool to change base classes, a tool to convert a zclass based on catagaware to one based on catalogPATHaware, or merge the two. Or you just deprecate something that is used and don't deprecate some code that is obsolete by year ? :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
Andreas Jung ha scritto: --On Montag, 4. April 2005 9:58 Uhr +0200 Yuri [EMAIL PROTECTED] wrote: Yes, but BEFORE do a tool to convert them in a python product or archetype similar, a tool to change base classes, a tool to convert a zclass based on catagaware to one based on catalogPATHaware, or merge the two. This would be up to the community :-) -aj As a right KeywordIndex? *grin* :P ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Does anyone care whether we deprecate ZClasses?
Re: [Zope] Does anyone care whether we deprecate ZClasses? To: [EMAIL PROTECTED] Cc: zope@zope.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Jonathan Cyr wrote at 2005-4-6 16:06 -0400: ... just show me how under-represented that beginner and intermediate Zope developers use this list... and then I think, perhaps there aren't any, just me and a few others... and if that's the case, Zope's screwed, and the horse I rode in on. Do not worry too much! Jim proposed to keep ZClasses alive until (at least) Zope 2.10. And he asks whether there is enough interest to keep them longer... [...] In fact, I have had ten times more problems with Archetypes (which I use now) than with ZClasses (which I used formerly). Isn't Archetypes only for Plone? I mean, Plone is a very good *application* but I don't want to be locked on it. Just release a way to convert a Zclass to a Python Product (at least for the simplest ZClasses...). I'm stil stuck on convert that damn base class CatalogAware to CatalogPathAware, just to name something (CatalogAware) which is still there for no reason... :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zmi issues
Hi! I'm doing an import of a large .zexp (from ZMI), and I see thay Zope is first loading it all in memory, than doing the work of importing it! I mean, isn't it a little bit *inefficient? :) Also, renaming a folder with a lot of zclasses in (40.000), takes a lot of time. After 10 minutes, it was still there... and this is a 2,4 Ghz P4 and 512 MB of Ram... Can this be fixed/improved? :) TIA! * ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Pre-indexing filter and accented letters
I would like to index a text property of an object in the ZCatalog. The text is in French language, but I have a problem: I have to find results for the related non accented letters! I mean, If I do a search for actualite, the index should return also the object which text contains actualitè. I cannot convert the index to textindexNG, now it is TextIndex (at least, I can covert it to ZCTextIndex). An idea could be, for example, to convert the text before it get indexed... Where should I look in the code? Can it be possible? Any other suggestion? :) TIA! ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Pre-indexing filter and accented letters
Dieter Maurer ha scritto: Yuri wrote at 2005-6-6 11:56 +0200: I would like to index a text property of an object in the ZCatalog. The text is in French language, but I have a problem: I have to find results for the related non accented letters! I mean, If I do a search for actualite, the index should return also the object which text contains actualitè. Implement a PythonScript that performs the normalization of context.SearchableText(), say NormalizedSearchableText. Ensure, it is acquirable by your indexed objects. Index NormalizedSearchableText rather than SearchableText and use this index for your searches. Ensure, that you perform the same normalization on search terms before you use them in a query. Weel, I cannot change the index, it already has his name... it is a collection of thousands of object, this one I want to pre-filter before index are just a small part... Or you mean I have to do something about SearchableText()? I have to index in a way the user find the term even if it does not use accented letters on a current index that already has indexed thousands of objects... Can I hook somewhere in the middle, so I Index them in the way I want? :) By the way, ManagableIndex greatly facilitates the inclusion of normalizers. However, it currently does not interface with a TextIndex (only a WordIndex). I'll take a look, thanks :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Pre-indexing filter and accented letters
Dieter Maurer ha scritto: Yuri wrote at 2005-6-7 10:37 +0200: ... Implement a PythonScript that performs the normalization of context.SearchableText(), say NormalizedSearchableText. Ensure, it is acquirable by your indexed objects. Index NormalizedSearchableText rather than SearchableText and use this index for your searches. Ensure, that you perform the same normalization on search terms before you use them in a query. Weel, I cannot change the index, it already has his name... it is a collection of thousands of object, this one I want to pre-filter before index are just a small part... But your index currently has unnormalized values. Thus, you must rebuild it. I don't need it for other objects I already have. But, as a bonus, it would not be so bad, so it is not really a problem :) When you rebuild it, you can also give it a different name. Why? I usually gave it the name of the form input I want to index... I though just to index the new objects... but I miss the picture maybe, what is so important with the names NormalizedSearchableText and SearchableText? Or you mean I have to do something about SearchableText()? Yes, replace it by NormalizedSearchableText. How? :-? Maybe I miss some overloading or acquisition? Can I hook somewhere in the middle, so I Index them in the way I want? :) You can (and must) normalized the search terms. However, the indexed values need be normalized, too. Ok Almost surely, there are not now. This means, rebuilding the index -- this time with normalization... And how do I add it? Just creating the python script and using acquisition? How does it work? :P ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: zope 2.7: Unauthorized in this context
Use 2.7.5 or 2.7.6, before you would have problems with ZClasses... I had the same problem :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope, latin-1 and accented words
How could I can tell the Splitter of ZCText intedex to not split words as aaaèbbb in aaa and bbb? I would like to tell zope that è,à and so on are alphanumeric letters... In Splitter.c I have: class Splitter: import re rx = re.compile(r(?L)\w+) ?L match as the locale, but I have multilingual latin-1 contents... \w would match only [a..z,A..Z]! TIA P.S. I've written a small Class for the ZCTextindex pipeline that convert all the accented characters in non accented ones, so I can index perchè as perche. It would work only if I can solve this splitter problem... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Pre-indexing filter and accented letters (mostly solved)
ZCTextindex to search and catalog accented words as non accented. - Step 1 Add to Lexicon.py (around line 190) this code, which filters the things in the pipeline: --- class RemoveAccented: def filter_word(self, w): filter the non ascii letters to ascii # trasformo la stringa w in unicode... parola = unicode(w,'latin-1') xlate={0xc0:'A', 0xc1:'A', 0xc2:'A', 0xc3:'A', 0xc4:'A', 0xc5:'A', 0xc6:'Ae', 0xc7:'C', 0xc8:'E', 0xc9:'E', 0xca:'E', 0xcb:'E', 0xcc:'I', 0xcd:'I', 0xce:'I', 0xcf:'I', 0xd0:'Th', 0xd1:'N', 0xd2:'O', 0xd3:'O', 0xd4:'O', 0xd5:'O', 0xd6:'O', 0xd8:'O', 0xd9:'U', 0xda:'U', 0xdb:'U', 0xdc:'U', 0xdd:'Y', 0xde:'th', 0xdf:'ss', 0xe0:'a', 0xe1:'a', 0xe2:'a', 0xe3:'a', 0xe4:'a', 0xe5:'a', 0xe6:'ae', 0xe7:'c', 0xe8:'e', 0xe9:'e', 0xea:'e', 0xeb:'e', 0xec:'i', 0xed:'i', 0xee:'i', 0xef:'i', 0xf0:'th', 0xf1:'n', 0xf2:'o', 0xf3:'o', 0xf4:'o', 0xf5:'o', 0xf6:'o', 0xf8:'o', 0xf9:'u', 0xfa:'u', 0xfb:'u', 0xfc:'u', 0xfd:'y', 0xfe:'th', 0xff:'y', 0xa1:'!', 0xa2:'{cent}', 0xa3:'{pound}', 0xa4:'{currency}', 0xa5:'{yen}', 0xa6:'|', 0xa7:'{section}', 0xa8:'{umlaut}', 0xa9:'{C}', 0xaa:'{^a}', 0xab:'', 0xac:'{not}', 0xad:'-', 0xae:'{R}', 0xaf:'_', 0xb0:'{degrees}', 0xb1:'{+/-}', 0xb2:'{^2}', 0xb3:'{^3}', 0xb4:', 0xb5:'{micro}', 0xb6:'{paragraph}', 0xb7:'*', 0xb8:'{cedilla}', 0xb9:'{^1}', 0xba:'{^o}', 0xbb:'', 0xbc:'{1/4}', 0xbd:'{1/2}', 0xbe:'{3/4}', 0xbf:'?', 0xd7:'*', 0xf7:'/' } r = '' for i in parola: if xlate.has_key(ord(i)): r += xlate[ord(i)] elif r += str(i) return r def process(self, lst): return [self.filter_word(w) for w in lst] element_factory.registerFactory('Remove Accented', 'Remove Accented', RemoveAccented) --- Step 2 Add the locale support for a latin-1 language, I added -L it_IT to zope start (in 2.7 you have to enable it in etc/zope.conf) Then you can search for aented and find accented ;-) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Split a ZODB
Hi! How can I split a Zodb? I mean, I have a big folder which I would like to became a separate ZODB file to mount on the main one. In unix I would move all the files of that folder on another partition, then mount it on that folder. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Split a ZODB
Lennart Regebro wrote: On 7/28/05, Yuri [EMAIL PROTECTED] wrote: Hi! How can I split a Zodb? I mean, I have a big folder which I would like to became a separate ZODB file Well, I suspect the simplest way is to copy the ZODB and delete everything that shouldn't be in it. Export and import could theoretically work to. I havent't tried any of them with really big ZODBs though. Good! Anyway, some command line tools could help... zodb operations can take longer time (for example, changing the name of the upper folder wake up all the contained objects...) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] help performance
Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) TIA ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] help performance
Jonathan wrote: - Original Message - From: Yuri [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, November 23, 2006 11:07 AM Subject: [Zope] help performance Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) You could try different transaction subcommit threshold settings (Catalog - Advanced tab) to see if different settings have any beneficial impact. Subtransactions are *Disabled :) * ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] help performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote: Hi! I've an old machine with zope 2.6 with an application based on ZClass. Now, updating 4000 record takes ages (more than an hour...), basically it is a propertysheet update + recatalog of every object of 4000. Can I have significative performance upgrade changing something in the code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :) ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( # more version.txt 1.7.2 for Zope 2.5.1 and 2.6.1, 2.7.3, 2.8, 2.9 Python 2.3.x, 2.4.x ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] help performance
Andreas Jung wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote: ZopeProfiler will tell you about bottlenecks. Doesn't work in zope 2.6 based on python 2.1 :( Try CallProfiler instead. and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] help performance
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. ok, you got me :) with callprofiler I have: +0.0209 0.1213 1.4%+- inserimento +0.0461 0.0044 0.1%| +- standard_html_header +0.0479 0.0018 0.0%| | +- intestazione_html_standard +0.0518 0.0012 0.0%| | +- mappa_barra_loggato 0.0931 1.1%| | +0.1467 7.4849 85.1% | +- dafne_item_add 1.1709 13.3% | | | +1.3175 0.0027 0.0%| | +- proprietario +1.3245 0.0450 0.5%| | +- sonopubblico 0.1486 1.7%| | | +1.5181 0.0026 0.0%| | +- proprietario (2nd call) 1.3108 14.9% | | | +2.8316 0.0043 0.0%| | +- globale 4.6964 53.4% | | | +7.5323 0.0452 0.5%| | +- sonopubblico (2nd call) 0.1539 1.7%| | | +7.7324 0.0367 0.4%| +- invalida_cache +7.7704 0.0010 0.0%| +- standard_html_footer What does exactly take 4.6 sec? :-o ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: and *enable* subtransactions! When I have a transaction wich takes almost 1 sec, I don't think it will change anything :) I'll try CallProfiler :) Did you try? Subtransactions are not the same as transactions. They are an optimization, so try them! Don't just ditch the experts here. 0.0209 0.9%| +0.0209 0.0174 0.7%+- inserimento +0.0320 0.0042 0.2%| +- standard_html_header +0.0337 0.0017 0.1%| | +- intestazione_html_standard +0.0374 0.0011 0.0%| | +- mappa_barra_loggato +0.0423 1.0951 46.8% | +- dafne_item_add 0.5836 24.9% | | | +0.6260 0.0028 0.1%| | +- proprietario +0.6301 0.0484 2.1%| | +- sonopubblico +0.6804 0.0026 0.1%| | +- proprietario (2nd call) 0.0406 1.7%| | | +0.7236 0.0043 0.2%| | +- globale 0.4665 19.9% | | | +1.1945 0.0457 2.0%| | +- sonopubblico (2nd call) +1.2423 0.0033 0.1%| +- invalida_cache +1.2468 0.0010 0.0%| +- standard_html_footer Ok, I've run a machine for three years without any optimizations. Enabling transaction cut the time of about 73%: http://myurl/inserimento2.3416 5.5694 8.7971 8.7971, 2.3416 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Fwd: Re: [Zope] help performance]
Martijn Pieters wrote: On 11/24/06, Yuri [EMAIL PROTECTED] wrote: 8.7971 was the time without subtransactions, 2.3 with. Ops... -.- Indeed. And if you tweak the threshold as Jonathan suggested, you could even get it lower. Just to clarify, 2.3 sec is the time to insert only one object :) I'll try to tweak it as suggested by you gurus :P ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] a question about aq_base
Hi! here: http://docs.neuroinf.de/programming-plone/ate we can read: obj = brain.getObject().aq_base why .aq_base and not only brain.getObject()? :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] optimize old code
Hi! I've an old product, based on zclass and zope 2.6, I would like to optimize (as possibile) the insert and cataloging of a zclass. Now I use this scripts: form that creates the request - -- dtml-let ut=_.SecurityGetUser().getUserName() dtml-with manage_addProduct['Dafne'] dtml-with dafne_item_add(_.None,_,NoRedir=1) /dtml-with /dtml-with /dtml-let -- dtml-with dafne_item.createInObjectManager(REQUEST['identificativo'], REQUEST) - just set an id for the class dtml-call propertysheets.metadati.manage_editProperties( REQUEST) - edit properties dtml-call manage_permission('Cambia il contenuto dei dafne',('Manager','Owner',),acquire=0) - set permission and roles dtml-call manage_addLocalGroupRoles(ut,['guardone'],REQUEST) dtml-if expr=pubblici == '1' - anonymous can view? dtml-call manage_permission('View',('Anonymous',),acquire=0) dtml-else dtml-call manage_permission('View',('Manager','Owner','guardone',),acquire=0) /dtml-if dtml-call manage_permission('Change Images and Files',('Manager','Owner'),acquire=0) dtml-call manage_permission('Add Documents, Images, and Files',('Manager','Owner',),acquire=0) dtml-call manage_permission('Add ExtFiles',('Manager','Owner',),acquire=0) dtml-call manage_permission('Change ExtFile/ExtImage',('Manager','Owner'),acquire=0) * Can optimize here? * dtml-call unindex_object - my catalog is not called Catalog but catalog, so I've read I've to do this three steps dtml-call manage_editCataloger('catalog', REQUEST) dtml-var index_object * * /dtml-with * do redirecting* dtml-comment Now we need to return something. We do this via a redirect so that the URL is correct. Unfortunately, the way we do this depends on whether we live in a product or in a class. If we live in a product, we need to use DestinationURL to decide where to go. If we live in a class, DestinationURL won't be available, so we use URL2. /dtml-comment dtml-if NoRedir dtml-else dtml-if DestinationURL dtml-call RESPONSE.redirect( DestinationURL+'/manage_workspace') dtml-else dtml-call RESPONSE.redirect( URL2+'/manage_workspace') /dtml-if /dtml-if --- Any idea? TIA! ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] optimize old code
Andreas Jung wrote: --On 17. Januar 2007 09:24:34 +0100 Yuri [EMAIL PROTECTED] wrote: Hi! I've an old product, based on zclass and zope 2.6, I would like to optimize (as possibile) the insert and cataloging of a zclass. Put your stuff inside a PythonScript. All API methods can be called in the same way as through DTML/ZPT/PythonScript. APIs don't change just because the object and its methods from different environments. Thanks, Andreas! At the time I changed this scripts, It was dificult for me to put in pythonscript :P Maybe now I can do it :) I think the bottleneck is the unindexing / reindexing that the product perform, just because it needs a different catalog. I will investigate all the options, thanks. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] emulate a sequence
Hi! I need a field in zope object which act as a sequence. I mean every time I create an object, the value is the previous sequence value of the last object created + 1. also I need to browse the objects by sequence (from the object 1 to the last, by the sequence number) I think I need a catalog FieldIndex to store the sequence for searches, a property in the object. Can I use the catalog to retrieve the max value of the index, so when I create the object, I just add 1 and store it in the property? TIA ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Unauthorized: You are not allowed to access 'manage_page_header' in this context
I've an application in Zope. A user see this message when he try to submit a form. I've tried myself with his account and I had no error. I'm using OpenFlow, if it matters. The user is never sent to the openflow instance, so I don't understand how he tries to request this url. Can be a browser problem? The user is sent to management screen with no apparent reason: Time2007/05/25 10:12:05.769 GMT+2 User Name (User Id) ww (ww) Request URL http://myserver.com:8080/xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/paper/index_html Exception Type Unauthorized Exception Value You are not allowed to access 'manage_page_header' in this context 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.PageTemplates.PageTemplateFile, line 106, in _exec * Module Products.PageTemplates.PageTemplate, line 96, in pt_render *PageTemplateFile at /xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/index_html used for /xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/paper* * Module TAL.TALInterpreter, line 190, in __call__ * Module TAL.TALInterpreter, line 234, in interpret * Module TAL.TALInterpreter, line 569, in do_insertStructure_tal * Module Products.PageTemplates.TALES, line 221, in evaluate *URL: index_html* *Line 1, Column 0* *Expression: standard:'here/manage_page_header'* *Names:* {'container': instance instance at b0556230, 'context': RendicontiFolder instance at b0556b60, 'default': Products.PageTemplates.TALES.Default instance at 0xb74e8c8c, 'here': RendicontiFolder instance at b0556b60, 'loop': SafeMapping instance at 9d2d1b0, 'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0xb744604c, 'nothing': None, 'options': {'args': ()}, 'repeat': SafeMapping instance at 9d2d1b0, 'request': HTTPRequest, URL=http://myserver.com:8080/xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/paper/index_html, 'root': Application instance at b59f72f0, 'template': PageTemplateFile at /xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/index_html used for /xxx/yyy/WorkFlow/ProcessInstances/1180080540.75/paper, 'traverse_subpath': [], 'user': bersani} * Module Products.PageTemplates.Expressions, line 172, in __call__ * Module Products.PageTemplates.Expressions, line 160, in _eval * Module Products.PageTemplates.Expressions, line 116, in _eval __traceback_info__: here * Module Products.PageTemplates.Expressions, line 311, in restrictedTraverse __traceback_info__: {'path': ['manage_page_header'], 'TraversalRequestNameStack': []} Unauthorized: You are not allowed to access 'manage_page_header' in this context ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Unauthorized: You are not allowed to access 'manage_page_header' in this context
Andreas Jung wrote: --On 25. Mai 2007 10:48:04 +0200 Yuri [EMAIL PROTECTED] wrote: I've an application in Zope. A user see this message when he try to submit a form. I've tried myself with his account and I had no error. Unauthorized: You are not allowed to access 'manage_page_header' in this context Google for Plone How to debug unauthorized. It is Zope and I now how to debug (now :-D). The problem is that it doesn't happen to me, but to that specific user, on that specific computer/browser, I suppose :) I just asked if it is happened already that the browser matter (maybe a cookie/browser problem?) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] from sparc to i386
Hi all! I've an old zope server running 2.6 on an old sparc. We are going to replace it, so I need to move the Zope thing. The problem is that that Zope server is compiled in sparc and I've made some modification to the source code, so I can't just move it on another machine (including the python 2.1 tree) as is. Which are the best options? Recreate the Zope 2.6 installation, python 2.1 installation and replace the Data.fs? TIA :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Frustrated with Python and Frameworks. Zope
Some sort of rating system and comments about Zope products would be nice; like Joomla does with its extensions. For example: http://extensions.joomla.org/component/option,com_mtree/task,viewlink/lin k_id,1508/Itemid,35/ I can't say how much time I have wasted investigating dead-end or poorly or un-supported Zope products over the years. Being able to read other peoples unsoliciated opinions about a Joomla Extension has been incredibly helpful in making successful long-term selections. This is what we need, just install contentrating on plone.org I suppose... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Zope Digest, Vol 43, Issue 10
Appending data would require the manipulation of the linked list of Pdata elements. There is no API for this available...so basically forget it. I figured it'd be a lot more obvious if it was possible. Ah well. Thanks -J In this case, just use an external method to manipulate a fs file :) This file can be mapped with ExFile to zope, so you can use it in zope. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] transactional mail server for zope 2.7
Hi all! Is there a transactional mail server for zope 2.7. I mean, if some transaction fail, it will not send the mail... ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] transactional mail server for zope 2.7
Andreas Jung wrote: --On 3. Januar 2008 11:25:25 +0100 Yuri [EMAIL PROTECTED] wrote: Hi all! Is there a transactional mail server for zope 2.7. I mean, if some transaction fail, it will not send the mail... MailDropHost is a well-known secret. -aj Can I replace the standard mailhost without any problem in zope 2.7? Is this the new standard in 2.11? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Zope Digest, Vol 45, Issue 25
[EMAIL PROTECTED] wrote: I want to be able to have a zope site entirely in the file system with no ZODB, so I can keep it in subversion, and use normal things like grep, patch and sed to apply changes to the whole codebase. You can do this with zope 2 but you can also allow user customization that you can later migrate in to the filesystem code. Really?? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] define a class in a python script
Hi, all! I would like to define a class inside a python script (so I can catalog it and use catalog to store info, as the tutorial about catalog everything suggests). So I've done: class Autore: classe per il catalogo def set_autore(self, autore=''): setta l'autore self.autore=autore def set_variante(self, variante=''): setta l'autore self.variante = variante def variante(self): ritorna la variante return self.variante def set_qualificazione(self, qualificazione=''): setta la qualificazione self.qualificazione = qualificazione def qualificazione(self): ritorna la qualificazione return self.qualificazione un_autore = Autore() un_autore.set_autore('prova') un_autore.set_variante('una variante') un_autore.set_qualificazione('una qualificazione') print un_autore.variante() print un_autore.qualificazione() return printed == but zope complains about I can call the methods of this class: *Error Type: Unauthorized* *Error Value: You are not allowed to access set_autore in this context So, what can I do? How can I create virtual objects to be cataloged? * ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] define a class in a python script
Tino Wildenhain wrote: Yuri wrote: Hi, all! I would like to define a class inside a python script (so I can catalog it and use catalog to store info, as the tutorial about catalog everything suggests). Its not possible in Python Scripts. You would need to write either an external method or a small product. An external method can load only a function, not a class, so really I need to write a product just only for a class? Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] define a class in a python script
Tino Wildenhain wrote: Yuri wrote: Hi, all! I would like to define a class inside a python script (so I can catalog it and use catalog to store info, as the tutorial about catalog everything suggests). Its not possible in Python Scripts. You would need to write either an external method or a small product. http://www.faqs.org/docs/ZopeBook/ScriptingZope.html You also cannot easily hand instances of your own classes over to DTML or scripts. The issue here is that your instances won't have Zope security information. You can define and use your own classes and instances to your heart's delight, just don't expect Zope to use them directly. Limit yourself to returning simple Python structures like strings, dictionaries and lists or Zope objects. So developing a product, is the only option? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] define a class in a python script
Andreas Jung wrote: --On 5. März 2008 10:21:32 +0100 Yuri [EMAIL PROTECTED] wrote: Hi, all! I would like to define a class inside a python script (so I can catalog it and use catalog to store info, as the tutorial about catalog everything suggests). This is basically bad-style. Define your class somewhere in your product code and if necessary make it available through related APIs of the AccessControl module. The class has not to be made available, just a bridge to catalog it. For example, ZSQL method has a class file, so it is not a problem nor a bad style to define it somewhere and use it internally. what I need to do is my_catalog.catalog_object(an_object, 'path') So I can index values and search for them, without having objects. The idea is taken from here: http://zope.org/Members/rbickers/cataloganything ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] define a class in a python script
Andreas Jung wrote: --On 5. März 2008 10:21:32 +0100 Yuri [EMAIL PROTECTED] wrote: Hi, all! I would like to define a class inside a python script (so I can catalog it and use catalog to store info, as the tutorial about catalog everything suggests). This is basically bad-style. Define your class somewhere in your product code and if necessary make it available through related APIs of the AccessControl module. -aj I've found this: If you have a KeywordIndex for the attribute 'foo', then you need to arrange that the reult objects in your recordset have sequences for the column / atrribute 'foo'. E.g., for a query like: select bar.id as 'bar, bar.name as 'name', foo.name as 'foo from bar, foo where foo.bar_id = bar.id you need to transform the result set: bars = {} for row in rows: bar_id= row['bar'] bar = bars.get(bar_id) if bar is None: bar = bars[bar_id[ = {'bar': bar_id, 'name': row['name'], 'foo': [], } bar['foo'].append(row['foo']) *Now* you can index the records you have transformed: for bar in bars.values(): catalog.indexObject(compute_uid(bar), make_record(bar)) === what are compute_uid(bar) and make_record(bar)? btw, indexes calls the object I pass to indexObject or catalog_object, so I need an object with methods or a dictionary is enough? I'm testing it, but it is not... def ret_autore(self): ritorna un autore return 'prova' un_autore = {} un_autore['aut']='prova' #the index is called autore un_autore.autore = ret_autore context.catalogo_autori.catalog_object(un_autore, un_autore['aut']) returns: *Error Type: TypeError* *Error Value: object has read-only attributes* ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Configurare un virtual host con zope/plone, wizard web
http://betabug.ch/zope/witch :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8
Hi! I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1. First, I've tried 2.8, and it worked but had the __new__ problem, so I've seen it is fixed in 2.9.8. After the upgrade, all seemed to work. My ZClass is a container (with ExtFile). I've been able to create a new instance, then had trouble after uploading an ExtFile. The file is there, in the repository, but when I clicked over it, I get a fast scrolling in the log. After the restart, the ZClass instances and the Product in the control panel, gived me a maximun recursion depth, here the last part: File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 597, in getState return unpickler.load() File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 471, in _persiste nt_load return self.load_oid(reference) File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 537, in load_oid return self._conn.get(oid) File /usr/lib/zope2.9.8/lib/python/ZODB/Connection.py, line 205, in get obj._p_jar = self File /usr/lib/zope2.9.8/lib/python/ZClasses/_pmc.py, line 65, in __setattr__ super(ZClassPersistentMetaClass, self).__setattr__(name, v) File /usr/lib/zope2.9.8/lib/python/ZODB/persistentclass.py, line 84, in __se t__ jar.setstate(inst) File /usr/lib/zope2.9.8/lib/python/ZODB/Connection.py, line 732, in setstate self._setstate(obj) File /usr/lib/zope2.9.8/lib/python/ZODB/Connection.py, line 786, in _setstat e self._reader.setGhostState(obj, p) File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 604, in setGhostS tate state = self.getState(pickle) File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 597, in getState return unpickler.load() File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 471, in _persiste nt_load return self.load_oid(reference) File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 537, in load_oid return self._conn.get(oid) File /usr/lib/zope2.9.8/lib/python/ZODB/Connection.py, line 205, in get obj._p_jar = self File /usr/lib/zope2.9.8/lib/python/ZClasses/_pmc.py, line 65, in __setattr__ super(ZClassPersistentMetaClass, self).__setattr__(name, v) File /usr/lib/zope2.9.8/lib/python/ZODB/persistentclass.py, line 84, in __se t__ jar.setstate(inst) File /usr/lib/zope2.9.8/lib/python/ZODB/Connection.py, line 737, in setstate exc_info=sys.exc_info()) File logging/__init__.py, line 999, in error File logging/__init__.py, line 1078, in _log File logging/__init__.py, line 1064, in makeRecord File logging/__init__.py, line 226, in __init__ # Must happen after ZopeStarter.setupInitialLogging() RuntimeError: maximum recursion depth exceeded in cmp 2008-03-26 11:12:05 INFO Signals Caught signal SIGINT 2008-03-26 11:12:07 INFO Z2 Shutting down === Any idea? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] ZClass problem again when zope restarts
Hi! redoing the process of upgrading, it has worked again. When I restart it with zopectl fg, it gives back the same error again. So there's something in the startup process which creates problem. It seems like something don't get written in the zodb, could be? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8
On Mar 26, 2008, at 11:19 , Yuri wrote: Hi! I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1. IMHO you're not investing your time wisely trying to make a ZClas application work on a later Zope version. They're unsupported and dead. I would keep the old setup running and spend time on recreating the ZClass product functionality as a real Zope product, and then create a script to migrate the old ZClass instances over. Sure, but then I would switch totally to zope3 techs, at least. The point is, why a working envinroment in zope, don't works anymore just restarting zope? It seems a database corruption or something not written in the disk, so it is worth an investigation. All works, you restart, boom. Can't recover in any way. At least there's should not mentioned any fix in 2.9.8, if it does not works. It is time comsuming for nothing, and kills any love with Zope, imho. Say: in this version this and this works, in that version not. Say it works, then it don't, who knows jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8
Yuri wrote: On Mar 26, 2008, at 11:19 , Yuri wrote: Hi! I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1. IMHO you're not investing your time wisely trying to make a ZClas application work on a later Zope version. They're unsupported and dead. I would keep the old setup running and spend time on recreating the ZClass product functionality as a real Zope product, and then create a script to migrate the old ZClass instances over. Sure, but then I would switch totally to zope3 techs, at least. I've solved using zope 2.7.9. The application was running in an old sparc64, and it was urgent to move it from this unsupported hardware. Noew I can think to make products, eggs and so on :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] problem migrating ZClasses from Zope 2.6.1 to Zope 2.9.8
Dieter Maurer wrote: Yuri wrote at 2008-3-26 11:19 +0100: I've got a trouble importing a ZClass app to 2.9.8 from 2.6.1. First, I've tried 2.8, and it worked but had the __new__ problem, so I've seen it is fixed in 2.9.8. After the upgrade, all seemed to work. My ZClass is a container (with ExtFile). I've been able to create a new instance, then had trouble after uploading an ExtFile. The file is there, in the repository, but when I clicked over it, I get a fast scrolling in the log. After the restart, the ZClass instances and the Product in the control panel, gived me a maximun recursion depth, here the last part: File /usr/lib/zope2.9.8/lib/python/ZODB/serialize.py, line 597, in getState return unpickler.load() File logging/__init__.py, line 1078, in _log File logging/__init__.py, line 1064, in makeRecord File logging/__init__.py, line 226, in __init__ # Must happen after ZopeStarter.setupInitialLogging() RuntimeError: maximum recursion depth exceeded in cmp This is very strange: the traceback you show does not seem very deep. It should not raise a maximum recursion depth exceeded. I deleted the long first part, always equal to the last one. Does it matter? :) As always: when you see something which should not be there, debugging may be necessary for understanding... I agree. But it works, until you restart then this error happen forever. How can I debug this? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] default-zpublisher-encoding and zpt encoding
default-zpublisher-encoding in zope.conf seems not to work in zope 2.7.9, the server response don't set any charset. While: head tal:define=dummy python:request.RESPONSE.setHeader('Content-Type','text/html;; charset=ISO-8859-1') works, and the characters are displayed ok. But I cannot modify all the templates around and I'm looking for a general solution. The problem is to replicate a 2.6 Zope (run with -L it_IT) with 2.7.9. Zope 2.6 returns: Content-Type: text/html; charset=iso-8859-1 while Zope 2.7.9 returns: Content-Type: text/html Here the zope.conf part (default-zpublisher-encoding is ok, default_zpublisher_encoding don't exists in zopeschema.xml): == # Directive: locale # # Description: # Enable locale (internationalization) support by supplying a locale # name to be used. See your operating system documentation for locale # information specific to your system. If your Python module does not # support the locale module, or if the requested locale is not # supported by your system, an error will be raised and Zope will not # start. # # Default: unset # # Example: # #locale fr_FR locale it_IT # Directive: default_zpublisher_encoding # # Description: # This controls what character set is used to encode unicode # data that reaches ZPublisher without any other specified encoding. # # Default: iso-8859-15 # # Example: # # default_zpublisher_encoding iso-8859-15 default-zpublisher-encoding iso-8859-1 == I've commented out also the locale part, but still the same issue. Any idea? Thanks :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] default-zpublisher-encoding and zpt encoding
Yuri wrote: --On 2. April 2008 15:59:58 +0200 Yuri [EMAIL PROTECTED] wrote: default-zpublisher-encoding in zope.conf seems not to work in zope 2.7.9, the server response don't set any charset. While: head tal:define=dummy python:request.RESPONSE.setHeader('Content-Type','text/html;; charset=ISO-8859-1') works, and the characters are displayed ok. But I cannot modify all the templates around and I'm looking for a general solution. The problem is to replicate a 2.6 Zope (run with -L it_IT) with 2.7.9. Zope 2.6 returns: Content-Type: text/html; charset=iso-8859-1 while Zope 2.7.9 returns: Content-Type: text/html Here the zope.conf part (default-zpublisher-encoding is ok, default_zpublisher_encoding don't exists in zopeschema.xml): Strange, but using a different apache it has worked as expected, the encoding is sent now, FYI :) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] the grand reunion
Hi! Actually I've two Plone working envinronment and one zope, each in a different machine: - one, with two zope 2.9 istances (one for developing), running both multiple Plone 2.5 instances - one, with zope 2.9, running multiple Plone 2.5 instances - one, with zope 2.7.9, running zope only applications We have bought big iron hardware now, where I can do almost everything (with a fiber channel network storage, multiple rack servers). tipically, I use one instance to develop, and one to deploy. This mean different zope instances which shares only the base, and having different products. I would like to have an easy way to develop without having to be subject to dependencies from other envinroment, minimize the effort to mantain it and focus on doing things :) Is one big zope installation, with multiple instances, well suited for this tasks? Or is better different zope versions? What about the various Data.fs, is better to have them separated by application or by zope envinroment? I mean all the Plone in a single Data.fs or each one in a separated Data.fs? So, what is the best approach to migrate the three servers? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: [Plone-developers] the grand reunion
I would like to have an easy way to develop without having to be subject to dependencies from other envinroment, minimize the effort to mantain it and focus on doing things :) Maybe not exactly what you are asking for but I recommend you play with buildout a bit - I'm sure you'll appreciate the ease with which you can manage independent installations in a repeatable and easily modifiable way. Is one big zope installation, with multiple instances, well suited for this tasks? Or is better different zope versions? What about the various Data.fs, is better to have them separated by application or by zope envinroment? I mean all the Plone in a single Data.fs or each one in a separated Data.fs? Without further knowing how these sites might be related or not this is hard to answer but often times I prefer to have separate Zope instances (- different ZODBs) for different Plone sites. Even if they share substantial configuration/add-ons etc. Again, using buildout makes it a snap to create and maintain as many Zope instances as you want. And using a common buildout cache they can also mostly share the basic installation. Just my 2 cents, Raphael hi yuri, when setting up a zope/zeo task and everything was still a bit of a challenge (at least to me) we tended to have everything in one big instance that served some 20 low traffic sites. since then setting up a site with all the tools it needs has become a trivially easy and quick to execute task. we have converted nearly all these sites to have their own instance. I would not do it differently anymore .. robert Thanks to all! It seems that a separate zope instance for each plone site is the way to go. Just a question: is it a problem for performance/bottleneck/big python lock? ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] find zodb object sizes
Hi! I would like to run a script to see what objects size is, printing the zodb path. analize.py gives me a floating point division error, so I would like to ask if there's a simpler way to see what there's inside the ZODB. Thanks. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] find zodb object sizes
Andreas Jung ha scritto: On 20.10.2008 17:46 Uhr, Yuri wrote: Hi! I would like to run a script to see what objects size is, printing the zodb path. analize.py gives me a floating point division error, so I would like to ask if there's a simpler way to see what there's inside the ZODB. It would be helpful to see the traceback in order to fix a potential problem with the script. -aj Sorry, I was not passing the right parameter to analize btw, how can I have more deep knowledge on what there's in the zodb? I mean sizes, path, old transactions etc etc. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 61, Issue 14
Hi list I have 2 templates, in second template I need render a span only when the first template have defined a variable. template1: ul tal:define=var1 python:1 li tal:replace=structure conext/template2/li li tal:replace=structure python:context.template2(var1 =var1)/li li tal:replace=structure python:conext.template2(var2=1)/li /ul template2: li input id=x name=x value=somevalue span tal:condition=exists: var1span2/span span tal:condition=exists: options/var1span2/span span tal:condition=exists: attr/var1span2/span span tal:condition=exists: context/var1span2/span span tal:condition=exists: container/var1span2/span span tal:condition=exists: options/var2span3/span /li any condition in span not work :( ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] question about copyng btree elements
Hi! I've a Zope BTree called answers. It contains PersistentMapping objects: self.answers[userid] = PersistentMapping(value=value, comments=comments) value can be a string, a list or a dictionary what happen exactly if I do: question.answers[a_userdid] = question.answers[another_user_id] ? From my (poor) tests they seems not to share anything, I mean I can modify question.answers[a_userdid] and question.answers[another_user_id] is untouched. Is this true? Should I beware of something? ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 74, Issue 1
I think what the senior developers react to here isn't the particular choice. You could have written Vim is preferred and people would still think: Do they want me to write with my left or right hand or do they want me to get the job done. Anyway, best of luck Marco! If they work with the tool X, I think it is right to ask for knowledge of tool X. They're not hiring for working alone, but in a team. BTW, Pula is a great natural place in Sardinia, worth the work :D P.S. best of luck to Marco, from which I've learned Zope, Python and ... IDE integration :-) ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 78, Issue 13
Il 29/11/2010 18:00, zope-requ...@zope.org ha scritto: I have downloaded openflow from http://www.openflowswitch.org/wp/downloads/. I think I have downloaded the wrong ?OpenFlow? software. http://web.archive.org/web/20060509094718/www.openflow.it/wwwopenflow/EN/Download/index_html you can find it here, now the site is disappeared. You can also download the OpenFlowEditor from the same page :) ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] force the output encoding to utf-8 in page templates
Hi all! I've a Zope2 application with Postgresql. All is ok and utf-8 but page templates. This means that non utf-8 data is sent to the database, and the database complain with: *Error Type: DataError* *Error Value: invalid byte sequence for encoding UTF8: 0xe82527 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. *This does not happen if I manually switch the browser encoding (Firefox - View - character encoding - Unicode (UTF-8)) and submit a form. So my question is: how do I tell to page templates to output utf-8 instead of iso8859-15? The output_encoding property does anything. Obviously, changing default-zpublisher-encoding to utf-8 works, but other legacy applications will have problems on characted encoding. Any idea? ** ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] force the output encoding to utf-8 in page templates
Il 11/11/2011 12:43, Yuri ha scritto: Hi all! I've a Zope2 application with Postgresql. All is ok and utf-8 but page templates. This means that non utf-8 data is sent to the database, and the database complain with: *Error Type: DataError* *Error Value: invalid byte sequence for encoding UTF8: 0xe82527 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. *This does not happen if I manually switch the browser encoding (Firefox - View - character encoding - Unicode (UTF-8)) and submit a form. So my question is: how do I tell to page templates to output utf-8 instead of iso8859-15? The output_encoding property does anything. Obviously, changing default-zpublisher-encoding to utf-8 works, but other legacy applications will have problems on characted encoding. Any idea? ** I've solved in page templates code: if not response.headers.has_key('content-type'): response.setHeader('content-type', self.content_type + ';charset=' + self.output_encoding) - here add the utf-8, the publisher will find this filled and avoid to put the default. on line 315 of ZopePageTemplate.py Is there a better way? Thanks! ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] force the output encoding to utf-8 in page templates
Il 11/11/2011 13:40, mor...@nidelven-it.no ha scritto: On Fri, 11 Nov 2011 12:56:30 +0100, Yuriy...@alfa.it wrote: Il 11/11/2011 12:43, Yuri ha scritto: Hi all! I've a Zope2 application with Postgresql. All is ok and utf-8 but page templates. This means that non utf-8 data is sent to the database, and the database complain with: *Error Type: DataError* *Error Value: invalid byte sequence for encoding UTF8: 0xe82527 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. *This does not happen if I manually switch the browser encoding (Firefox - View - character encoding - Unicode (UTF-8)) and submit a form. So my question is: how do I tell to page templates to output utf-8 instead of iso8859-15? The output_encoding property does anything. Obviously, changing default-zpublisher-encoding to utf-8 works, but other legacy applications will have problems on characted encoding. Any idea? ** I've solved in page templates code: if not response.headers.has_key('content-type'): response.setHeader('content-type', self.content_type + ';charset=' + self.output_encoding)- here add the utf-8, the publisher will find this filled and avoid to put the default. on line 315 of ZopePageTemplate.py Is there a better way? Thanks! Look for setting the default publisher encoding in the zope.conf filesystem file and restart. :) -Morten Even forcing utf-8 in the content-type header, I still have this error on some web browser. For example, mozilla firefox 3.6.18 on windows gives this error: Error Type: DataError Error Value: invalid byte sequence for encoding UTF8: 0xe82075 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by client_encoding. It's sad there's no standard or no way to be compliant. ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] force the output encoding to utf-8 in page templates
Il 15/11/2011 08:10, Andreas Jung ha scritto: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You should be able to set the encoding of the response by tal:def define=dummy python: request.RESPONSE.setHeader('content-type', 'text/html; charset=utf-8') / within your page template. tal:def tal:define=dummy python:request.RESPONSE.setHeader('content-type', 'text/html;; charset=utf-8') / is the correct one. I've to test it now :) ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] missing info on vulnerability
Hi all! the zope2.zope.org page miss any info about this vulnerability: http://permalink.gmane.org/gmane.comp.web.zope.announce/1513 ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] UnicodeDecodeError
Hi! I've an Zope application, basically postgres + zpt. The postgres db has been upgraded to 8.5, the data inside is utf-8 (dumped and checkd it), the pg adapeter is the latest, and the *Z Psycopg 2 Database Connection is configured to use utf-8.* Zope is 2.12.20 + latest security fix. When I try to do: span tal:replace=result/?column / (result came from an ZSQL method) I get an UnicodeDecodeError: Traceback (innermost last): Module ZPublisher.Publish, line 127, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module Shared.DC.Scripts.Bindings, line 324, in __call__ Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render Module Products.PageTemplates.PageTemplate, line 80, in pt_render Module zope.pagetemplate.pagetemplate, line 113, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 946, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 376, in do_startEndTag Module zope.tal.talinterpreter, line 405, in do_startTag Module zope.tal.talinterpreter, line 502, in attrAction_tal UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128) if I do: span tal:replace=python:str(result['column']).decode('utf-8') / it works. (I use str because I've also dates in the record, otherwise I could not decode being it not a string) I've several zpt to fix, and I would like it to work as it should. My analisys is that result['column'] is seen as a plain string with \xx characters inside, and decode just transform it in something that Zope recognize as utf-8 when it prints it. Anyway, any idea? ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 95, Issue 1
Hi Yuri, does this error occur with all browsers? Yes, unfortunately. I once had a similar issue that was caused only by some browsers because they do not send a HTTP_ACCEPT_CHARSET header. Maybe the following bug reports helps you in solving the issue: https://bugs.launchpad.net/zope2/+bug/160968 I can see it, but I've 2.12.XX and this should be fixed. This is the code in http.py: def getPreferredCharsets(self): '''See interface IUserPreferredCharsets''' charsets = [] sawstar = sawiso88591 = 0 header_present = bool(self.request.get('HTTP_ACCEPT_CHARSET')) for charset in self.request.get('HTTP_ACCEPT_CHARSET', '').split(','): charset = charset.strip().lower() isn't HTTP_ stripped from the request variable name? I'm using a workaround similar to that in the bug report in my environment (Zope 2.13.13 and a mixture of utf-8 and iso8859). Without the workaround the issue does still occur for me. can you send me your workaround? Maybe it can help :P Greetings, Stefan Am 03.04.2012 09:40, schrieb Yuri: Hi! I've an Zope application, basically postgres + zpt. The postgres db has been upgraded to 8.5, the data inside is utf-8 (dumped and checkd it), the pg adapeter is the latest, and the *Z Psycopg 2 Database Connection is configured to use utf-8.* Zope is 2.12.20 + latest security fix. When I try to do: span tal:replace=result/?column / (result came from an ZSQL method) I get an UnicodeDecodeError: Traceback (innermost last): Module ZPublisher.Publish, line 127, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module Shared.DC.Scripts.Bindings, line 324, in __call__ Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec Module Products.PageTemplates.ZopePageTemplate, line 335, in _exec Module Products.PageTemplates.ZopePageTemplate, line 432, in pt_render Module Products.PageTemplates.PageTemplate, line 80, in pt_render Module zope.pagetemplate.pagetemplate, line 113, in pt_render Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 946, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 376, in do_startEndTag Module zope.tal.talinterpreter, line 405, in do_startTag Module zope.tal.talinterpreter, line 502, in attrAction_tal UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal not in range(128) if I do: span tal:replace=python:str(result['column']).decode('utf-8') / it works. (I use str because I've also dates in the record, otherwise I could not decode being it not a string) I've several zpt to fix, and I would like it to work as it should. My analisys is that result['column'] is seen as a plain string with \xx characters inside, and decode just transform it in something that Zope recognize as utf-8 when it prints it. Anyway, any idea? ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 95, Issue 1
Il 05/04/2012 14:18, Stefan Loidl ha scritto: I'm using a workaround similar to that in the bug report in my environment (Zope 2.13.13 and a mixture of utf-8 and iso8859). Without the workaround the issue does still occur for me. can you send me your workaround? Maybe it can help :P My workaround is for the file unicodeconflictresolver.py. The diff for Zope 2.13.13 (I never used Zope 2.12) is: 100,101d99 charsets.append('iso-8859-15') But as the issue occurs for you with all browsers, I don't think that it will help. I agree, also because the browsers receive correctly 'utf-8' as the preferred charset. I still can't understand what happen, because nothing has changed recently in this application. ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 98, Issue 1
http://plone.org/documentation/kb/catalog-anything Il 03/08/2012 14:00, zope-requ...@zope.org ha scritto: Send Zope mailing list submissions to zope@zope.org To subscribe or unsubscribe via the World Wide Web, visit https://mail.zope.org/mailman/listinfo/zope or, via email, send a message with subject or body 'help' to zope-requ...@zope.org You can reach the person managing the list at zope-ow...@zope.org When replying, please edit your Subject line so it is more specific than Re: Contents of Zope digest... Today's Topics: 1. Catalog a dictionary (Giampiero Benvenuti) -- Message: 1 Date: Fri, 3 Aug 2012 13:13:34 +0200 From: Giampiero Benvenutigiampiero.benven...@chiaroscuro.com To: zope@zope.org Subject: [Zope] Catalog a dictionary Message-ID:4e0a87d6-caae-4cfa-8d30-2384073f4...@chiaroscuro.com Content-Type: text/plain; charset=us-ascii Hello! can you please give me some hints on how to catalog a list of dictionaries? Is it possible? L= [{'id':'1','lastName':'Rossi','firstName':'Mario'}, {...), etc..] for d in L: context.Mycatalog.catalog_object( d, d['id']) Thanks so much in advance! GP -- ___ Zope maillist - Zope@zope.org End of Zope Digest, Vol 98, Issue 1 *** ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope Digest, Vol 101, Issue 4
I think an official statement about this topic should appear somewhere, shouldn't? Il 12/11/2012 13:00, zope-requ...@zope.org ha scritto: You can just apply the Plone hotfix for Zope only installations. The Plone patches are not applied then. Johannes On 11/11/2012 06:32 PM, Marcus Schopen wrote: Hi, is a standard Zope affected by this security vulnerability or only if Plone is installed: http://plone.org/products/plone/security/advisories/20121106-announcement The patch is replacing some basic classes therefore it looks to me that Zope itself without any Plone is vulnerable too. If so is there a Hotfix for Zope or new Zope version which fixes these bugs? Ciao Marcus ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev ) - -- programmatic web development di(fh) johannes raggam / thet python plone zope development mail: off...@programmatic.pro web: http://programmatic.pro http://bluedynamics.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCf+YkACgkQW4mNMQxDgAfzewCg5VPyH+ADX/75eSBDxxy1BEWK RaQAoIXSX+Mj8J+yrWd4KD6HKglDQHtu =cxZJ -END PGP SIGNATURE- -- ___ Zope maillist - Zope@zope.org End of Zope Digest, Vol 101, Issue 4 ___ Zope maillist - Zope@zope.org https://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope-dev )