[Zope-dev] Zope Tests: 5 OK
Summary of messages to the zope-tests list. Period Tue Apr 10 12:00:00 2007 UTC to Wed Apr 11 12:00:00 2007 UTC. There were 5 messages: 5 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Tue Apr 10 20:50:46 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-April/007573.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Tue Apr 10 20:52:16 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-April/007574.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Apr 10 20:53:47 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-April/007575.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Apr 10 20:55:17 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-April/007576.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Tue Apr 10 20:56:47 EDT 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-April/007577.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Sessions and long requests = conflicts? Mcdutils?
Hi Currently I have some problems with our application (Zope2.8.4) and with Conflict Errors in sessions. In general if we have few concurrent requests that are running sometimes for 3-4 minutes (and they're touching session inside) I get a lot of conflict errors with Inceraser, OOBTree, Length2 etc. These are errors like: serial starded with xxx serial currently commited Of course I know that it is best to move such long processes to something external with Async, lovely.Remotetask or built in Oracle jobs, but so far I have to deal with this state of our application (as I'm not the author ot this but rather something like an zope admin/supporter for this app). I think that ConflictErrors are caused because of sessions implementation, especially: timeslices, current bucket etc. as written in Transience/HowTransienceWorks.stx. Changing session_resolution_seconds to big value helps here. By default we had session_resolution_seconds set to 300. I wonder how this happens. If I have two requests that at the beginning modify it's sessions like: session.set('aa', 1), and then call long running ZSQLMethods then (if meanwhile timeslice has changed because of too short session_resolution_seconds): - first request that finishes finds that there is new 'current' bucket and moves it's session object and second request's session object to new 'current' bucket and commits this - second request finishes and finds that it's session object is not the same as it was at the beginning (because it was moved to 'current' bucket)?? Anybody can say if I'm right here? I also tried Faster product to manage sessions but this behaves in a similiar way (I mean causes conflict errors in such situation). I found 'mcdutils' too. Tres Seaver said on zope-dev (a long time ago) that it is supposed to have no conflict errors: http://mail.zope.org/pipermail/zope-dev/2006-May/027555.html Mcdutils: http://agendaless.com/Members/tseaver/software/mcdutils There is only 0.1 version. What is it's current state? Seems to be dead? Can I take a look at this or is this better to not even touch that? -- Maciej Wisniowski ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Sessions and long requests = conflicts? Mcdutils?
On 4/12/07, Maciej Wisniowski [EMAIL PROTECTED] wrote: Hi Currently I have some problems with our application (Zope2.8.4) and with Conflict Errors in sessions. In general if we have few concurrent requests that are running sometimes for 3-4 minutes (and they're touching session inside) I get a lot of conflict errors with Inceraser, OOBTree, Length2 etc. These are errors like: serial starded with xxx serial currently commited Of course I know that it is best to move such long processes to something external with Async, lovely.Remotetask or built in Oracle jobs, but so far I have to deal with this state of our application (as I'm not the author ot this but rather something like an zope admin/supporter for this app). I think that ConflictErrors are caused because of sessions implementation, especially: timeslices, current bucket etc. as written in Transience/HowTransienceWorks.stx. Changing session_resolution_seconds to big value helps here. By default we had session_resolution_seconds set to 300. You could keep experimenting with values to reduce the chances of conflicts. Perhaps sessions that last for days. With resolution of hours. Disabling inband housekeeping. Note that a session-timeout-minutes of 0 enables a slightly different approach which has a little less active structure. I wonder how this happens. If I have two requests that at the beginning modify it's sessions like: session.set('aa', 1), and then call long running ZSQLMethods then (if meanwhile timeslice has changed because of too short session_resolution_seconds): - first request that finishes finds that there is new 'current' bucket and moves it's session object and second request's session object to new 'current' bucket and commits this - second request finishes and finds that it's session object is not the same as it was at the beginning (because it was moved to 'current' bucket)?? Anybody can say if I'm right here? I don't think session mechanics operates like that at the end of a transaction. More generally what is happening is that the second transaction is trying to commit data that was changed by an earlier transaction after second transaction read that data. In this case the data is various bits of the internals that make up sessions and transience storage. Very careful use of explicit transaction commits may be all that you need in your application. For example, make all your edits of the session data early in the request and then commit the transaction. Then proceed with the longer operation. Might be that destroys the consistency of your application data though. -- Michael ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Sessions and long requests = conflicts? Mcdutils?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maciej Wisniowski wrote: Hi Currently I have some problems with our application (Zope2.8.4) and with Conflict Errors in sessions. In general if we have few concurrent requests that are running sometimes for 3-4 minutes (and they're touching session inside) I get a lot of conflict errors with Inceraser, OOBTree, Length2 etc. These are errors like: serial starded with xxx serial currently commited Of course I know that it is best to move such long processes to something external with Async, lovely.Remotetask or built in Oracle jobs, but so far I have to deal with this state of our application (as I'm not the author ot this but rather something like an zope admin/supporter for this app). I think that ConflictErrors are caused because of sessions implementation, especially: timeslices, current bucket etc. as written in Transience/HowTransienceWorks.stx. Changing session_resolution_seconds to big value helps here. By default we had session_resolution_seconds set to 300. I wonder how this happens. If I have two requests that at the beginning modify it's sessions like: session.set('aa', 1), and then call long running ZSQLMethods then (if meanwhile timeslice has changed because of too short session_resolution_seconds): - first request that finishes finds that there is new 'current' bucket and moves it's session object and second request's session object to new 'current' bucket and commits this - second request finishes and finds that it's session object is not the same as it was at the beginning (because it was moved to 'current' bucket)?? Anybody can say if I'm right here? I also tried Faster product to manage sessions but this behaves in a similiar way (I mean causes conflict errors in such situation). I found 'mcdutils' too. Tres Seaver said on zope-dev (a long time ago) that it is supposed to have no conflict errors: http://mail.zope.org/pipermail/zope-dev/2006-May/027555.html Mcdutils: http://agendaless.com/Members/tseaver/software/mcdutils There is only 0.1 version. What is it's current state? Seems to be dead? Can I take a look at this or is this better to not even touch that? 'mcdutils' is in a worked for me under light load state; I never ended up deploying it in production. Because it is not based on the ZODB, it is certainly not going to raise any ZODB conflict errors. However, using memcache as the only backing store for your data is *not* a recommended practice by the memcache developers: they designed it as a *cache*, not an atomic storage. I dropped further development on it once I evaluated the cost of having session data disappear (or become inaccessible) when new memcache servers were added, or old ones removed. I *do* use 'faster' in production, with the session storage mounted across ZEO (a configuration which nobody in their right mind would do with the standard session storage). Some conflicts are possible in the default configuration, although I never see them in practice at the user level. However, that applicaiton does *not* set up multiple long-running transactions which attempt to mutate the same session data. If you are *sharing* mutable session data between multiple long-running requests, and expect to have no conflicts, you are in for a disappointment: unless your application can supply resolution logic, you *want* conflict errors in such cases. If you believe that 'faster' is raising conflicts due its own internal data structures (OOBTree bucket splits), rather than in the application-dveined session data, there is a conflict-free alternative available: we found that it was slower than the other, and therefore didn't scale as well, even given the possibility of conflicts. To enable the conflict-free storage, you need to patch the '_BUCKET_TYPE' class-level variable of the storage to use 'AppendOnlyDict' rather than 'OOBTree'. E.g.: from Products.faster.sessiondata import CBSessionDataContainer from Products.faster.appendict import AppendOnlyDict CBSessionDataContainer._BUCKET_TYPE = AppendOnlyDict I had actually meant to make that a zope.conf-tweakable setting, but never got around to it. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGHbFO+gerLs4ltQ4RAk2UAJ9mFgY3OX4KZAK4ztGQwLMJX9MIEQCeJMfW 88/fKc3zcm4gi3efM15rJmg= =fRak -END PGP SIGNATURE- ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-PAS] struggling with Local Role plugin
Hi, I have what I think is a fairly simple use case for my Plone site. I want to be able to add a local role dynamically based on two factors - the content of the object, and a given external condition. So I've written a local role plugin, where getRolesInContext() checks these two factors and returns either an empty list or a list containing one item - the new role. This seems to work well. It's the checkLocalRolesAllowed() method I'm having problem with. My logic looks like: if object has specific content: if external condition is true: return 1 else: return None return None From looking at the PlonePAS code, it appears that the PloneUser class iterates through all of the LocalRole plugins, and continues until one of the plugins returns something other than None. But what happens is that the user is still denied access to the object. If I change the last return to 1, the user can access the object, but naturally gets access to everything else as well. Am I missing some basic logic here? Thanks, Stan McFarland ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
[Zope-PAS] Re: struggling with Local Role plugin
a quick way to check this and roles in general, is put together a python script that shows the users roles and permissions in context, as a quick example, here's one i use on occassion (check_roles).. and just invoke by in the url after the context, by appending check_roles. member = context.portal_membership.getAuthenticatedMember() print uid, member.getId() print email, member.getProperty('fullname'), member.getProperty('email') print groups, member.getGroups() print roles context, member.getRolesInContext( context ) print perm reply, context.portal_membership.checkPermission('Reply to item', context) print perm add, context.portal_membership.checkPermission('Add portal content', context) print perm modify, context.portal_membership.checkPermission('Modify portal content', context) print discuss, context.portal_discussion.isDiscussionAllowedFor(context) return printed hth, kapil Thanks, Kapil. I'll give it a try. I have a feeling I may be wasting my time anyway, as I don't see any way to have the dynamic roles be applied for catalog queries. In other words, if I have object A and object B in the same folder, and user1 can access object A but not B based on the external condition, user1 should see A but not B in a folder listing, search, navigation, etc. Is there amy way at all to implement this functionality? Thanks again, Stan ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
[Zope-PAS] Re: struggling with Local Role plugin
a quick way to check this and roles in general, is put together a python script that shows the users roles and permissions in context, as a quick example, here's one i use on occassion (check_roles).. and just invoke by in the url after the context, by appending check_roles. member = context.portal_membership.getAuthenticatedMember() print uid, member.getId() print email, member.getProperty('fullname'), member.getProperty('email') print groups, member.getGroups() print roles context, member.getRolesInContext( context ) print perm reply, context.portal_membership.checkPermission('Reply to item', context) print perm add, context.portal_membership.checkPermission('Add portal content', context) print perm modify, context.portal_membership.checkPermission('Modify portal content', context) print discuss, context.portal_discussion.isDiscussionAllowedFor(context) return printed hth, kapil Kapil, I'm close. My goal is to make objects inaccessible if the user doesn't have the correct dynamic permission. So for objects that the user can't see, they have no view permission. For objects that they can see, the user gets a role called DYNAMIC with the view and access contents information permission. Using your script, I see the following: roles context ['Member', 'Authenticated', 'DYNAMIC'] access contents 1 view 1 But if I add the following line to your script: print title, context.Title() Verbose Security reports the following: Access to 'Creator' denied ... Access requires one of the following roles: ['DYNAMIC', 'Manager', 'Owner', 'Reviewer']. Your roles in this context are ['Authenticated', 'Member']. What am I missing? Is there some other object that is being accessed, or is there some other permission other than 'View' and 'Access Contents Information' that needs to be given? Thanks very much for your help! ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope-PAS] Re: struggling with Local Role plugin
Previously Stan McFarland wrote: a quick way to check this and roles in general, is put together a python script that shows the users roles and permissions in context, as a quick example, here's one i use on occassion (check_roles).. and just invoke by in the url after the context, by appending check_roles. member = context.portal_membership.getAuthenticatedMember() print uid, member.getId() print email, member.getProperty('fullname'), member.getProperty('email') print groups, member.getGroups() print roles context, member.getRolesInContext( context ) print perm reply, context.portal_membership.checkPermission('Reply to item', context) print perm add, context.portal_membership.checkPermission('Add portal content', context) print perm modify, context.portal_membership.checkPermission('Modify portal content', context) print discuss, context.portal_discussion.isDiscussionAllowedFor(context) return printed hth, kapil Thanks, Kapil. I'll give it a try. I have a feeling I may be wasting my time anyway, as I don't see any way to have the dynamic roles be applied for catalog queries. In other words, if I have object A and object B in the same folder, and user1 can access object A but not B based on the external condition, user1 should see A but not B in a folder listing, search, navigation, etc. Is there amy way at all to implement this functionality? Use a dynamic group. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
[Zope-PAS] Re: struggling with Local Role plugin
Wichert Akkerman [EMAIL PROTECTED] writes: Use a dynamic group. Wichert. Wichert, Thanks for the response. I can see where there's some similarity in the notion of adding a role to a user dynamically and adding a user to a group dynamically, assuming that the group has the requisite roles. But my problem (and maybe I wasn't clear about this before) is that the condition that determines access is based on both an external condition and an attribute of the object itself, which is why was trying to make this work with local roles. I didn't think that the object was available from the role or group plugins, but if I'm wrong, please let me know. Actually, maybe I should rephrase my problem, and see if you have a suggestion. Basically, I need to set up a security model such that access to a given object requires a combination of roles. For example, I might have an object that would be labeled Alpha, Beta, Gamma, and a user must possess, at a minimum, all three roles to be able to see the object. I could implement this with 2**n - 1 roles, so I would have 7 roles and a separate workflow state for each role - not too bad. The problem is one of scale - if I have 6 labels, I end up with 63 workflow states. So instead, I was trying to use the labels as object attributes and adding roles at runtime. Does this make sense? Any advice you could give would be greatly appreciated. Thanks again, Stan ___ Zope-PAS mailing list Zope-PAS@zope.org http://mail.zope.org/mailman/listinfo/zope-pas
Re: [Zope] Simple ZODB Search and Edit
(Tue, Apr 10, 2007 at 11:01:39AM +0200) Peppe Top wrote/schrieb/egrapse: I'm new to Zope and I'm reading through a few tutorials and the Zope book. I need to do a text string search on a ZODB and I need to know which objects contain the string. Example: I have a site running up, and I need to know where my mail is mentioned, so I can edit each object and update the mail. (I think using ZMI) Go to the Root Folder in the ZMI, click on the Find tab. Enter whatever data you have and click on Find. From the documentation I think that ZCatalog might do the trick, but I'm not sure it's the easier solution. Am I on the right path? I don't think so, but it largely depends on what you are really trying to do. Can you get me started? To get started please read: http://wiki.zope.org/zope2/ZopeStarter If you want to build your own application with Zope, you should build your own products that will hold the presentation and business logic. The instances of those products will be stored in the ZODB and those will contain the content of your application. As someone else already mentioned you can make your content searchable with very little work, by using a ZCatalog and a minimal amount of extra code in your products. I just need a fixed string search, returning the name (maybe the path too) of the object inside the ZODB, so I can later edit. Is ZMI the right tool to do simple editing? No. The ZMI is an administrative interface. It's not meant to build end user interfaces upon it. Also is ZCatalog already included in Zope, or do I need to install it? Sure it's in there. You can see it as ZCatalog from the ZMI Add menu in the upper right corner. Another thought: *If* you are trying to build a content management system, maybe you should consider starting out with one of the existing ones that run on Zope? Configuring / extending that to your needs? They usually come with full text search out of the box - and they already know how to handle all those little pitfalls you will encounter. Regards, Sascha ___ 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] VirtualHostBase VHM keyword doesn't work.
You are missing the [P] in your rewrite rule. Please follow How-tos to the letter. ;-) Stefan On 11. Apr 2007, at 06:23, Mark, Jonathan (Integic) wrote: VirtualHost *:80 RewriteEngine on DocumentRoot /var/www Servername goodbyeken.com RewriteRule /(.*) http://goodbyeken.com:8080/VirtualHostBase/ http/www.goodbyeken.com:80/goodbyeken.com/VirtualHostRoot/$1 /VirtualHost -- It doesn't necessarily do it in chronological order, though. --Douglas Adams ___ 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] manipulating zodb from independent database connection
On 11. Apr 2007, at 07:19, Tim Nash wrote: I'm using zope 2.5 (matches a book I like) and doing like so: This is a *very* old release (5 years?). from ZODB import FileStorage, DB storage = FileStorage.FileStorage('Data.fs') db = DB(storage) connection = db.open() root = connection.root() Also, can the ZODB be altered this way on a running Zope instance? I would like to have a script run on cron and insert objects and remove objects from the ZODB while the zope instance application is running. I'd like these newly inserted objects to be Zpublishable as well. To access the ZODB from separate processes you have to run ZEO. Stefan -- It doesn't necessarily do it in chronological order, though. --Douglas Adams ___ 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] Z Search Interface returns numbers
When I search something in the SearchForm (via the test tab) I just get numbers. I mean the ReportForm correctly reports the objects containing the searched string, but lists handles (I guess). You missed a step: you must use the Metadata tab of the ZCatalog to define which fields of the indexed objects should be returned with the results from the search. After you do that, you'll have to update the catalog (Advanced tab) and then regenerate your search interface. For instance, to return the ids of the objects, add id as a metadata. If you'd like to show the URL of each item, there is no need to set metadata for that, since the records returned form the catalog have a method called getUrl which gives you that. So you can use record/getUrl, where record is the variable name used in the tal:repeat statement which invokes the catalog search results. Thanks a lot, it works! I ended up using getURL metadata, because it's simplier for me. Again thanks for your support. -- Peppe ___ 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] Access to list items with path expression
Garito wrote: Hi! Is there any way to access to some list index with TALES expression? I would like to use something like here/list/0 or here/list/int:0 Is this possible? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito Hi Garito, Try something like: tal:content=python: context.list[0] or you can always call a python script that returns the desired value. David H ___ 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 with using versions.
I'm running 2.6.2. What's the most recent stable release? 2.10.3? I hate to say this, but my Zope knowledge is very limited. I'm really only using it because it's what my predecessor used to build the web site in the first place, and she's not a whole lot of help now. I went here (http://wiki.zope.org/ZODB/FileStorageBackup) to read up on backups, but I'm afraid it doesn't make a whole lot of sense to me. - Catherine E. Reinehr Webmaster Publications Designer Huntingdon College 1500 E. Fairview Ave. Montgomery, AL 36106 (334) 833-4429 / Flowers 103 -Original Message- From: Tino Wildenhain [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 10:51 PM To: Catherine E. Reinehr Cc: zope@zope.org Subject: Re: [Zope] Problem with using versions. The built in version handling was deprecated long ago for exactly these problems. Which Zope version are you using? - back up your Data.fs(s) - export your structure as it is (better do this per root element) - undo your last steps (this is optional in case you cannot see important parts due to version lock) and export these objects as well - stop zope/zeo and delete Data.fs(s), restart it and create your site again using your above exports. - do not use zope versions anymore. if your zope is old, try to upgrade while you are working on it. In this case, you can skip step 4. HTH 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] Simple ZODB Search and Edit
Example: I have a site running up, and I need to know where my mail is mentioned, so I can edit each object and update the mail. (I think using ZMI) Go to the Root Folder in the ZMI, click on the Find tab. Enter whatever data you have and click on Find. Yeah, that works, but I need to search the SearchableText property, and the Find tool doesn't report all the results I need. However, you all have helped me a lot, and now I have a correctly working ZCatalog, searching the whole site, and returning the path of the objects :-) To get started please read: http://wiki.zope.org/zope2/ZopeStarter If you want to build your own application with Zope, you should build your own products that will hold the presentation and business logic. The instances of those products will be stored in the ZODB and those will contain the content of your application. As someone else already mentioned you can make your content searchable with very little work, by using a ZCatalog and a minimal amount of extra code in your products. I didn't know about the wiki, very useful. Is ZMI the right tool to do simple editing? No. The ZMI is an administrative interface. It's not meant to build end user interfaces upon it. OK, see below. Another thought: *If* you are trying to build a content management system, maybe you should consider starting out with one of the existing ones that run on Zope? Configuring / extending that to your needs? They usually come with full text search out of the box - and they already know how to handle all those little pitfalls you will encounter. You are dead right, I'm digging into Plone too, right now. Thanks Sascha, and all the list, you helped me big time. -- Peppe ___ 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] xmlrpc error handling
In order to avoid zodb implosion, is it sufficient to raise an xmlrpclib Fault object from a method where some validation was not successful? Will zope abort transactions and avoid an other avoidable bad things from happening? Do I have to use fault or can I raise just any error an ZPublisher.xmlrpc will marshall it into fault/fault? from xmlrpclib import Fault SomeClass(SimpleItem): ... def myMethod(self,stuff=[]): if type(stuff) != list: f=Fault f(27,stuff must be a list) raise f else: print stuff Thanks, Kevin ___ 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 with using versions.
On Wed, Apr 11, 2007 at 09:00:12AM -0500, Catherine E. Reinehr wrote: I'm running 2.6.2. What's the most recent stable release? 2.10.3? Yes, but the Version feature was removed after zope 2.7. From the changelog for zope 2.8: * Removed Version objects from the add menu. Versions are agreed to be a feature that should not be used as it is not well implemented and allows for data loss. I hate to say this, but my Zope knowledge is very limited. I'm really only using it because it's what my predecessor used to build the web site in the first place, and she's not a whole lot of help now. That's never a fun situation to be in with any technology... if your budget affords it, it might be cost effective to bring in a consultant for a short time to explore your predecessor's system and get you up to speed on it. To learn about versions, read this: http://www.plope.com/Books/2_7Edition/ZopeServices.stx#1-3 especially note the Caveat: Versions and ZCatalog which might be related to your problems (just guessing... we don't know if you're using a ZCatalog). I went here (http://wiki.zope.org/ZODB/FileStorageBackup) to read up on backups, but I'm afraid it doesn't make a whole lot of sense to me. We can't guess which parts don't make sense to you :) Maybe come back with more specific questions here or on IRC? The #zope channel on irc.freenode.net is often quiet, but there's a lot of knowledgable zope people in #plone and that channel is more active. -- 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 )
Re: [Zope] xmlrpc error handling
On Wed, Apr 11, 2007 at 01:38:21PM -0400, Kevin wrote: In order to avoid zodb implosion, is it sufficient to raise an xmlrpclib Fault object from a method where some validation was not successful? yes. Will zope abort transactions yes. and avoid an other avoidable bad things from happening? as long as your application is designed well with regard to transaction boundaries, you'll be fine. Inconsistencies could arise if your app does something weird like manually commit a transaction and start a new one before the exception is raised... Do I have to use fault or can I raise just any error an ZPublisher.xmlrpc will marshall it into fault/fault? The latter. Try it and see :) AFAICT any uncaught exception will be published as an xmlrpc fault. But then I think you don't have control of the fault code, if you care about that. -- 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 )
Re: [Zope] [Ann] analyseObjects: analyse live objects
Halle Marco, Marco Bizzarri wrote at 2007-4-10 21:41 +0200: ... am I missing something, or the code is not on the web? I tried and it was there... -- Dieter ___ 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 with using versions.
Catherine E. Reinehr wrote at 2007-4-10 20:01 -0500: I've been working in a version for over a week and finally finished my changes today. I saved them and quit the version, but the affected folder still has a lock on it. I've tried four times now to save my changes, and it's just not working. The first time, it seemed to publish the changes but the folder was still locked. On later tries, I encounter an error when I try to access the page after saving changes. Any suggestions? When the ZODB 3.2 code has been restructured (previously, it was tense and efficient but very difficult to read) some bad bugs have been introduced affecting the Version handling. Maybe, you are using such a ZODB version. In this case, searching old mailing list article may come up with some information on how to fix your problem. -- Dieter ___ 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 with using versions.
Okay. I'll see about upgrading to 2.10.3 and check out that web site to read up on versions. I think what I may need to do is just recreate my changes outside of the version, which of course will take longer, but at least I won't risk losing anything. I had no idea versions were so buggy; I wouldn't have used them in the first place if I had. :/ Thanks, all, for the help; I really appreciate it! Cathy - Catherine E. Reinehr Webmaster Publications Designer Huntingdon College 1500 E. Fairview Ave. Montgomery, AL 36106 (334) 833-4429 / Flowers 103 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Winkler Sent: Wednesday, April 11, 2007 1:07 PM To: zope@zope.org Subject: Re: [Zope] Problem with using versions. On Wed, Apr 11, 2007 at 09:00:12AM -0500, Catherine E. Reinehr wrote: I'm running 2.6.2. What's the most recent stable release? 2.10.3? Yes, but the Version feature was removed after zope 2.7. From the changelog for zope 2.8: * Removed Version objects from the add menu. Versions are agreed to be a feature that should not be used as it is not well implemented and allows for data loss. I hate to say this, but my Zope knowledge is very limited. I'm really only using it because it's what my predecessor used to build the web site in the first place, and she's not a whole lot of help now. That's never a fun situation to be in with any technology... if your budget affords it, it might be cost effective to bring in a consultant for a short time to explore your predecessor's system and get you up to speed on it. To learn about versions, read this: http://www.plope.com/Books/2_7Edition/ZopeServices.stx#1-3 especially note the Caveat: Versions and ZCatalog which might be related to your problems (just guessing... we don't know if you're using a ZCatalog). I went here (http://wiki.zope.org/ZODB/FileStorageBackup) to read up on backups, but I'm afraid it doesn't make a whole lot of sense to me. We can't guess which parts don't make sense to you :) Maybe come back with more specific questions here or on IRC? The #zope channel on irc.freenode.net is often quiet, but there's a lot of knowledgable zope people in #plone and that channel is more active. -- 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 )
Re: [Zope] [Ann] analyseObjects: analyse live objects
On 4/11/07, Dieter Maurer [EMAIL PROTECTED] wrote: Halle Marco, Marco Bizzarri wrote at 2007-4-10 21:41 +0200: ... am I missing something, or the code is not on the web? I tried and it was there... My apologies: yesterday I was unable to find it. Next time I will ask someone to check for me before sending to the ML. (BTW: thanks for analyseObjects :-) ) -- Marco Bizzarri http://iliveinpisa.blogspot.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 )
Re: [Zope] Problem with using versions.
On Wed, Apr 11, 2007 at 01:53:42PM -0500, Catherine E. Reinehr wrote: I had no idea versions were so buggy; I wouldn't have used them in the first place if I had. :/ Not your fault, all the old documentation encourages people to use them :( -- 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] RE: VirtualHostBase VHM keyword doesn't work
Thanks to everyone who helped me set up Zope 2.9 behind Apache 2.2. I copied the rewrite rule that Hara Dilley provided and everything worked: RewriteRule ^/(.*) \ http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/myVHM/VirtualHostRoot/$1 [L,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 )