Re: [Zope-dev] How to automatically redirect publishing request toanother folder?
How about creating a body-dtml method in the root, with dtml-with firstSlide dtml-var body /dtml-with --On Freitag, Januar 25, 2002 01:51:53 -0500 Craeg K. Strong [EMAIL PROTECTED] wrote: Hello: We have a Slideshow product that is similar to OrderedFolder in that it maintains an ordered list of contents. Each subfolder represents a slide. To view a particular slide, you navigate to the subfolder, it automatically calls index_html, and there's your slide. All of the slides actually acquire their index_html DTMLDocument from high up on the food chain. The index_html in turn calls dtml-var body and the body is, of course, different for each slide. This is convenient, b/c each slide shares header/footer/etc. My problem is this. When you type in the URL of the top level folder (that is, the slideshow folder itself) I want Zope to behave as if you typed in the URL of the first slide automagically. The Slideshow product has an easy way to get our mitts on the firstSlide object, so that part is not a problem, but I cannot get it to work. Of course, if I create an index_html() method directly in my Slideshow.py, that screws up my acquisition. Zope dies with an infinite recursion. Next try: using __bobo_traverse__() That is a little bit nasty, b/c you have to figure out whether you are the end destination or if Zope is just passin' thru. [ See http://www.zope.org//Members/andym/wiki/MessingWithTraversal ] Nothing works quite right. Conceptually I know what I want to do: call index_html on firstSlide() in the _context_ of firstSlide(). However, my Zope Zen is failing me.Has anyone done something like this? Thanks in advance! --Craeg ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) Mit freundlichen Grüßen Joachim Schmitz AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://germany.keyserver.net/en/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Use sql database in ZCatalog
On Fri, 25 Jan 2002, Howard Zhang wrote: Does anyone use sql database to store index and meta data for performance and still provide same zcatlog api to keep compatibility ?. Why do you think storing metadata in an sql database would improve performance? I'm not saying it wouldn't, but it's not obvious to me that it would. --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Error 11
Should I install a new version of mysqlda? Chris McDonough [EMAIL PROTECTED] 01/24/02 13:50 PM I'd suspect mysqlda. - Original Message - From: Ahsan Imam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 3:40 PM Subject: Re: [Zope-dev] Error 11 Setting the variable did not help. I downloaded and built Python 2.1.2 yesterday. Products: zope-tinytable-0.8.2-2 zope-zmysqlda-2.0.7-5 Chris McDonough [EMAIL PROTECTED] 01/24/02 12:22 PM Sigh. Can you try to start Zope with the environment variable ZOPE_SECURITY_POLICY=PYTHON set to see if the problem continues? Are you using any database adapters or other C extensions? Are you sure that Zope is using the Python 2.1.2 that you installed? - Original Message - From: Ahsan Imam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 12:57 PM Subject: [Zope-dev] Error 11 Hey Chris, 1) Installed Python 2.1.2 (with threads and without pymalloc) 2) Got the latest cvs built of zope 2.4. 3) Then compiled zope wo pcgi. 4) Even tried with the Zope 2.5 beta. Zope still keeps restarting every 10 to 15 minutes. Excerpt from the stupid.log: 2002-01-24T16:53:01 ERROR(200) zdaemon zdaemon: Thu Jan 24 09:53:01 2002: Aiieee! 21993 exited with error code: 11 -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Houston, we have forked -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Houston, we have forked -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Hi, I just forked off a kid: 22007 -- 2002-01-24T16:53:04 PROBLEM(100) OFS.Application Duplicate Product name After loading Product 'Customizations' from '/usr/local/zslave2/Products', I skipped the one in '/usr/local/zope/lib/python/Products'. -- 2002-01-24T16:53:13 INFO(0) ZODB Opening database for mounting: '148382768_1011864262.427182' -- 2002-01-24T16:53:13 INFO(0) ZODB Mounted database '148382768_1011864262.427182' at /temp_folder -- 2002-01-24T16:53:13 INFO(0) Zope Default Object Creation /usr/local/zope/lib/python/../../import/Examples.zexp examples import file could not be found. -- 2002-01-24T16:53:13 INFO(0) ZServer HTTP server started at Thu Jan 24 09:53:13 2002 Hostname: node1.newtimes.com Port: 8080 -- 2002-01-24T16:53:13 INFO(0) ZServer FastCGI Server (V1.0) started at Thu Jan 24 09:53:13 2002 IP : zslave2.newtimes.com Port: 8889 Socket path : None ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Error 11
You should try to diagnose the problem first by eliminating mysqlda. - Original Message - From: Ahsan Imam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 25, 2002 12:38 PM Subject: Re: [Zope-dev] Error 11 Should I install a new version of mysqlda? Chris McDonough [EMAIL PROTECTED] 01/24/02 13:50 PM I'd suspect mysqlda. - Original Message - From: Ahsan Imam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 3:40 PM Subject: Re: [Zope-dev] Error 11 Setting the variable did not help. I downloaded and built Python 2.1.2 yesterday. Products: zope-tinytable-0.8.2-2 zope-zmysqlda-2.0.7-5 Chris McDonough [EMAIL PROTECTED] 01/24/02 12:22 PM Sigh. Can you try to start Zope with the environment variable ZOPE_SECURITY_POLICY=PYTHON set to see if the problem continues? Are you using any database adapters or other C extensions? Are you sure that Zope is using the Python 2.1.2 that you installed? - Original Message - From: Ahsan Imam [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 12:57 PM Subject: [Zope-dev] Error 11 Hey Chris, 1) Installed Python 2.1.2 (with threads and without pymalloc) 2) Got the latest cvs built of zope 2.4. 3) Then compiled zope wo pcgi. 4) Even tried with the Zope 2.5 beta. Zope still keeps restarting every 10 to 15 minutes. Excerpt from the stupid.log: 2002-01-24T16:53:01 ERROR(200) zdaemon zdaemon: Thu Jan 24 09:53:01 2002: Aiieee! 21993 exited with error code: 11 -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Houston, we have forked -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Houston, we have forked -- 2002-01-24T16:53:02 INFO(0) zdaemon zdaemon: Thu Jan 24 09:53:02 2002: Hi, I just forked off a kid: 22007 -- 2002-01-24T16:53:04 PROBLEM(100) OFS.Application Duplicate Product name After loading Product 'Customizations' from '/usr/local/zslave2/Products', I skipped the one in '/usr/local/zope/lib/python/Products'. -- 2002-01-24T16:53:13 INFO(0) ZODB Opening database for mounting: '148382768_1011864262.427182' -- 2002-01-24T16:53:13 INFO(0) ZODB Mounted database '148382768_1011864262.427182' at /temp_folder -- 2002-01-24T16:53:13 INFO(0) Zope Default Object Creation /usr/local/zope/lib/python/../../import/Examples.zexp examples import file could not be found. -- 2002-01-24T16:53:13 INFO(0) ZServer HTTP server started at Thu Jan 24 09:53:13 2002 Hostname: node1.newtimes.com Port: 8080 -- 2002-01-24T16:53:13 INFO(0) ZServer FastCGI Server (V1.0) started at Thu Jan 24 09:53:13 2002 IP : zslave2.newtimes.com Port: 8889 Socket path : None ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Very, very strange problem with 2_4-branch
After upgrading to 2_4-branch, I started having some problems with authentication, or so I thought. I have a standard user folder in the root and an XUF in a top-level folder. After much wailing and gnashing of teeth, I dug into _check_context, and added a debug statement, now I have: def _check_context(self, object): # Check that 'object' exists in the acquisition context of # the parent of the acl_users object containing this user, # to prevent stealing access through acquisition tricks. # Return true if in context, false if not or if context # cannot be determined (object is not wrapped). parent = getattr(self, 'aq_parent', None) context = getattr(parent, 'aq_parent', None) if context is not None: if object is None: return 1 if not hasattr(object, 'aq_inContextOf'): if hasattr(object, 'im_self'): # This is a method. Grab its self. object=object.im_self if not hasattr(object, 'aq_inContextOf'): # Object is not wrapped, so return false. return 0 zLOG.LOG('BasicUser._check_context', zLOG.DEBUG, '%s.aq_inContextOf(%s, 1) returned %d' % (object.getPhysicalPath(), context.getPhysicalPath(), object.aq_inContextOf(context, 1))) return object.aq_inContextOf(context, 1) I am getting the following log output: 2002-01-25T16:36:23 DEBUG(-200) BasicUser._check_context ('', 'zope').aq_inContextOf(('', 'zope'), 1) returned 1 and 2002-01-25T16:38:07 DEBUG(-200) BasicUser._check_context ('', 'zope', 'dept', 'is', 'alerts').aq_inContextOf(('', 'zope'), 1) returned 0 Now, the weird part is that this problem is sporadic. It will go away and reappear with some frequency. Any ideas? Anyone? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] RELEASED - StandaloneZODB 1.0 release candidate 1
I'm please to announce the first official release of StandaloneZODB, the Python object persistency system also known as the Z Object Database. ZODB is the object-oriented database underlying Zope; the StandaloneZODB project's goal is to provide those same facilities to non-Zope related Python applications. Today we are releasing StandaloneZODB 1.0 release candidate 1. We expect to release the final version on 1-Feb-2002. StandaloneZODB is based on the same code as the ZODB in Zope, albeit on a separate release branch. Its inspiration comes from Andrew Kuchling's StandaloneZODB project on SourceForge. While there are still some differences, the Standalone 1.0 release is the first on the path toward convergence. Subsequent releases should complete the merge of Andrew's and Zope Corporation's packages. The StandaloneZODB release includes the following components: - Core ZODB, including the persistence machinery - Standard storages such as FileStorage - Supporting modules such as ExtensionClass - The persistent BTrees modules - ZEO - Experimental Berkeley storages - Some documentation wink See the README file for details on building and installing StandaloneZODB. For details on using ZODB, see Andrew's included user guide. StandaloneZODB 1.0c1 is released under the ZPL 2.0. It should be compatible with all Python versions from Python 2.1 to Python 2.2. It may or may not work with versions earlier than Python 2.1. Download StandaloneZODB-1.0c1.tgz from: http://www.zope.org/Products/StandaloneZODB and visit the StandaloneZODB Wiki page at: http://www.zope.org/Wikis/ZODB/StandaloneZODB See also: http://www.zope.org/Wikis/ZODB/FrontPage for more information about our long-range ZODB plans. Enjoy, -Barry Barry A. Warsaw Zope Corporation, Pythonlabs [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Error 11
Ahsan Imam wrote: Setting the variable did not help. I downloaded and built Python 2.1.2 yesterday. Products: zope-tinytable-0.8.2-2 zope-zmysqlda-2.0.7-5 Chris McDonough [EMAIL PROTECTED] 01/24/02 12:22 PM Sigh. Can you try to start Zope with the environment variable ZOPE_SECURITY_POLICY=PYTHON set to see if the problem continues? Are you using any database adapters or other C extensions? Are you sure that Zope is using the Python 2.1.2 that you installed? Try applying this patch to db.py in ZMySQLDA. It makes it so MySQLDA database connections reopen themselves when the DA object migrates between threads. --- ../ZMySQLDA-orig/db.py Thu Sep 6 23:45:35 2001 +++ db.py Tue Jan 8 14:24:52 2002 @@ -104,6 +104,7 @@ import string, sys from string import strip, split, find, upper, rfind from time import time +import thread hosed_connection = ( CR.SERVER_GONE_ERROR, @@ -180,11 +181,12 @@ self.connection=connection self.kwargs = kwargs = self._parse_connection_string(connection) self.db=apply(self.Database_Connection, (), kwargs) - self.transactions = self.db.server_capabilities CLIENT.TRANSACTIONS + self.transactions = self.db.server_capabilities CLIENT.TRANSACTIONS if self._try_transactions == '-': self.transactions = 0 elif not self.transactions and self._try_transactions == '+': raise NotSupportedError, transactions not supported by this server +self._v_tid = thread.get_ident() def _parse_connection_string(self, connection): kwargs = {'conv': self.conv} @@ -275,6 +277,10 @@ desc=None result=() db=self.db +# Because we might not be thread-safe across threads... +if not self._v_tid == thread.get_ident(): +db=self.db=apply(self.Database_Connection, (), self.kwargs) +self._v_tid = thread.get_ident() try: for qs in filter(None, map(strip,split(query_string, '\0'))): qtype = upper(split(qs, None, 1)[0]) @@ -297,7 +303,7 @@ except OperationalError, m: if m[0] not in hosed_connection: raise # Hm. maybe the db is hosed. Let's restart it. - db=self.db=apply(self.Database_Connection, (), self.kwargs) +db=self.db=apply(self.Database_Connection, (), self.kwargs) return self.query(query_string, max_rows) if desc is None: return (),()
RE: [Zope-dev] Use sql database in ZCatalog
Because we have thousands of portal document in our website. It takes more CPU and memory to catalog object. Also database size increase quickly. Howard -Original Message- From: R. David Murray [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:02 PM To: Howard Zhang Cc: [EMAIL PROTECTED] Subject: Re: [Zope-dev] Use sql database in ZCatalog On Fri, 25 Jan 2002, Howard Zhang wrote: Does anyone use sql database to store index and meta data for performance and still provide same zcatlog api to keep compatibility ?. Why do you think storing metadata in an sql database would improve performance? I'm not saying it wouldn't, but it's not obvious to me that it would. --RDM ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )