[Zope] Cyclic garbage collection todo 2.9.3 onwards, fixed?
Hi All, Could anyone advise whether this has been fixed in any of the Zope versions beyond v2.9.3: To-do: * Add cyclic-garbage collection support to C extension classes, especially to acquisition wrappers. I don't see any mention of it at all after Zope 2.9.4 in the changes.txt. Cheers Jon ___ 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] Multiple conditions inside tales
Ok, so it was the tal inside this condition that contained the error, you were right, it was correct. Sorry for wasting your time. Thanks to Andreas and Dieter for their help anyway. J -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: 22 August 2006 17:49 To: [EMAIL PROTECTED]; 'Andreas Jung'; zope@zope.org Subject: RE: [Zope] Multiple conditions inside tales --On 22. August 2006 17:37:40 +0100 Jonathan Bowlas [EMAIL PROTECTED] wrote: So what if the first part evaluates to false? Which is what would happen in my case, it doesn't then test for the 2nd condition? J Did I say said? No, I didn't. And of course the second part will be evaluated if the first one evals to False. If you can provide a reproducable testcase that provides evidence, I'll believe in your original statement. Currently I don't :-) -aj ___ 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] Multiple conditions inside tales
Title: Multiple conditions inside tales Hi All, Just a quickie to see if I can do this: tal:condition=python:context.REQUEST.model.meta_type=='Silva Publication' or context.REQUEST.model.is_default() When I test it seems to ignore the 2nd condition, so could anyone suggest the correct syntax. Cheers Jon ___ 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] Multiple conditions inside tales
So what if the first part evaluates to false? Which is what would happen in my case, it doesn't then test for the 2nd condition? J -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: 22 August 2006 15:43 To: [EMAIL PROTECTED]; zope@zope.org Subject: Re: [Zope] Multiple conditions inside tales --On 22. August 2006 15:36:20 +0100 Jonathan Bowlas [EMAIL PROTECTED] wrote: Hi All, Just a quickie to see if I can do this: tal:condition=python:context.REQUEST.model.meta_type=='Silva Publication' or context.REQUEST.model.is_default() If the first part of the OR clause evaluates to True then there is no need to evaluate the second part (optimization). -aj ___ 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] Check Zope status
Hi All, Were having a few problems with our Zope server, it seems to be crashed but were not sure whether it is actually crashed or merely waiting (a long time) for a response from LDAP to authenticate our users, which may be causing it to hang. Is there any tool we can use to test to see if Zope has actally crashed? Jon ___ 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] Check Zope status
Many thanks for all the help, I'll check this lot out. Much appreciated. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: 11 July 2006 15:12 To: zope@zope.org Subject: Re: [Zope] Check Zope status On Tue, Jul 11, 2006 at 02:20:48PM +0100, Jonathan Bowlas wrote: We're having a few problems with our Zope server, it seems to be crashed but were not sure whether it is actually crashed or merely waiting (a long time) for a response from LDAP to authenticate our users, which may be causing it to hang. Is there any tool we can use to test to see if Zope has actally crashed? I'm assuming you're on *nix of some flavor. First thing to do is use ps to see if there are any zope-related python processes running. For example: $ ps wax | grep python | grep ope On my gentoo workstation, I'm running both zope and zeo currently, so I get: 9609 ?S 0:05 /usr/local/bin/python /home/pw/z29soft/lib/python/Zope2/Startup/run.py -C /home/pw/z29inst/etc/zope.conf 9610 ?S 0:01 /usr/local/bin/python /home/pw/z29soft/lib/python/ZEO/runzeo.py -C /home/pw/z29inst/etc/zeo.conf If there are no processes, zope is obviously not running at all :) If there are processes but zope is not responding, first thing I would do is check the end of the zope event log and request log. That would help narrow down the time at which problems started. http://zopewiki.org/Z2Log http://zopewiki.org/EventLog Then, try GDB to figure out what zope is doing. http://www.upfrontsystems.co.za/Members/jean/zope-notes/debug-spinning-zope And, to make life easier next time, install http://www.zope.org/Members/nuxeo/Products/DeadlockDebugger finally, another tool that can help diagnose apparent hangs is the trace log, formerly known as the big M log. http://zopewiki.org/TraceLog -- Paul Winkler http://www.slinkp.com ___ 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 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] Nested dtml tags
Hi All, How can I do this with dtml? select name=MODLEVEL size=1 dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an alternative to this. option value=1 selected=selected1/option option value=22/option Etc, etc. Hope someone can help. Jon ___ 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] Nested dtml tags
Hmm, this doesn't appear to work. Let me explain what I'm trying to do. I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL: SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar MODCODE type=string This recordset is returned to a dtml form to populate the fields ready for editing. One of the database table entries returned from this query is the value of MODLEVEL, this modlevel can be one of seven choices that appear in a select list. However I'd like the one returned from the database to appear as selected in the form for editing. As far as I can see the example you gave me does not retrieve the value of MODLEVEL from the returned SQL recordset it only checks for its existence and consequently cannot test for the conditions. Any Ideas how I may resolve this? Jon -Original Message- From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED] Sent: 20 June 2006 12:29 To: [EMAIL PROTECTED]; zope@zope.org Subject: RE: [Zope] Nested dtml tags [EMAIL PROTECTED] On Behalf Of Jonathan Bowlas How can I do this with dtml? select name=MODLEVEL size=1 dtml-if expr=dtml-var name=MODLEVEL == 1 #I need an alternative to this. option value=1 selected=selected1/option option value=22/option Etc, etc. dtml-if MODLEVEL select name=MODLEVEL:int size=1 option value=1 dtml-if expr=MODLEVEL == 1SELECTED/dtml-if 1/option option value=2 dtml-if expr=MODLEVEL == 2SELECTED/dtml-if 2/option Etc, etc. /dtml-if Regards, JL. ___ 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] Nested dtml tags
Thanks for everyone's help. I may be able to sort this now. -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED] Sent: 20 June 2006 15:09 To: [EMAIL PROTECTED] Cc: 'Jaroslav Lukesh'; zope@zope.org Subject: Re: [Zope] Nested dtml tags Jonathan Bowlas schrieb: Hmm, this doesn't appear to work. Let me explain what I'm trying to do. I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL: SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = dtml-sqlvar MODCODE type=string You should never use SELECT * in production code. Better state the name of the columns you really want there. (Thus fixing their name) One simple form would be: SELECT modlevel,modname,modlevel=dtml-sqlvar modlevel as selected FROM foobar WHERE modcode = dtml-sqlvar modcode type=string ... Then you could use the result of your ZSQL Method more or less directly, in ZPT for example: select name=MODLEVEL (size=1 is default anyway ;) option tal:repeat=mod here/yourZSQLMethod tal:attributes=value mod/modlevel; selected mod/selected tal:content=mod/modname123/option /select In Python Script, it should work like this: MODLEVEL=request.form.get('MODLEVEL','') # make sure you get the types correctly return [dict(x,selected=x.modlevel==MODLEVEL) for x in context.selectmoduleinfoMethod()] this works with your ZSQL method as it is (more or less - adjust the column names) and can be used like the one above. If you like ugly templates and a lot of writing you can translate the example to DTML - this is left to the reader ;) 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 )
[Zope] Render DTML inslide ZPT slot
Hi All, Is it possible to render DTML methods inside a slot of a ZPT? If so, how would I achieve this? My DTMLs render forms to submit/edit data in a MySQL database something which cannot be done as easily in ZPT, I believe. Correct me if Im wrong. Jon ___ 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] How to convert characters that have special meaning in HTML to HTML character entities
Hi All, I have a string that contains a a href=http://www.mywebaddress.com;link/a tag that I would like rendered as HTML when output but it only seems to render in the html page like this lt;a href=http://www.mywebaddress.comgt;linklt;/agt; To replace the characters, I tried this in my TAL: tal:block tal:define=d_stand row/STANDFIRST | nothing; d_stand_replaced_chars python: (str(d_stand)).replace('gt;',''); p tal:condition=d_stand_replaced_chars tal:content=d_stand_replaced_chars / /tal:block But it converted the 'gt;' I replaced with a '' back to a 'gt;' upon rendering the string in a html page. Any ideas how I can achieve this? Jon ___ 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: How to convert characters that have special meaning in HTML to HTML character entities
Whoa, speedy response! Thanks a lot, although I should've known this. beats self around head -Original Message- From: Max M [mailto:[EMAIL PROTECTED] Sent: 06 April 2006 13:24 To: [EMAIL PROTECTED] Subject: Re: How to convert characters that have special meaning in HTML to HTML character entities Jonathan Bowlas wrote: Hi All, I have a string that contains a a href=http://www.mywebaddress.com;link/a tag that I would like rendered as HTML when output but it only seems to render in the html page like this lt;a href=http://www.mywebaddress.comgt;linklt;/agt; To replace the characters, I tried this in my TAL: tal:block tal:define=d_stand row/STANDFIRST | nothing; d_stand_replaced_chars python: (str(d_stand)).replace('gt;',''); p tal:condition=d_stand_replaced_chars tal:content=d_stand_replaced_chars / /tal:block But it converted the 'gt;' I replaced with a '' back to a 'gt;' upon rendering the string in a html page. Any ideas how I can achieve this? tal:content=structure d_stand_replaced_chars -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science Phone: +45 66 11 84 94 Mobile: +45 29 93 42 96 ___ 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] Memory Leak Debugging
Hi All, A few weeks ago I posted this message to the list but we still haven't resolved our memory leak, mainly because we have no idea where to look. So having trawled around a few forums I decided to install the LeakFinder product onto our development server and click around a little watching the refcounts. Here I noticed that Products.Silva.Image.Image DateTime.DateTime.DateTime had the largest number of references. So following the LeakFinder instructions I attempted to patch each of these classes. I started with the Products.Silva.Image.Image class and continued to click around to return some results, unfortunately this never returned any results at all so that wasn't much help. Next I patched the DateTime.DateTime.DateTime class which returned a huge amount of information on the results tab. So I'm now hoping someone could help me in deciphering these results and explain what exactly should I be looking for here? And it would also be useful to know why the Products.Sivla.Image.Image class doesn't return any results at all. Hope someone can help. Jon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Bowlas Sent: 15 February 2006 11:49 To: zope@zope.org Subject: RE: [Zope] Memory Leak Debugging Hi All, We're having serious problems with performance running Silva CMS on Zope 2.7.8-final, python 2.3.5, linux2 set up on a machine with 2.5GB RAM. There are currently only about 65 users and around 2000 documents in the CMS but it seems to run for a week, then the RAM fills up and crashes so we have to restart the server manually. The Zope logs aren't much help as I enquired on the Zope list and their response was we need more RAM. But surely 2.5GB is enough. I've also checked Control_Panel/DebugInfo for any refcounts with significant jumps and Products.Silva.Image.Image seems to be the culprit: 11.32am 11.36am Products.Silva.Image.Image 56203 58153 +1950 Acquisition.ImplicitAcquirerWrapper 44825 45151 +326 So we've tried to figure out which kind of request triggers these refcount jumps by creating a separate instance with a very small ZODB Cache (so it gets filled up soon), and clicked around a little, watching the refcounts but we cannot seem to replicate it. So basically this is a plea for help from an expert Zope debugger who can assist us in finding the source of the problem so we can resolve it. Or alternatively someone who can give us a set of instructions that we can follow that will enable us to locate the problem, I've googled it and there are no clear answers. FYI we have the following products installed on our Zope instance. Annotations 0.4.3 BTreeFolder2-1.0.1 DocFinderTab (0.5.2) External Method-1-0-0 FileSystemSite 1.4.2 Formulator 1.10 Groups 0.4 IssueTrackerProduct (0.6.13) LDAPUserFolder (2.3) MIMETools MailHost-1-3-0 OFSP-1-0-0 PageTemplates-1-4-0 ParsedXML 1.4 PlacelessTranslationService (1.0) PluginIndexes ProxyIndex 1.2 PythonScripts-2-0-0 Sessions Silva 1.4.1 SilvaBlog 0.4.2 SilvaCustomAutoTOC 0.9 SilvaDocument 1.4.1 SilvaDocumentPatches 1.3b6-1 SilvaExtETHLDAP 0.7 SilvaExternalSources 0.10.3 SilvaMetadata 0.10 SilvaNewsNetwork 2.0 SilvaReferenceChecker 0.2 SilvaStylesheets 0.6.2 SilvaUCLAttributes 0.7 - (A UCL product*) Silva UCL Gallery 0.1 - (A UCL product*) SilvaUCLSubjectAudienceFilters 0.6 - (A UCL product*) SilvaViews 0.11 SiteAccess-2-0-0 SiteErrorLog Sprout 0.6.2 StandardCacheManagers-1-1-0 TemporaryFolder Transience Tropos (1.9.12) XMLWidgets-Pluggable 0.13 (CVS/UNRELEASED) ZCTextIndex ZCatalog-2-2-0 ZGadflyDA ZMySQLDA 2.0.8 ZODBMountPoint ZOracleDA ZReST (1.1) ZSQLMethods Zope Tutorial 1.2 kupu 1.3.2 z3locales 0.1 If you require any further information do not hesitate to ask. Hope someone can help. Jon Bowlas University College London ___ 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 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] Memory Leak Debugging
Hi All, We're having serious problems with performance running Silva CMS on Zope 2.7.8-final, python 2.3.5, linux2 set up on a machine with 2.5GB RAM. There are currently only about 65 users and around 2000 documents in the CMS but it seems to run for a week, then the RAM fills up and crashes so we have to restart the server manually. The Zope logs aren't much help as I enquired on the Zope list and their response was we need more RAM. But surely 2.5GB is enough. I've also checked Control_Panel/DebugInfo for any refcounts with significant jumps and Products.Silva.Image.Image seems to be the culprit: 11.32am 11.36am Products.Silva.Image.Image 5620358153 +1950 Acquisition.ImplicitAcquirerWrapper4482545151 +326 So we've tried to figure out which kind of request triggers these refcount jumps by creating a separate instance with a very small ZODB Cache (so it gets filled up soon), and clicked around a little, watching the refcounts but we cannot seem to replicate it. So basically this is a plea for help from an expert Zope debugger who can assist us in finding the source of the problem so we can resolve it. Or alternatively someone who can give us a set of instructions that we can follow that will enable us to locate the problem, I've googled it and there are no clear answers. FYI we have the following products installed on our Zope instance. Annotations 0.4.3 BTreeFolder2-1.0.1 DocFinderTab (0.5.2) External Method-1-0-0 FileSystemSite 1.4.2 Formulator 1.10 Groups 0.4 IssueTrackerProduct (0.6.13) LDAPUserFolder (2.3) MIMETools MailHost-1-3-0 OFSP-1-0-0 PageTemplates-1-4-0 ParsedXML 1.4 PlacelessTranslationService (1.0) PluginIndexes ProxyIndex 1.2 PythonScripts-2-0-0 Sessions Silva 1.4.1 SilvaBlog 0.4.2 SilvaCustomAutoTOC 0.9 SilvaDocument 1.4.1 SilvaDocumentPatches 1.3b6-1 SilvaExtETHLDAP 0.7 SilvaExternalSources 0.10.3 SilvaMetadata 0.10 SilvaNewsNetwork 2.0 SilvaReferenceChecker 0.2 SilvaStylesheets 0.6.2 SilvaUCLAttributes 0.7 - (A UCL product*) Silva UCL Gallery 0.1 - (A UCL product*) SilvaUCLSubjectAudienceFilters 0.6 - (A UCL product*) SilvaViews 0.11 SiteAccess-2-0-0 SiteErrorLog Sprout 0.6.2 StandardCacheManagers-1-1-0 TemporaryFolder Transience Tropos (1.9.12) XMLWidgets-Pluggable 0.13 (CVS/UNRELEASED) ZCTextIndex ZCatalog-2-2-0 ZGadflyDA ZMySQLDA 2.0.8 ZODBMountPoint ZOracleDA ZReST (1.1) ZSQLMethods Zope Tutorial 1.2 kupu 1.3.2 z3locales 0.1 If you require any further information do not hesitate to ask. Hope someone can help. Jon Bowlas University College London ___ 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] Memory Leak Debugging
Hi All, We're having serious problems with performance running Silva CMS on Zope 2.7.8-final, python 2.3.5, linux2 set up on a machine with 2.5GB RAM. There are currently only about 65 users and around 2000 documents in the CMS but it seems to run for a week, then the RAM fills up and crashes so we have to restart the server manually. The Zope logs aren't much help as I enquired on the Zope list and their response was we need more RAM. But surely 2.5GB is enough. I've also checked Control_Panel/DebugInfo for any refcounts with significant jumps and Products.Silva.Image.Image seems to be the culprit: 11.32am 11.36am Products.Silva.Image.Image 56203 58153 +1950 Acquisition.ImplicitAcquirerWrapper 44825 45151 +326 So we've tried to figure out which kind of request triggers these refcount jumps by creating a separate instance with a very small ZODB Cache (so it gets filled up soon), and clicked around a little, watching the refcounts but we cannot seem to replicate it. So basically this is a plea for help from an expert Zope debugger who can assist us in finding the source of the problem so we can resolve it. Or alternatively someone who can give us a set of instructions that we can follow that will enable us to locate the problem, I've googled it and there are no clear answers. FYI we have the following products installed on our Zope instance. Annotations 0.4.3 BTreeFolder2-1.0.1 DocFinderTab (0.5.2) External Method-1-0-0 FileSystemSite 1.4.2 Formulator 1.10 Groups 0.4 IssueTrackerProduct (0.6.13) LDAPUserFolder (2.3) MIMETools MailHost-1-3-0 OFSP-1-0-0 PageTemplates-1-4-0 ParsedXML 1.4 PlacelessTranslationService (1.0) PluginIndexes ProxyIndex 1.2 PythonScripts-2-0-0 Sessions Silva 1.4.1 SilvaBlog 0.4.2 SilvaCustomAutoTOC 0.9 SilvaDocument 1.4.1 SilvaDocumentPatches 1.3b6-1 SilvaExtETHLDAP 0.7 SilvaExternalSources 0.10.3 SilvaMetadata 0.10 SilvaNewsNetwork 2.0 SilvaReferenceChecker 0.2 SilvaStylesheets 0.6.2 SilvaUCLAttributes 0.7 - (A UCL product*) Silva UCL Gallery 0.1 - (A UCL product*) SilvaUCLSubjectAudienceFilters 0.6 - (A UCL product*) SilvaViews 0.11 SiteAccess-2-0-0 SiteErrorLog Sprout 0.6.2 StandardCacheManagers-1-1-0 TemporaryFolder Transience Tropos (1.9.12) XMLWidgets-Pluggable 0.13 (CVS/UNRELEASED) ZCTextIndex ZCatalog-2-2-0 ZGadflyDA ZMySQLDA 2.0.8 ZODBMountPoint ZOracleDA ZReST (1.1) ZSQLMethods Zope Tutorial 1.2 kupu 1.3.2 z3locales 0.1 If you require any further information do not hesitate to ask. Hope someone can help. Jon Bowlas University College London ___ 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 )