[Zope-dev] External method
This is not a strictly zope related question but it is zopeish :) In an external method I need to call an executable and capture the output it generates. This executable however needs to connect to a running X Server. I used the popen2 command but it returns with the obvious error : "theprogram : cannot connect to X Server". So how does one tell a program to attach to a X server? Any help would truly delight me Roché ___ 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] 'Subclassing' another product
I think I read somewhere that it was, from version 2.2 of Zope, possible to 'subclass' products. Is this just somebody janking my chain, or is it actually possible? If it is possible, would someone care to explain? Thanks. -Morten ___ 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] Loginmanager and local roles
[Morten W. Petersen] | Any suggestions? Found the problem. There needs to be a method called user_names in the acl_users folder, which returns all the user ids: """ paramsself/params user_ids = self.UserSource.getPersistentItemIDs() user_ids2 = [] for id in user_ids: user_ids2.append(id) return user_ids2 """ (Can't understand why I had to use an additional list though). Cheers. -Morten ___ 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] SQLAlias Memory Leak?
The leaking SQLAlias I see is coming from: Shared.DC.ZRDB.Results I'm going to try the same type of fix in there and see what happens. -jon "Brian Lloyd" [EMAIL PROTECTED] writes: oops - I sent that before I had my coffee. I should have attached the checkin version, not the broken one :) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] A groupware package for zope
[Magnus Heino] | I'd appreciate to be able to download some code from zope.org :-) Uhmm. Yeah. http://www.zope.org/Members/morphex/ZopeGUM -- guess you don't know about the /Product and search facilities.. ;) Cheers, Morten ___ 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] regex (or re) modules
Does anybody know why these modules aren't available for DTML and Python Methods? (I already hacked my server, just wanna know what I'm riskin) Thanks, Tim ___ 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] regex (or re) modules
Because both are quite capable of crashing a thread (maybe the whole thing), with poorly written regex expressions. Creating infinate loops is easier than you think, esp if your regex requires backtracking to "solve". Perhaps there should be a simplified regex engine available, that I don't know. Chris -- | Christopher Petrilli | [EMAIL PROTECTED] - Original Message - From: "Tim McLaughlin" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 19, 2000 2:35 PM Subject: [Zope-dev] regex (or re) modules Does anybody know why these modules aren't available for DTML and Python Methods? (I already hacked my server, just wanna know what I'm riskin) ___ 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] Performance enhancements, ZCatalog
ZCatalog enthusiasts, I just upgraded our zope installation from 2.1.6 to 2.2.4, and the ZCatalog performance is aweful. Can someone remind me what the command for speeding up python on a dual processor machine is? python -T? I'm looking for any way to speed this up. I have a text index with 47,000 objects and a search takes about 15-18 seconds, hardly what we were used to. It used to be 2 second tops. My company is being shopped around and if we get bought I want to convince the new company that Zope and python and Linux are the way to go. I need all the help I can get. All my best, Jason Spisak CIO __ ___ ____ / // (_)_/_ __/__ / / ___ ___ __ _ / _ / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/ ' \ /_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/ 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] Preliminary test of Membership on CVS
Michael Bernstein wrote: Bill Anderson wrote: On a related note, I am considering changing the python methods to Python Scripts, this way when 2.3 comes out, it drops the number of additional installs required by one, leaving Loginmanager and ZPatterns the only (current) requirements. Python Scripts eem much better to use than Python Methods anyway ;) Any thoughts on that from the community? Bill, The move to Python Scripts sounds like a good one. Thanks, I think it is agood one. I wonder if Python Scripts will be officially 'supported', or at least an install documented for 2.2.x? Relying on Python Scripts makes it 2.3 dependant, otherwise. BTW, Can you fold in my local roles changes, and create an Could you resend that to me? additional Type of User Source for use with SMB? I'll contribute the code that I've got. Probably won't do another Usersource for the nearing-release 1.0 version, but if you have one, I may put it in 1.x, and can provide it as a file to DL from the site. I'm working right now on policy objects, zopehelp Documantation, and code cleanup. I was going to do PTK Integration, but don't have the time to recreate the work others didn't share. ;) ___ 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] [Zope-dev] [BUG] Background processes interfere with Zope's HTTP responses
Today was again a hard Zope day. Did you ever hear, that usually (i.e. if you do not do special things) Zope renders a complete page before it starts sending the result back to the client. This implies that you should never see only half of a page. I heard it and I saw the code that does it. Therefore, I was convinced that this were really the case. Then our client phoned: He visits a page that allows him to generate a newsletter. When he presses the "generate newsletter button", a result page is build that tells him that the newsletter is being generated and send is a few minutes. He reported, that this response page is build only half, then stops, to be completed only half a minute later, at the same time when the newsletter arrives. The effect is reproducible. If newsletter generation takes longer, he must wait longer for the page to complete. He is convinced that we generate the newsletter synchronously and let him wait until the generation is complete. And he is angry. I know, that the newsletter is generated in a background process, started in an external method with: os.system("gen_newsletter ") I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! What happened? The background process inherits Zope's open file descriptors. Among them are all currently open HTTP request sockets. The process keeps these sockets open until it finishes. There are two HTTP modes: 1. single request mode a new TCP connection is created for each HTTP request, the request is completed, when the TCP connection is closed. 2. multi request mode several requests share a single TCP connection. The "Content-Length" HTTP header allows client and server to determine the request boundaries. That means: when a client uses the multi request mode, everything is fine. Clients, however, that use the single request mode wait until their connection is closed and can observe serious delays. These delays may be very difficult to explain, as the background process not only delays its own request but may delay arbitrary other requests that happen to be served at the same time. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter ___ 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 ) From [EMAIL PROTECTED] Tue Dec 19 20:13:04 2000 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 19892 invoked from network); 19 Dec 2000 20:13:04 - Received: from unknown (HELO dark.darkweb.com) (unknown) by unknown with SMTP; 19 Dec 2000 20:13:04 - Received: (from garthh@localhost) by dark.darkweb.com (8.9.3/8.9.3) id MAA21887 for [EMAIL PROTECTED]; Tue, 19 Dec 2000 12:09:49 -0800 Date: Tue, 19 Dec 2000 12:09:49 -0800 From: Garth Hitchens [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: testing From [EMAIL PROTECTED] Tue Dec 19 20:15:10 2000 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 19940 invoked from network); 19 Dec 2000 20:15:04 - Received: from unknown (HELO contesting.com) (unknown) by unknown with SMTP; 19 Dec 2000 20:15:04 - Received: from notebook ([216.1.129.5]) by contesting.com (8.11.0/8.11.0) with SMTP id eBJJOl911660; Tue, 19 Dec 2000 14:24:52 -0500 (EST) From: "Bill Fisher" [EMAIL PROTECTED] To: "Garth Hitchens" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], "Randy Thompson" [EMAIL PROTECTED] Subject: PR Progress as of today Date: Tue, 19 Dec 2000 14:23:05 -0500 Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_NextPart_000_00FB_01C069C7.33BDF7B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal This is a multi-part message in MIME
[Zope-dev] POST METHOD
Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Thanks so much !!! anderson ___ 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] Re: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
He reported, that this response page is build only half, then stops, to be completed only half a minute later, Depending on how long the page is I never see the bottom. When I use the products page I have to refresh 2-3 times to see the bottom part. This is thru a proxy only. I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! I'm having this same sort of problem w/Zope 2.3a1. I just started trying to use Zope through a proxy. If I work directly on the machine I have no problems. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. -Jimbo ___ 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] RE: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. Note that what Dieter is talking about would only affect you if you were spawning an external process that inherited the filehandles of the zope process. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] A groupware package for zope
For the last couple of months I've been working on a groupware package for Zope, named ZopeGUM. It has reached version 0.1.63 now, and it's in steady progress. All the planned components, like messenger, address book, calendar, todos, etc. are there and working now; though it's definently not ready for a production enviroment yet. Anyways, just wanted to let you all know. (And yes, I do appreciate feedback. =) -Morten ___ 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] Re: [Zope] POST METHOD
On Tue, Dec 19, 2000 at 06:44:35PM -0200, Anderson Ami wrote: Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Some older browsers have a limit to the amount of data they send in a request, usually around 64k. On the other hand, you may want to examine what is actually in the REQUEST object. You can view the contents by including the REQUEST object in your page: dtml-var REQUEST -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ - ___ 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] 'Subclassing' another product
Hi Morten, There are two ways to subclass products. You can use straightforward Python subclassing: e.g.,In your custom Product.. here is an example from Zwiff: import Products.PythonMethod.Guarded from Globals import HTMLFile, MessageDialog from App import Common manage_addZwiffForm = HTMLFile('addForm',globals()) def manage_addZwiff(self, id, title, params, body, REQUEST=None): """Add A Zwiff to a folder just like PythonMethod.. """ it = Zwiff(id, title, params, body) self._setObject(id, it) return self.manage_main(self, REQUEST) def handleMovieOutput(movie, RESPONSE): fname = tempfile.mktemp() movie.save(fname) f = open(fname) s = f.read() f.close() RESPONSE.setHeader('Content-type', 'application/x-shockwave-flash') os.remove(fname) return s class Zwiff (Products.PythonMethod.PythonMethod.PythonMethod ): meta_type = 'Zwiff' def makeFunction(self, compile=0): from Products.PythonMethod.Guarded import GuardedBlock, safefuncs, theGuard if compile: self._checkCBlock(GuardedBlock) if self.errors: raise "Python Method Error", string.join(self.errors, '\n') return self._newfun(compile, {'$guard': theGuard}, __builtins__=mysafebin, _=safefuncs) So the class Zwiff is a subclass of PythonMethod. Look at Zwiff for the full source: http://www.zope.org/Members/sspickle/Zwiff Or you can create a ZClass that subclasses from a 'base class'. To do this you've got to register the base class with the ZClass machinery (e.g., here is the code for ZCVSMixin that does this ZCVSMixin is a base class... CVSFolder is a full blown product that happens to be a subclass of ZCVSMixin... ) import ZCVSMixin import CVSFolder __doc__ = ZCVSMixin.__doc__ __version__ = ZCVSMixin.__version__ def initialize(context): context.registerClass( CVSFolder.CVSFolder, constructors=(CVSFolder.manage_addCVSFolderForm, CVSFolder.manage_addCVSFolder), icon='fish.gif', ) context.registerBaseClass(ZCVSMixin.ZCVSMixin) does that help? take care, -steve ___ 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] Newbie question: adding a tinyTables objec
If a product contains only a Help object, it means that the product is a Python Product, rather than a ZClass Product. No broken box in front of the Product name, hmm... Does Zope raise any errors when you try to start it? Try to remove the whole TinyTable folder and reinstall it again after having had a second look in the INSTALL or README docs. If there are any. Don't give up my friend! No, that's the problem. The icon isn't a broken box, but a regular product icon. Clicking on the link shows that there's one item in TinyTablesPlus, a Help document; when I open that, it tells me that there are no items in TinyTablesPlus. So Zope seems to be seeing the product, but not adding a TinyTable to the list of Available Objects. Is there some setting that I need to change? Sorry to be so dense. It's tantalizing to have all this power so close at hand, and not be able to access it. Richard At 10:25 PM + 12/18/00, Peter Bengtsson wrote: Go to the Control Panel and click on Products. The TinyTable product is probably going to have a little "broken box"-icon. Click on it and wish that it will tell you the error so that you can fix it. Good luck, Peter I'm running Zope on a Win98 machine; downloaded, unstuffed, and installed tinyTablesPlus folder in the lib\python\Products directory. TinyTablesPlus shows up in the product list of the Control_Panel/Products folder of my Zope installation. But it does not show up in the Available Objects pull-down menu in my Zope content folders. I can't figure out how to Add a TinyTables object. Can anyone help? Richard ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Weired catalog_object problem in python product
Hi, I read about ZCatalog been _the_ method of managing and searching objects in the ZODB. So I decieded to do searches and lists of object using ZCatalog. After reading all how-to's/API-doc about ZCatalog, a lot in mailings lists and studying a lots of code (ZDiscussions, Squishdot, PTK) I tried to use ZCatalog the proper way. But there is one problem I could not solve for about 8 hours of work. A short description of what my code does: I have three classes (NewsManager, NewsItem and ContentFolder) caring about news items. If I am creating a news item, it's object gets saved and cataloged in the content folder (the content inherits from ZCatalog). The NewsManager object responsible about creating the news item is named news and resides in the same directory as the folderish content object does. So the directory structure is: /orgname/content (content object, inherits from Products.ZCatalog) /orgname/news(NewsManager object, inherits from OSF.Folder) Now the problem (for a step by step description see below): The news items are correctly created in the content folder. But the item is cataloged as it would reside in xxx/news/content (which does not exist). I use self.absolute_url(relative=1) (called by __uniqueCatalogId()) to generate the catalog id (see manage_afterAdd below). It seems (for me) that some aquisition magic is going on. Later when I edit the news item (manage_editNewsItem called by manage_editNewsItemForm) there appears an additional catalog entry with the id xxx/content. Now there are two catalog entries for one news item. If I delete the news item manualy using the zope management GUI one of these catalog entries will be deleted only. Hints: 1) The following status message appears in zopes error log after having edited /orgname/news/content/20001219_news22: 2000-12-19T11:10:41 ERROR(200) Catalog uncatalogObject unsuccessfully attempted to uncatalog an object with a uid of /orgname/content/20001219_news22. 2) It seems for me that the magic resides in absolute_url(). Does somebody know about a solution of this problem or have an additional hint about generating catalog id's (it's a requirement for me to have the /orgname/-info in the catalog id!)? I'am a Zope newby, so forgive me errors that are obvious. System and SW-Versions: - WinNT4 SP6 US - Zope 2.2.4 started manualy Remark: It's all programmed in Python because I don't like GUI programming tools (click, click, ... :-( ). So I implement all logic in python (as a Product). what I've done in the zope management GUI Create a news item: http://localhost:8080/up/news/manage_addNewsItemForm View Contents (content folder): http://localhost:8080/up/content/manage_main -- item 20001219_news22 is listed and links to: -- item 20001219_news22 is listed and links to: http://localhost:8080/up/content/20001219_news22/manage_editNewsItemForm View Cataloged Objects (content folder): http://localhost:8080/up/content/manage_catalogView -- content contains 1 record(s). NewsItem /up/news/content/20001219_news22 (test item) ??? why catalogized with path containing /news/? Edit the item by clicking the link in Cataloged Objects: Edit the item by clicking the link in Cataloged Objects: http://localhost:8080/up/news/content/20001219_news22/manage_editNewsIte mForm View Catalog Objects: http://localhost:8080/up/content/manage_catalogView -- content contains 2 record(s). NewsItem /up/news/content/20001219_news22 (test item) NewsItem /up/content/20001219_news22 (test item edited) ??? why couldn't the old item be uncatalogized? ??? why the changed item is catalogized without /news/ path? !!! I think there is one answer to both questions! !!! Rem.: I'd like to have the items cataloged without /news/ in the path. remarks: 1) content is the folder containing all kind of items 2) content is also a ZCatalog folder containing a Vocabulary Code snippets #-- # NewsManager.py # # The only functionality of NewsManager is adding a new newsItem. It # builds a unique news item id and then calls the addNewsItem method of # NewsItem. #-- class NewsManager(OFS.Folder.Folder): # ... some code def __init__(self, parentFolder, contentFolder): self.contentFolder = contentFolder self.newsCounter = 0 return dbhelpers.instObject(self, parentFolder, "news") # ... unimportant another code manage_addNewsItemForm = NewsItem.manage_addNewsItemForm def manage_addNewsItem(self, title, abstract, location, generator, prio, date_syn,
Re: [Zope] ZCatalog raises index out of range exception error
On Saturday 16 December 2000, at 19 h 21, the keyboard of "Stefan H. Holek" [EMAIL PROTECTED] wrote: Do you have a SiteRoot-ed environment? I do. I believe I saw this error when trying to use the Catalog in a SiteRoot-ed folder... Me too :-( No solution, sorry ;) :-( ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Newbie question - Link between Methods based on Authorization
I am still newbie in Zope, so my question may be stupid - sorry. I have problem with access to method. Example - There are two methods: A and B. Method A contains common information, accessible for all user (include anonymous). Source code in method B updates data for method A and access for method B is restrict only for users with roles "AdminTables". There is a link from method A to method B in the code of script A, and this link is viewable for all user (also for anonym). After click on this link, user is asked for authentication. So there is no problem, but HOW MAKE THIS LINK VIEWABLE ONLY FOR USER WITH AUTORIZATION FOR OBJEKT B ??? Try http://zdp.zope.org/projects/zsnippet/snippets/DTMLContent/PermissionContent and zdp.zope.org in general. cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Editing Property Sheet HTML
The question is ... how do I do it? I'd like to make the default textarea field quite a bit bigger -- but I wasn't able to explore my way to success in the interface, and about 20 mins of seaching has yielded no answers. You could edit lib/python/OFS/properties.dtml, which renders the property management screen. The DTML in there has gotten pretty scary over time though :^) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] To retrieve properties from a dtml document
On Mon, Dec 18, 2000 at 09:10:54PM -0500, Ausum wrote: Hello Andy, thanks for the advice. It didn't work. Maybe I'm wrong at any point, so please tell me whether it worked for you. I'm aware that this problem has been discussed here before, that it happens because of Python's object naming, and also that there's a workaround at least (and just)for expressions, using _['whatever.html'] Due to the kind of workflow we have, we need all of the documents to be editable with Dreamweaver at any moment, directly, after the daily WGET process. Batch-replacing every "_html" with ".html" in file names and content seems to be very complicated within this scenario. Going from dreamweaver to Zope, if you are working on unix, batch replacing is EASY, a single find command to change the file names and a simple sed script (or python or perl) to change hrefs. You will need to write such a script anyway, if your servers are Unix or Linux and your Dreamweavers are Windows. You will find that your windows people mix filename case randomly and expect it to work; you will have to canonify all hrefs to a single case convention. If going from zope to dreamweaver, either write the corresponding _ to . scripts and batch it, or write a checkout external script that does it for you. I have not thought about this latter option very much, but the export facility should give you an example of how to do this. I doubt if it is much more than a day's reading and two days coding (and this is being damn generous, as I suspect that this is a ten line script). You still have given no cogent reason for using Zope. If you have only, or predominatly static content, you are paying a huge overhead penalty. If you have mixed static content and dynamic content, use apache and ProxyPass to front-end the dynamic content, and apache to serve the static content. Then you have no conversion worries at all on the static content. Jim ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] parameters
Hi everybody ! I'm trying to pass some parameters to a dtml method. It's something like dtml-var expr="template(menu, menu2)" written in a dtml document XPTO. template is a dtml method ! Question is : Is it possible to catch in a dtml method the parameters passed by dtml-var expr="template(menu, menu2)" ??? How can i catch menu and menu2 in the dtml method template ?? thanks in advance best regards, Nuno ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog raises index out of range exception error
I believe I saw this error when trying to use the Catalog in a SiteRoot-ed folder... Me too :-( And me too. The most irritating Zope bug for me. No solution, sorry ;) :-( Partial solution: at something like 2:00 AM delete your SiteRoot rule, reindex with ZCatalog and create this rule again. Searching works (although I needed to edit the paths found a bit in the form responsilbe for search results presentation). I can imagine writing the script (XMLRPC?) which would do it from the cron job - although I have not yet found spare time (I still think someone will do something with this nasty bug). -- http://www.mk.w.pl / Marcin.Kasperski | Dokumentacj kodu warto wygenerowa: @softax.com.pl | http://www.mk.w.pl/narzedzia/narzedzia_gendoc @bigfoot.com \ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Newbie question - Link between Methods based on Authorization
On Tue, 19 Dec 2000, Michal Krejza wrote: I have problem with access to method. Example - There are two methods: A and B. Method A contains common information, accessible for all user (include anonymous). Source code in method B updates data for method A and access for method B is restrict only for users with roles "AdminTables". There is a link from method A to method B in the code of script A, and this link is viewable for all user (also for anonym). After click on this link, user is asked for authentication. So there is no problem, but HOW MAKE THIS LINK VIEWABLE ONLY FOR USER WITH AUTORIZATION FOR OBJEKT B ??? Hello Michal, This may work: dtml-if "AUTHENTICATED_USER.has_role('AdminTables', this())" a href="/link/to/method/B"Method B/a /dtml-if -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ [EMAIL PROTECTED] | dtml-var pithy_quote | http://linux.com/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] parameters
Nuno Goncalves wrote: Hi everybody ! I'm trying to pass some parameters to a dtml method. It's something like dtml-var expr="template(menu, menu2)" written in a dtml document XPTO. template is a dtml method ! Question is : Is it possible to catch in a dtml method the parameters passed by dtml-var expr="template(menu, menu2)" ??? How can i catch menu and menu2 in the dtml method template ?? http://zdp.zope.org/projects/zsnippet/snippets/DTMLTags/CallingDTMLMethods HTH, -- Tim Cook, President -- Free Practice Management,Inc. | http://FreePM.com Office: (901) 884-4126 Censorship: The reaction of the ignorant to freedom. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Import/Export error
Hello, This is a question concerning the Import/Export of *.zexp files. I am new to Zope and experimented during the last month. The installation went smoothly and all the features worked smoothly. However at some point the Import stoped working. I thought there might be a conflict with one of the many products that I had installed. So I installed a completely new and clean Zope. However the problem persists. When trying to import a *.zexp file from the \Import\ directory: Zope Error Zope has encountered an error while publishing this resource. Error Type: Bad Request Error Value: File does not exist: G:\PROG_I~1\ZopeSite\import\ !-- Traceback (innermost last): File G:\PROG_I~1\ZopeSite\lib\python\ZPublisher\Publish.py, line 222, in publish_module File G:\PROG_I~1\ZopeSite\lib\python\ZPublisher\Publish.py, line 187, in publish File G:\PROG_I~1\ZopeSite\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File G:\PROG_I~1\ZopeSite\lib\python\ZPublisher\Publish.py, line 171, in publish File G:\PROG_I~1\ZopeSite\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_importObject) File G:\PROG_I~1\ZopeSite\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_importObject) File G:\PROG_I~1\ZopeSite\lib\python\OFS\ObjectManager.py, line 528, in manage_importObject (Object: Traversable) Bad Request: (see above) -- This is my Zope: Zope version: Zope 2.2.4 (binary release, python 1.5.2, win32-x86) Python version: 1.5.2 (#0, Jul 30 1999, 09:52:18) [MSC 32 bit (Intel)] System Platform: win32 (WinNT SP5) I would appreciate any help since I have no clue as to what the problem might be. Thanks, Otto - Otto Pichlhoefer mailto:[EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [ZWeb] Feedback
Hi Martin, I moved this thread over to the Zope mailinglist; the Zope-Web mailinglist is intended for discussion related to the Zope.org website itself. You'll get more feedback on the Zope mailinglist. On Tue, Dec 19, 2000 at 05:41:34PM +0100, Edwin Martin wrote: The last couple of months I developed a dynamic website in Zope. You can take a look: http://www.joods.nl/, but be warned: it's Dutch. Cool, I always like to see more Dutch websites. I never really convinced my colleagues at my previous employer about the advantages of Zope; they were/are entrenched in the Java point of view of the world. I did manage to convince my COO though, who is now starting his own Zope-driven business. You may want to tap into the Dutch Zope community as well; see http://zll.zopatista.com:9673/ I used Zope 2.1.6 with python 1.5.2 on Debian Linux 2.2r2. While developing in Zope should be fast, unfortunately, it was not. Some minor things, which would be no problem in any other language, took me hours to do in Zope. Here is a list. I'm sure some things are already solved in the newest version of Zope. I'm posting this list not to offend, but to help you improve the system. Feedback is always welcome, please keep it up. Indeed, many issues are already solved in the current release of Zope. Note that Debian Woody has the most recent version, 2.2.4, packaged as a .deb distribution. You don't need to upgrade to Debian Woody to be able to run this; you can download the distribution and use dpkg --install manually: http://packages.debian.org/unstable/web/zope.html 1) When I make an error in an DTML-page, all my changes are lost! This is really frustrating. And unnecessary. This is more a browser cache issue, where the browser (esp. Netscape, IIRC), would re-retrieve the edit form when pressing the Back button. Try tuning your browser cache parameters. 2) Variables with a minus-sign in it! Who came up with that? Now I have to write dtml-var expr="_['sequence-length'] 10". Yep, they are lame. They are a remnant of the times before expressions in DTML where added, something that many regard as a mistake. You can use dtml-var to create an alias of such variables. Another option is using external methods to deal with the coding of these areas; usually you are dealing with logic, not presentation, and that is better suited for Python code. DTML should only be used for presentation. In Zope 2.3 you'll be able to use Python Script objects for this as well, giving you TTW python code. 3) sequence-start is only valid at the beginning of dtml-in. This really limit it's use, for example to print a 'previous'-button on the bottom of the page. You can use a seperate dtml-in construct for that, using the 'previous' or 'next' attributes. 4) Zope has an Image object, but you can't ask for the width and height (which should be trivial). You can actually. In DTML: dtml-with imageThis image is dtml-width; wide/dtml-with 5) You can use dtml-var myImage to show an image. But it's not possible to set border=0, which is also trivial. Use: dtml-var "image.tag(border=0)" The tag method generates an img tag for you, with the extra attributes inserted. You can also use this to remove or replace the autogenerated alt, width and height attributes, or scale the width and height values. 6) I invested some time to learn ZClasses. Only to find out the query-features are very poor, which made it useless to me. Now I only use 'real' databases. Query features? Could you elaborate? 7) The dtml-let tag is nested. So how can I remember a value I discovered in an dtml-in loop? I am not sure what you mean here. Within a dtml-let tag the surrounding namespace is still available, including the dtml-in loop values. 8) I made a big HTML-form to post and edit articles. To make a form to edit an article, I used: dtml-in getArticle form..Big form here/form /dtml-in But how can I use the *same* big form for a new article? I think putting the form in another file (as I did) is not the right solution. Why not? Putting the form into a seperate DTML Document or Method would make the form a reusable object, which to me looks like the right thing to do in this case. 9) I consider this a bug: dtml-var expr="objectValues()[0]" gives the value HTML-quoted. Very strange. I can't reproduce this. What object is returned by objectValues()[0]? (objectValues returns an array of object instances, of which you select the first, which is then 'represented' in the output stream). 10) It's pretty hard to use a checkbox in a form. Browsers don't submit unchecked checkboxes, which result in Key-errors. Writing wrappers for every checkbox is an ugly way to solve this. Use a hidden value with ':default' appended to the name. This makes the variable alwas available, browsers always send hidden fields, even if the value is empty: input type="hidden" name="a_checkbox:default" value="" input type="checkbox"
[Zope] test
test -- - Matthew Burleigh - Systems Administrator, Digital Creations - publishers of Zope. - (888)344-4332 -- http://www.digicool.com - http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] test
test -- - Matthew Burleigh - Systems Administrator, Digital Creations - publishers of Zope. - (888)344-4332 -- http://www.digicool.com - http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] test
test -- - Matthew Burleigh - Systems Administrator, Digital Creations - publishers of Zope. - (888)344-4332 -- http://www.digicool.com - http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope's . vs _ unsolved issue (Re:To retrieve properties from a dtmldocument)document)
[EMAIL PROTECTED] wrote: You still have given no cogent reason for using Zope. If you have only, or predominatly static content, you are paying a huge overhead penalty. If you have mixed static content and dynamic content, use apache and ProxyPass to front-end the dynamic content, and apache to serve the static content. Then you have no conversion worries at all on the static content. Hello Jim, I'm finding myself greatly dissapointed that Zope doesn't have a built-in routine for this "." vs "_" problem. Although it may not be a big issue if you remain in Zserver and Unix, it is if we want the Zope's users base to keep growing, because we all benefit from it. And this point is a sort of unpleasant barrier for not-programmers Windows users like me. Dreamweaver is great for layout and design, and for nothing else. In despite of its templates and libraries and everything else, it would be unclever to let the journalists and editors in charge of content creation at my job, to open Dreamweaver and insert their stories in each page, asking them to not forget to write the summary in the description tag and the story title as the page title tag. :) For the time being we can't afford a 3 Mb/s connection (our current bandwith needs) so we must upload to a remote server almost two hundred pages daily. And even when relying page updating on trainned personnel exclusively, there's been this funny experience that the printed edition releases before the digital one, meaning that we have to deal with this gap between releases all the time. So that's why we need Zope, and why we need to get over its behaviours. Maybe it's time to throw the ball to Macromedia's ground. :) Thanks again for your comments, Jim Ausum [EMAIL PROTECTED] wrote: On Mon, Dec 18, 2000 at 09:10:54PM -0500, Ausum wrote: Hello Andy, thanks for the advice. It didn't work. Maybe I'm wrong at any point, so please tell me whether it worked for you. I'm aware that this problem has been discussed here before, that it happens because of Python's object naming, and also that there's a workaround at least (and just)for expressions, using _['whatever.html'] Due to the kind of workflow we have, we need all of the documents to be editable with Dreamweaver at any moment, directly, after the daily WGET process. Batch-replacing every "_html" with ".html" in file names and content seems to be very complicated within this scenario. Going from dreamweaver to Zope, if you are working on unix, batch replacing is EASY, a single find command to change the file names and a simple sed script (or python or perl) to change hrefs. You will need to write such a script anyway, if your servers are Unix or Linux and your Dreamweavers are Windows. You will find that your windows people mix filename case randomly and expect it to work; you will have to canonify all hrefs to a single case convention. If going from zope to dreamweaver, either write the corresponding _ to . scripts and batch it, or write a checkout external script that does it for you. I have not thought about this latter option very much, but the export facility should give you an example of how to do this. I doubt if it is much more than a day's reading and two days coding (and this is being damn generous, as I suspect that this is a ten line script). You still have given no cogent reason for using Zope. If you have only, or predominatly static content, you are paying a huge overhead penalty. If you have mixed static content and dynamic content, use apache and ProxyPass to front-end the dynamic content, and apache to serve the static content. Then you have no conversion worries at all on the static content. Jim ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Editing Property Sheet HTML
"Brian Lloyd" [EMAIL PROTECTED] writes: The question is ... how do I do it? I'd like to make the default textarea field quite a bit bigger -- but I wasn't able to explore my way to success in the interface, and about 20 mins of seaching has yielded no answers. You could edit lib/python/OFS/properties.dtml, which renders the property management screen. The DTML in there has gotten pretty scary over time though :^) Yikes! But thanks ... I think I can hack it into submission. And here's a followup question: If I want to make a custom Properties view for a specific ZClass, how do I proceed? Just create an additional method for the class and add it under Views? And if I do this, is there any kind of DTML templete (sort of like the default add and addForm methods) that I can work from? And do I need to go this far if I (for example) simply want to change the display order for existing properties? Many thanks (as always) for any answers you have... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) -- Geoffrey L. Wright Developer / Systems Administrator (907) 563-2721 ex. 4900 http://www.integritysi.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] LoginManager - logging out
Thanks, I have tried it. dtml-raise type="Unauthorized" Logout!! /dtml-raise I guess it logs me out. But it also gives me a login dialog box it does not accept any of the account. So I cannot log back in! Why? What is going on here? Mohan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Welch Sent: Monday, December 18, 2000 11:06 AM To: Mohan Baro Cc: [EMAIL PROTECTED] Subject: RE: [Zope] LoginManager - logging out this is my logout DTML method dtml-raise type="Unauthorized" Logout!! /dtml-raise On Mon, 18 Dec 2000, Mohan Baro wrote: Can you please give an example of this code or method? Mohan. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] To retrieve properties from a dtml document
Hello Andy, thanks for the advice. It didn't work. Maybe I'm wrong at any point, so please tell me whether it worked for you. I'm aware that this problem has been discussed here before, that it happens because of Python's object naming, and also that there's a workaround at least (and just)for expressions, using _['whatever.html'] Due to the kind of workflow we have, we need all of the documents to be editable with Dreamweaver at any moment, directly, after the daily WGET process. Batch-replacing every "_html" with ".html" in file names and content seems to be very complicated within this scenario. not overly complicated, here is a slightly modfied script (untested) which I used for a similar task (creating an "offline"-version for a client): #!/usr/bin/bash rm -rf myimport wget -r -k http://192.168.0.201:10080/ mv 192.168.0.201/ myimport/ rm myimport/index.html perl -pi -e 's/base href="http:\/\/192.168.0.201:10080.*//g' `find myimport/ -type f` perl -pi -e 's/(.*)_html/$1\.html/g' `find myimport/ -type f` mmv ';*_html' '#1#2.html' zip -r myimport.zip myimport/* Things to check - Check the regular expressions and mmv part, I had to change them without testing (not certain about the (.*) and the mmv (- multiple move) syntax) - Instead of relying on _html to mark html-files one could use file(1) - but then one would have to make a list of renamed files in order to change the relevant links - Improve the regex for changing links, it might capture _html in text (but how often does that occure) cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Zope's . vs _ unsolved issue (Re:To retrieve properties from a dtml document) document)
What kind of content is it that you are uploading to Zope, and what is your workflow? As someone working in the news industry with several online newspapers and also fairly experienced with Zope and content automation, I might be able to make some suggestions that might help you out. Zope has some weird issues with namespaces and syntax that sometimes clash with Python's. That said, I think that things are constantly improving. Perhaps _['identifier'] solves your problem, at the slight cost of being just a bit kludgy. Do you use Zope for your staging server, or just for your live site? There might be ways to use it at both ends, integrate with dreamweaver, and bypass using wget... From the sounds of it, you are using zope as the back end to an "editorial-system" workflow using Dreamweaver, but you are not taking advantage of most of Zope's features that facilitate content management. If I was familiar with your workflow, I'd be happy to provide advice if I could be of any help. Good luck, Sean -Original Message- From: Ausum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 19, 2000 11:20 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [Zope] Zope's "." vs "_" unsolved issue (Re:To retrieve properties from a dtml document) document) [EMAIL PROTECTED] wrote: You still have given no cogent reason for using Zope. If you have only, or predominatly static content, you are paying a huge overhead penalty. If you have mixed static content and dynamic content, use apache and ProxyPass to front-end the dynamic content, and apache to serve the static content. Then you have no conversion worries at all on the static content. Hello Jim, I'm finding myself greatly dissapointed that Zope doesn't have a built-in routine for this "." vs "_" problem. Although it may not be a big issue if you remain in Zserver and Unix, it is if we want the Zope's users base to keep growing, because we all benefit from it. And this point is a sort of unpleasant barrier for not-programmers Windows users like me. Dreamweaver is great for layout and design, and for nothing else. In despite of its templates and libraries and everything else, it would be unclever to let the journalists and editors in charge of content creation at my job, to open Dreamweaver and insert their stories in each page, asking them to not forget to write the summary in the description tag and the story title as the page title tag. :) For the time being we can't afford a 3 Mb/s connection (our current bandwith needs) so we must upload to a remote server almost two hundred pages daily. And even when relying page updating on trainned personnel exclusively, there's been this funny experience that the printed edition releases before the digital one, meaning that we have to deal with this gap between releases all the time. So that's why we need Zope, and why we need to get over its behaviours. Maybe it's time to throw the ball to Macromedia's ground. :) Thanks again for your comments, Jim Ausum [EMAIL PROTECTED] wrote: On Mon, Dec 18, 2000 at 09:10:54PM -0500, Ausum wrote: Hello Andy, thanks for the advice. It didn't work. Maybe I'm wrong at any point, so please tell me whether it worked for you. I'm aware that this problem has been discussed here before, that it happens because of Python's object naming, and also that there's a workaround at least (and just)for expressions, using _['whatever.html'] Due to the kind of workflow we have, we need all of the documents to be editable with Dreamweaver at any moment, directly, after the daily WGET process. Batch-replacing every "_html" with ".html" in file names and content seems to be very complicated within this scenario. Going from dreamweaver to Zope, if you are working on unix, batch replacing is EASY, a single find command to change the file names and a simple sed script (or python or perl) to change hrefs. You will need to write such a script anyway, if your servers are Unix or Linux and your Dreamweavers are Windows. You will find that your windows people mix filename case randomly and expect it to work; you will have to canonify all hrefs to a single case convention. If going from zope to dreamweaver, either write the corresponding _ to . scripts and batch it, or write a checkout external script that does it for you. I have not thought about this latter option very much, but the export facility should give you an example of how to do this. I doubt if it is much more than a day's reading and two days coding (and this is being damn generous, as I suspect that this is a ten line script). You still have given no cogent reason for using Zope. If you have only, or predominatly static content, you are paying a huge overhead penalty. If you have mixed static content and dynamic content, use apache and ProxyPass to front-end the dynamic content, and apache to serve the static content. Then you have no conversion worries at
Re: [Zope] Help save my sanity (DTML-in string comparison)
Darin Lee writes: ... comparisons involving "id" do not work ... "id" is particularly difficult in DTML. For some objects, "id" is an attribute (a string), for others, it is a method. Due to Zope's acquisition magic, it is difficult to compare method's to one another: the "same" method compare different, if accessed on different access paths. Thus, you want to work with strings only. The problem is: DTML does not let you test for types. You can do something like this: dtml-with your_object dtml-let id_name=id !-- now: "id_name" contains a string -- dtml-call "REQUEST.set('id_name',id_name) /dtml-let /dtml-with Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] A groupware package for zope
[[EMAIL PROTECTED]] | Are you planning on making a win32 version. | I had a problem tring to run it. | Something about posix module missing. Hmm, I'll try to find out what depends on the posix module. (Maybe you could send me a traceback?) A win32 compatible package shouldn't be too hard to fix, but it's not on my priority list. Cheers, Morten ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Editing Property Sheet HTML
If I want to make a custom Properties view for a specific ZClass, how do I proceed? Just create an additional method for the class and add it under Views? That's what I'd do. And if I do this, is there any kind of DTML templete (sort of like the default add and addForm methods) that I can work from? And do I need to go this far if I (for example) simply want to change the display order for existing properties? Yes - if you don't like the existing property form, you need to make your own. You should be able to start with the stock properties.dtml source for the new view and make your changes starting from there... Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] POST METHOD
Please be more specific: What type of field? What error is Zope giving you? What browser are you using? If you are curious about what form variables Zope is getting, set the form method to a DTML method with this in it: dtml-var name="standard_html_header" dtml-var name="REQUEST" dtml-var name="standard_html_footer" Best of Luck, Troy Farrell -Original Message- From: Anderson Ami [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 19, 2000 2:45 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [Zope] POST METHOD Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Thanks so much !!! anderson ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LoginManager - logging out
Mohan Baro wrote: Thanks, I have tried it. dtml-raise type="Unauthorized" Logout!! /dtml-raise I guess it logs me out. But it also gives me a login dialog box it does not accept any of the account. So I cannot log back in! Why? I'm not sure WHY it won't accept your username at this point. BUT, it doesn't really logout you out either. If you hit the back button a couple of times you'll notice that you are still logged in. The only way to logout using standard authentication is to close the browser. HTH, -- Tim Cook, President -- Free Practice Management,Inc. | http://FreePM.com Office: (901) 884-4126 Censorship: The reaction of the ignorant to freedom. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Help save my sanity (DTML-in string comparison)
On Tue, Dec 19, 2000 at 09:57:31PM +0100, Dieter Maurer wrote: Darin Lee writes: ... comparisons involving "id" do not work ... "id" is particularly difficult in DTML. For some objects, "id" is an attribute (a string), for others, it is a method. Due to Zope's acquisition magic, it is difficult to compare method's to one another: the "same" method compare different, if accessed on different access paths. Thus, you want to work with strings only. The problem is: DTML does not let you test for types. You can do something like this: dtml-with your_object dtml-let id_name=id !-- now: "id_name" contains a string -- dtml-call "REQUEST.set('id_name',id_name) /dtml-let /dtml-with Or you could use "_['id']" in place of "id". Which does exactly the same as the let tag does in the above statement, ie a lookup in the namespace and then calling it if it is a method. Example: dtml-with your_object dtml-call "REQUEST.set('id_name', _['id'])" /dtml-with This kind of hoopjumping is exactly why in Zope 2.3 you now can use the method 'getId()', which will hide the confusion for you. From Zope 2.3 onwards, *always* use getId(): dtml-with your_object dtml-call "REQUEST.set('id_name', getId())" /dtml-with or: dtml-call "REQUEST.set('id_name', your_object.getId())" -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] LoginManager - logging out
On Tue, 19 Dec 2000, Tim Cook wrote: Mohan Baro wrote: Thanks, I have tried it. dtml-raise type="Unauthorized" Logout!! /dtml-raise I guess it logs me out. But it also gives me a login dialog box it does not accept any of the account. So I cannot log back in! Why? The login dialog is the reauthentication opportunity that's your browser's response to the 'Unauthorized' exception and that's normal. Don't know why you can't log back in. Works for me in Navigator, IE, and Konqueror. Lynx displayed an opportunity to reauthenticate once, and then only showed the exception after that. I'm not sure WHY it won't accept your username at this point. BUT, it doesn't really logout you out either. If you hit the back button a couple of times you'll notice that you are still logged in. The only way to logout using standard authentication is to close the browser. Not true, depends on the browser. My tests indicate that Navigator and IE both trash the existing good credential with the garbage one and you're really logged out. Konqueror and lynx seem to hang on to the last successful authentication and this method doesn't log you out. Hitting the back button doesn't tell you anything about what credential your browser is sending to the server. Try visiting a privileged page after going back or look at the request that's actually being sent. Try using this one line method (I call mine 'debug'): dtml-var REQUEST After visting yourSite/logout and trying to login as a garbage user at the reauthentication opportunity (blanking the user name seems to work fine), visit yourSite/debug. Check other/AUTHENTICATED_USER, Navigator and IE show 'Anonymous User', Konqueror and lynx show the last good user. Bill. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] A groupware package for zope
For the last couple of months I've been working on a groupware package for Zope, named ZopeGUM. It has reached version 0.1.63 now, and it's in steady progress. Are you planning on making a win32 version. I had a problem tring to run it. Something about posix module missing. Just to clarify this. Windows NT is posix compliant so it seems to work ok on that platform. 9x lacks the posix support. I just verified on both systems. I believe there are ways to change the code but I'm not sure it's worth it for Win9x. It looks good and since I now have it on my NT machine you can expect more feedback. Thanks, -Jimbo ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] ZCatalog raises index out of range exception error
On Tue, 19 Dec 2000, Marcin Kasperski wrote: Partial solution: at something like 2:00 AM delete your SiteRoot rule, reindex with ZCatalog and create this rule again. Searching works (although I needed to edit the paths found a bit in the form responsilbe for search results presentation). You don't need to delete your SiteRoot. You can use one of techniques described in SiteRoot docs to suppress it within particular request. I use trick with phantom folder, call it 'Z'. So my AccessRule looks like: Is there a path, and does it start with 'Z'? dtml-let stack="REQUEST['TraversalRequestNameStack']" dtml-if "stack and stack[-1]=='Z'" Get rid of 'Z': dtml-call "stack.pop()" Put it back logically: dtml-call "REQUEST.setVirtualRoot('Z')" dtml-else Is the first-level domain 'hotsite.com'? Ignore sub-domains and port number. dtml-if "_.string.split(_.string.lower(_.string.split(HTTP_HOST, ':')[0]), '.')[-2:]==_.string.split('www.hotsite.com','.')[-2:]" Add physical root: dtml-call "REQUEST['TraversalRequestNameStack'].append('hotsite')" dtml-call "REQUEST.set('SiteRootPATH','/')" /dtml-if /dtml-if /dtml-let In my SiteRoot, I have all properties left blank. When I access my server using URL like www.myserver.com/Z/something, then SiteRoot is turned off. With this solution, your site may be still accessible to customers, while you are working without SiteRoot (i.e. cataloging objects). [EMAIL PROTECTED] /--\ | `long long long' is too long for GCC | \--/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Editing Property Sheet HTML
"Geoffrey L. Wright" [EMAIL PROTECTED] wrote: The question is ... how do I do it? I'd like to make the default textarea field quite a bit bigger -- but I wasn't able to explore my way to success in the interface, and about 20 mins of seaching has yielded no answers. Then again, it's pretty late, so mebbe I'm just being dim If the propertysheet you want to customize belongs to a ZClass, then you are in luck. Try adding a "Property Sheet Interface" object to the methods tab of your ZClass: it will prompt you for the name of the sheet, and whether you want a "view" interface or an "edit" interface; it then creates a DTML Method with appropriate chrome for customization. Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations "Zope Dealers" http://www.zope.org ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Newbie: manage_changeProperties and wrong permission
I need to call manage_changeProperties but Zope refuses to accept my authentication. There's a "Fir" class with two subfolders ("cz" and "en"). The subfolders contain identically named properties: lst_name and lst_text. These properties are then displayed using simple acquisition: http://...instance/cz/display and http://...instance/cz/display, where "display" is a method of Fir class that calls dtml-var lst_name. Simple. To change the lst_name and lst_text properties thru the web, I created simple form and a method within the Fir class. This is the changeLST_form: dtml-if expr="REQUEST.has_key('lst_name_new')" dtml-call expr="manage_changeProperties(lst_name=REQUEST['lst_name_new'])" h1The property 'lst_name' has changed/h1 dtml-else h1No properties were changed/h1 /dtml-if dtml-if expr="REQUEST.has_key('lst_text_new')" dtml-call expr="manage_changeProperties(lst_text=REQUEST['lst_text_new'])" h1The property 'lst_text' has changed/h1 dtml-else h1No properties were changed/h1 /dtml-if Unfortunately, authorization fails when this script is supposed to run: "You are not authorized to access manage_changeProperties." I'm running this script as a "manager" defined at Zope root, in other words with the default setup. Normally I can do anything in Zope with this authorization. -- Milos Prudek ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Editing Property Sheet HTML
Tres Seaver [EMAIL PROTECTED] writes: "Geoffrey L. Wright" [EMAIL PROTECTED] wrote: The question is ... how do I do it? I'd like to make the default textarea field quite a bit bigger -- but I wasn't able to explore my way to success in the interface, and about 20 mins of seaching has yielded no answers. Then again, it's pretty late, so mebbe I'm just being dim If the propertysheet you want to customize belongs to a ZClass, then you are in luck. Try adding a "Property Sheet Interface" object to the methods tab of your ZClass: it will prompt you for the name of the sheet, and whether you want a "view" interface or an "edit" interface; it then creates a DTML Method with appropriate chrome for customization. Ah -- it does, in fact. Very nice and works like a champ. Gracias. Tres. -- Geoffrey L. Wright Developer / Systems Administrator (907) 563-2721 ex. 4900 http://www.integritysi.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] POST METHOD
On Tue, Dec 19, 2000 at 06:44:35PM -0200, Anderson Ami wrote: Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Some older browsers have a limit to the amount of data they send in a request, usually around 64k. On the other hand, you may want to examine what is actually in the REQUEST object. You can view the contents by including the REQUEST object in your page: dtml-var REQUEST -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] POST METHOD
Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Thanks so much !!! anderson ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
Hi Deiter, Hmm.. I just tried this with my highly experimental product (LocalProc 0.0.1) and I didn't observe the same effect that you did behind my Proxy Server. (I normally run with Rewrite... but when I got your note I tried ProxyPass and it worked on the first try.) (Good howto Anser! http://www.zope.org/Members/anser/apache_zserver/) Anyway... I ran 'sleep 20' as my local process (I checked the 'background' button on my product) and the web page returned immediately, but the process ran on in the background as I wished. The main difference I see between what you are doing and what I do.. is that I redirect stdout and stderr so that my subprocess has no open files shared with the parent process.. anyway.. you might try this to see if it suits your needs. Lightly tested on FreeBSD only.. but any unix should work the same... http://www.zope.org/Members/sspickle/LocalProc -steve "Dieter" == Dieter Maurer [EMAIL PROTECTED] writes: Dieter Today was again a hard Zope day. Dieter Did you ever hear, that usually (i.e. if you do not do Dieter special things) Zope renders a complete page before it Dieter starts sending the result back to the client. This Dieter implies that you should never see only half of a page. Dieter I heard it and I saw the code that does it. Therefore, I Dieter was convinced that this were really the case. Dieter Then our client phoned: Dieter He visits a page that allows him to generate a Dieter newsletter. When he presses the "generate newsletter Dieter button", a result page is build that tells him that the Dieter newsletter is being generated and send is a few minutes. Dieter He reported, that this response page is build only Dieter half, then stops, to be completed only half a minute Dieter later, at the same time when the newsletter arrives. The Dieter effect is reproducible. If newsletter generation takes Dieter longer, he must wait longer for the page to complete. Dieter He is convinced that we generate the newsletter Dieter synchronously and let him wait until the generation is Dieter complete. And he is angry. Dieter I know, that the newsletter is generated in a Dieter background process, started in an external method with: Dieteros.system("gen_newsletter ") Dieter I try to reproduce the behaviour in our test Dieter environment and fail. I do not have to wait, until the Dieter newsletter generation finished. Then, I use the official Dieter service URL and see, I observe the same behaviour. The Dieter difference: in the test environment, the browser connects Dieter directly to ZServer; with the official URL, it connects Dieter via a proxy. Dieter Puzzling! Dieter What happened? Dieter The background process inherits Zope's open file Dieter descriptors. Among them are all currently open HTTP Dieter request sockets. The process keeps these sockets open Dieter until it finishes. Dieter There are two HTTP modes: Dieter1. single request mode a new TCP connection is Dieter created for each HTTP request, the request is completed, Dieter when the TCP connection is closed. Dieter2. multi request mode several requests share a Dieter single TCP connection. The "Content-Length" HTTP header Dieter allows client and server to determine the request Dieter boundaries. Dieter That means: when a client uses the multi request Dieter mode, everything is fine. Clients, however, that use the Dieter single request mode wait until their connection is closed Dieter and can observe serious delays. Dieter These delays may be very difficult to explain, as the Dieter background process not only delays its own request but may Dieter delay arbitrary other requests that happen to be served at Dieter the same time. Dieter How to fix the problem: Dieter There should be a (file) control "CloseOnExec", that Dieter tells Unix to automatically close the file like object Dieter upon an exec. ZServer should probably use it on each of Dieter its sockets. I can not see a serious application that Dieter should have direct access to ZServer's HTTP request Dieter socket. Dieter I will soon file a bug report into the Collector. Dieter Dieter Dieter ___ Zope Dieter maillist - [EMAIL PROTECTED] Dieter http://lists.zope.org/mailman/listinfo/zope ** No cross Dieter posts or HTML encoding! ** (Related lists - Dieter http://lists.zope.org/mailman/listinfo/zope-announce Dieter http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope **
Re: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
He reported, that this response page is build only half, then stops, to be completed only half a minute later, Depending on how long the page is I never see the bottom. When I use the products page I have to refresh 2-3 times to see the bottom part. This is thru a proxy only. I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! I'm having this same sort of problem w/Zope 2.3a1. I just started trying to use Zope through a proxy. If I work directly on the machine I have no problems. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. -Jimbo ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. Note that what Dieter is talking about would only affect you if you were spawning an external process that inherited the filehandles of the zope process. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] [BUG] Background processes interfere with Zope's HTTP responses
Today was again a hard Zope day. Did you ever hear, that usually (i.e. if you do not do special things) Zope renders a complete page before it starts sending the result back to the client. This implies that you should never see only half of a page. I heard it and I saw the code that does it. Therefore, I was convinced that this were really the case. Then our client phoned: He visits a page that allows him to generate a newsletter. When he presses the "generate newsletter button", a result page is build that tells him that the newsletter is being generated and send is a few minutes. He reported, that this response page is build only half, then stops, to be completed only half a minute later, at the same time when the newsletter arrives. The effect is reproducible. If newsletter generation takes longer, he must wait longer for the page to complete. He is convinced that we generate the newsletter synchronously and let him wait until the generation is complete. And he is angry. I know, that the newsletter is generated in a background process, started in an external method with: os.system("gen_newsletter ") I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! What happened? The background process inherits Zope's open file descriptors. Among them are all currently open HTTP request sockets. The process keeps these sockets open until it finishes. There are two HTTP modes: 1. single request mode a new TCP connection is created for each HTTP request, the request is completed, when the TCP connection is closed. 2. multi request mode several requests share a single TCP connection. The "Content-Length" HTTP header allows client and server to determine the request boundaries. That means: when a client uses the multi request mode, everything is fine. Clients, however, that use the single request mode wait until their connection is closed and can observe serious delays. These delays may be very difficult to explain, as the background process not only delays its own request but may delay arbitrary other requests that happen to be served at the same time. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] A groupware package for zope
For the last couple of months I've been working on a groupware package for Zope, named ZopeGUM. It has reached version 0.1.63 now, and it's in steady progress. All the planned components, like messenger, address book, calendar, todos, etc. are there and working now; though it's definently not ready for a production enviroment yet. Anyways, just wanted to let you all know. (And yes, I do appreciate feedback. =) -Morten ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] weired zope behaviour
hi all i have a zope site that uses ZEO, runs behind apache and on RH6.x what puzzles me is that only *one* zserver thread is alive after some time and it consumes most of the processors cycle. the top snapshots are at the bottom of this message anybody got any ideas why this happened? i think this may have contributed to the slow response to the site. if i restart zope, everything works dandy... until some time when only one thread is used, instead of 4 what are others seeing? is it my codes? thanks 8- ZC1 4515 nobody 0 0 99.2M 99M 1592 S 0 4.1 2.5 183:37 python 4537 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 0:07 python 4538 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 724:16 python 4539 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 751:47 python 4540 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 735:11 python 4541 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 749:27 python 4542 nobody 0 0 99.2M 99M 1592 S 0 0.0 2.5 741:45 python 4543 nobody13 0 99.2M 99M 1592 R 0 94.0 2.5 1734m python ZC2 4348 nobody 0 0 102M 102M 1828 2 S 2.1 13.5 214:33 python 4350 nobody 0 0 102M 102M 1828 2 S 0.0 13.5 0:10 python 4351 nobody 0 0 102M 102M 1828 2 S 0.0 13.5 398:08 python 4352 nobody 0 0 102M 102M 1828 2 S 0.0 13.5 407:02 python 4353 nobody 0 0 102M 102M 1828 3 S 0.0 13.5 406:32 python 4354 nobody 0 0 102M 102M 1828 3 S 0.0 13.5 392:10 python 4355 nobody14 0 102M 102M 1828 2 R95.5 13.5 4712m python 4356 nobody 0 0 102M 102M 1828 2 S 0.0 13.5 388:41 python Z3 18567 nobody 0 0 73652 71M 1724 S 0 4.4 14.2 273:56 python 18571 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 0:44 python 18572 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 42:03 python 18573 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 63:13 python 18574 nobody19 0 73652 71M 1724 R 0 91.2 14.2 6144m python 18575 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 47:54 python 18576 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 57:10 python 18577 nobody 0 0 73652 71M 1724 S 0 0.0 14.2 57:13 python -- http://www.kedai.com.my/kk http://www.kedai.com.my/eZine if you SMELLL ... what the Rock is cookin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Network hangs
Apache sit's on port 80 w/all static pages Zope is now on port 8080 until the move is completed (then it becomes primary on 80). So I was able to narow it down. With Apache now stopped, Zope is running great. I assume there was some arguement between Zope and Apache about who controlled what (?) but with Apache stopped it's solid. Anybody have any ideas? Should I scrap Zserver and do the pcgi patches? (This machine will eventualy host 2 domains so I may have answered my own question). Input please... Rick ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] newbie zcatalog
Please consider the following code fragment: dtml-if expr="REQUEST.REQUEST_METHOD=='POST'" dtml-call "REQUEST.set('ts', ZopeTime())" dtml-call "REQUEST.set('id',_.str(_.int(ts)))" dtml-call "postings.catalog_object(REQUEST.postingtext,REQUEST.id)" Classified:p dtml-var "REQUEST.postingtext" p On execution, REQUEST.postingtext is displayed as expected. An object is placed in the Zcatalog postings as determined by using manage. However, clicking on the underlined id of an object in manage yields a traceback ending in an object not found. It is sort of expected to display "Hello World". Please advise. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ftp ZSQL Methods
hi there, is it possible to externally edit ZSQL Methods? they show 0 bytes and no rights in my ftp client! thanks olaf -- soli-con Engineering Zanger Dipl.-Ing. (FH) Olaf Zanger Nusch Lorrainestrasse 23 3013 Bern / Switzerland Fon: +41-31-332 9782 Mob: +41-76-572 9782 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] http://www.soli-con.com begin:vcard n:Zanger;Olaf Marc tel;cell:+41-76-572 9782 tel;work:+41-31-332 9782 x-mozilla-html:FALSE url:www.soli-con.com org:soli-con Engineering Zanger adr:;;Lorrainestrasse 23;Bern;BE;3013;Switzerland version:2.1 email;internet:[EMAIL PROTECTED] title:Dipl.-Ing. note;quoted-printable:IT-Consulting=0D=0AEmbedded Systems=0D=0AEnergy Systems=0D=0AOpen Source Solutions=0D=0A x-mozilla-cpt:;-32176 fn:Olaf Zanger end:vcard