[Zope-dev] ZCatalog Bug?
The bug collector doesn't appear to be working, so I apologize if this issue has already been raised. ZCatalog is failing for me when I attempt to reindex the catalog after adding a keyword index. Zope complains of a name error for Except on line 118 of UnKeywordIndex.py. Here's the code in question: # First we need to see if there's anything interesting to look at # self.id is the name of the index, which is also the name of the # attribute we're interested in. If the attribute is callable, # we'll do so. try: newKeywords = getattr(obj, self.id) if callable(newKeywords): newKeywords = newKeywords() except Except: # Line 118 newKeywords = MV Could the author have meant to write 'Exception' here instead of 'Except'? I am running Zope 2.3.0 stable. -- Ed Goppelt ___ 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] Adding ZClass Instances via Python
Ok, I know there's a howto with a working solution to this problem, but this is *still* killing me: How does one add a ZClass Instance in a way analagous to adding, say, a DTML Document in a Python script? With the dtml document, it's easy: container.manage_addProduct['OFSP'].addDTMLDocument('anid', 'atitle','a file') I've tried the following, which don't work, as well as a variety of permutations and combinations involving container context. constructor.Bill_add(None, context) constructor.Bill_add(container, cons, REQUEST) # Is this how one sets the REQUEST variable from a script? Can the # REQUEST variable be set from any valid Zope object, e.g,: # Anywhere.Anyobject.REQUEST.set('dfkjd', 123) will change the # variable dfkjd in the REQUEST object? container.REQUEST.set('id', '9389483484') container.REQUEST.set('title', 'a title') constructor=container.manage_addProduct['Bill'] The problem seems to have something to do with the getting the contexts right and getting the REQUEST info. passed to the constructor, but I'm just guessing at this point. Bill_add is the standard dtml method constructor created by the ZClass product. -- Ed Goppelt ___ 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] Bizarre Version Behavior
I'm worried that versioning is not working properly on my Zope 2.3.0 web site. Since my site is due to receive some major publicity, the flakiness of versioning worries me a good deal. I'm hoping some of the more experienced developers can advise me on whether I should continue to use versioning and/or whether I have a corrupt ZODB. What has been your experience with Versions? Is this a reliable feature of Zope? Here's what happened: I recently committed a Version to the ZODB, but Zope showed many of the objects as still having uncommitted changes (the red diamond). Further, Zope showed many items as having changed that I know for a fact I did not edit (mainly Python scripts). Worst of all, the site became inaccessible to users, with Zope responding to page requests with a VersionLockError. Thankfully, Zope seems to have committed the changes after I saved the Version changes a *second* time, but the fact that Zope got so confused about what had changed makes me reluctant to use versioning in the future. -- Ed Goppelt ___ 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] Are Versions Reliable?
On Sun, Mar 25, 2001 at 12:09:10PM +0100, Chris Withers wrote: 1. When people using your site don't need to write to the ZODB to use the site (it sounds like they do in your case) The users themselves do not write, but periodically an External Method receives email via xml and parses it into a bunch of new Zope objects. Would this cause trouble with Versions? 2. You don't use mounted storages. In particular, Core Session Tracking and Version objects seem to have quite a bad time of it when played with together, but it's understandable when you think about how CST works. I'm not sure I understand what you mean by mounted storage. The site makes use of LocalFS--is this the kind of thing you are talking about? I find versions are generally useful when updating brochurewear (DTML Methods and Dcouments) but are limited elsewhere. It's a shame you can't use them with WebDAV (guessing here, somebody tell me I'm wrong ;-) or FTP without major hackory :-S I'm curious how Versions failed for you when using mounted storage, etc. Were you unable to roll back changes? Were changes you made lost? Was your database corrupted? -- Ed Goppelt ___ 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] Homegrown vs. Storebought
I'd like to add two capabilities to my city government web site: 1. users should be able to initiate discussions about legislation pending before our City Council. i.e., discussions will be tied to the relevant bill document. 2. users must register in order to post. I'd like enough information so that if someone posts death threats or the like they can be tracked down. I don't need threaded discussions (though that would be nice) so I'm tempted just to roll my own. Is there anything out there in the way of easy to use discussion Products that I could pop in to my site without buying into a gigantic set of associated machinery a la CMF? As far as enforcing some minimal accountability on the part of posters, the Membership product seems like my best bet, though there are some things I'd like to change, e.g., I'd like user info stored in a SQL db, not Zope, passwords should not be encrypted 'cause I want to send them out every month, and I want different info. stored about users than the default properties provided by the Product. How hard do you think this would be with Membership? Are there any other Products I should consider IYO? Thanks! -- Ed Goppelt ___ 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] Possible ZCatalog Bug
A ZCatalog when passed an empty mapping of search terms returns no records found in Zope 2.3.1, instead of all records. This is not the way I remember ZCatalog working in previous versions of Zope. Is this a bug? Too, can someone clue me in on the proper place to look for bugs in Zope before posting an email like this one? I really hate to take up people's time raising known bugs. Maybe I just don't know how to use it, but the bug collector seems to be out of date or broken or both. -- Ed Goppelt ___ 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] Possible ZCatalog Bug
On Thu, Apr 05, 2001 at 12:02:31PM -0400, Chris McDonough wrote: I tried this in the most recent 2.3 branch: dtml-var "catalog({})" And it returned all objects. Are you sure the mapping is empty? Yep, though I am passing in some other parameters. Here's the dtml code that failed: dtml-in "email.emailcatalog(cleanrequest(), sort_on='date', sort_order='descending')" size=20 start=query_start My recollection is that this worked fine under 2.3.0, but I could be wrong about this. -- Ed Goppelt ___ 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] Possible ZCatalog Bug
On Thu, Apr 05, 2001 at 05:31:23PM -0400, Chris McDonough wrote: What does "cleanrequest" return? It removes null strings from the REQUEST variable. But I substituted the empty mapping {} and got the same anomolous behavior. -- Ed Goppelt ___ 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 )