[Zope-dev] MailHost, 2.2.0, and qmail mailserver
The change in the sendmail tag to use the SMTP module has caused a problem for me when sending to a qmail mailserver. After investigation, it would appear that the smtplib module function: SMTP.mail(self,sender,options=[]): appends a space to the end of the FROM: address when there are no options. The offending line is: self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist)) This space upsets the qmail server which response with SMTPSenderRefused. A quick fix is to remove this space and home that no optionlist is ever past. A more permanent fix to smtplib would seem in order. Richard ___ 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] Converters.field2date, allow empty string to return None?
Brad Clements writes: One thing that has been bothering me is that I can't easily test my ZSQL Methods if they accept a date type unless I completely fill all the date arg types. For example, if the sqlmethod has argument type startdate:date='' and in the body I have dtml-if startdate ... When i use the test form, I can't leave the date field empty, otherwise I get a conversion error from Converters.field2date() One solution would be to use a valid (special) date as default value and test against it in the body. I see that converters required: exists, but does that imply that all other converters allow an empty string to return None? Or do we need to add an explicit "optional" type? I think, we should have an explicit "optional" because that is the most clear way to say, this argument is optional. 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 )
Re: [Zope-dev] Converters.field2date, allow empty string to return None?
On 3 Sep 2000, at 13:33, Dieter Maurer wrote: One solution would be to use a valid (special) date as default value and test against it in the body. I don't like this "solution" because the end-user has to know what the special date is, it looks ugly on the form and it still does *not* fix the problem of using the test function in an SQL Method. Brad Clements,[EMAIL PROTECTED] (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements ___ 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] ZPatterns: transaction bug
ZPatterns 0.4.2a1 PlugIns.py bug? I get a 'Name Error' aq_base when I hit the following code while trying to update the index_html method of one of my Specialists from CVSMixin.. I think that this would get hit anytime you add an object whose id is already in the acquisition path -steve diff -c -r1.1.1.2 PlugIns.py *** PlugIns.py 2000/09/04 14:17:29 1.1.1.2 --- PlugIns.py 2000/09/04 18:53:17 *** *** 265,271 # An object by the given id exists either in this # ObjectManager or in the acquisition path. flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE) ! if hasattr(aq_base(self), id): # The object is located in this ObjectManager. if not flags REPLACEABLE: raise 'Bad Request', ('The id "%s" is invalid - ' \ --- 265,271 # An object by the given id exists either in this # ObjectManager or in the acquisition path. flags = getattr(obj, '__replaceable__', NOT_REPLACEABLE) ! if hasattr(self.aq_base, id): # The object is located in this ObjectManager. if not flags REPLACEABLE: raise 'Bad Request', ('The id "%s" is invalid - ' \ ___ 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] MailHost, 2.2.1, and tracebacks
Shane Hathaway wrote: Bill Anderson wrote: ... File /local/ZopeSites/TestBed/lib/python/AccessControl/Owned.py, line 152, in getOwner (Object: mailPasswordTemplate) ValueError: (see above) By any chance does it say something to the effect of "Unpack tuple of incorrect size"? If so, I suggest you add a "print owner" statement just before line 152 of Owner.py and tell us what it says. Hi Shane, I apologize for the delay, been working on other aspects of it. I added a print statement, and it prints []. line 52 reads: udb, oid = owner Which makes sense that it would barf, since the list is zero-length. Here is the code bit, with my print statement added in: - def getOwner(self, info=0, aq_get=aq_get, None=None, UnownableOwner=UnownableOwner, ): """Get the owner If a true argument is provided, then only the owner path and id are returned. Otherwise, the owner object is returned. """ owner=aq_get(self, '_owner', None, 1) if owner is None: return owner if info: return owner if owner is UnownableOwner: return None print owner udb, oid = owner root=self.getPhysicalRoot() udb=root.unrestrictedTraverse(udb, None) if udb is None: return SpecialUsers.nobody owner = udb.getUserById(oid, None) if owner is None: return SpecialUsers.nobody return owner -- The following patch seems to alleviate the problem, but I dunno if it affects anything else: == --- lib/python/AccessControl/Owned.py Mon Sep 4 13:56:52 2000 +++ lib/python/AccessControl/Owned.py Mon Sep 4 13:55:40 2000 @@ -149,6 +149,8 @@ if owner is UnownableOwner: return None +if len(owner)==0: return None + udb, oid = owner root=self.getPhysicalRoot() udb=root.unrestrictedTraverse(udb, None) === Basically, I test for an empty list, and return None. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] MailHost, 2.2.1, and tracebacks
Bill Anderson wrote: ... The following patch seems to alleviate the problem, but I dunno if it affects anything else: yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth ... will work on it today. Ugh. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] MailHost, 2.2.1, and tracebacks
Bill Anderson wrote: Bill Anderson wrote: ... The following patch seems to alleviate the problem, but I dunno if it affects anything else: yeah, it makes zope ignore the cookie login setup, and instead triggers basic Auth ... will work on it today. Ugh. Thi sis getting old, replying to my own posts... But anyway, I wa sincorrect, it was a lack of a dtml-else causing this problem. So far, it works fine. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] The difference between ControlSet 001 and 002 ..
Answering myself, from the Resource Pro Kit: .. The ControlSet00n subkeys represent a control set for the system. The numbered ControlSet00n subkeys, such as ControlSet001 and ControlSet002, contain control sets that can be used to start and run Windows 2000. Most systems have two numbered control sets, an original and a backup copy of a control set that has been used to start the system successfully, but the system can maintain as many as four control sets. Windows 2000 maintains backup copies so that you can undo configuration changes that might otherwise prevent you from starting the system. .. So that's that, anyway. For the record, the current one in my case was number 1. -- Jean Jordaan --technical writer-- Mosaic Software--Zope 2.1.6 on WinNT and W2K ___ 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] Help with calcualtions in DTML
Hello! I have the following listing of objects in my folder: table tr tdpbName/b/p/td td align="right"pbSize/b/p/td td align="right"pbdate/b/p/td /tr dtml-in expr="doc.objectValues()" tr td pa href="dtml-var absolute_url"dtml-var id/a/p /td td align="right" pdtml-var get_size bytes/p /td td align="right" pdtml-var bobobase_modification_time fmt="%Y-%m-%d %H:%M"/p /td /tr /dtml-in /table It gives me the name of the object, the size in bytes and the modification time in GMT. I need to do the following: express the size in kb, format the output with spaces for thousands. I also need the date displayed according to my locale (+2 GMT in Sweden) so if bobobase_modification_time is 10:48, I need to show it as 8:48, and on top of that I also need to take dayligth savings into account. How do I do it? The fmt strings are abviously adjusted to US standards, so us ISO-people need to hack our own format strings :-). I know i could calculate the size in KB myself IF I only knew how to get the get_size attribute into a calculation expression (that goes for bobobase_modification_time as well, however this returns as string. How do I get the date as a date?) Any help is appreciated and needed. Thank you. /dario PS: has anyone been thinking of renaming bobobase_modification_time to something shorter and more intuitive, like, say, modification_time? :-)) - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems Services ___ 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] PyWinTypes15.dll not found
This dll exists in in the Zope tree in the directories bin and bin\lib\win32. unfortunately none of these is in the PYTHONPATH. Remedy: copy PyWinTypes15.dll into one of the directories where it searches for ( e.g. in your case C:\programs\ZopeDev\lib\python\Products\LocalFS) or change the start.bat so that PythonPath also points to these directories phil *** REPLY SEPARATOR *** On 04.09.2000 at 08:58 Jean Jordaan wrote: Hi Zopers .. I've installed Zope to start as a service. It seems to work perfectly fine, but I notice messages like the following in the eventlog:: 2000/09/02 10:25:36Application Popup Information None 26 N/A JEAN Application popup: python.exe - Unable To Locate DLL : The dynamic link library PyWinTypes15.dll could not be found in the specified path C:\programs\ZopeDev\lib\python\Products\LocalFS; .; C:\WINNT\System32; C:\WINNT\system; C:\WINNT; C:\Perl\bin\; C:\WINNT\system32; C:\WINNT; C:\WINNT\System32\Wbem; C:\Program Files\Network Associates\PGPNT; C:\Program Files\Resource Pro Kit\; c:\programs\vim\vim57; C:\programs\NcFTP; c:\cygwin\bin; c:\cygwin\usr\bin. (I broke the path into separate lines for clarity.) Now, when I examine the environment variables thru 'Control Panel|System|Advanced|Environment Variables', Zope does not feature. I also don't notice anything untoward when I examine the registry. The registry entry that starts Zope seems to be:: REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev] "Type"=dword:0010 "Start"=dword:0002 "ErrorControl"=dword:0001 "ImagePath"="C:\\Programs\\ZopeDev\\bin\\lib\\win32\\PythonService.exe" "DisplayName"="Zope (ZopeDev)" "ObjectName"="LocalSystem" @="" [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Parameters] "start"="\"C:\\programs\\ZopeDev\\bin\\python.exe\" \"C:\\programs\\ZopeDev\\z2.py\" -S" [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\PythonClass] @="C:\\programs\\ZopeDev\\ZServer\\ZService.ZServerService" [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\ZopeDev\Security] "Security"=hex:01,00,14,80,a0,00,00,00,ac,00,00,00,14,00,00,00,30,00,00,00,0 2,\ 00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\ 00,00,02,00,70,00,04,00,00,00,00,00,18,00,fd,01,02,00,01,01,00,00,00,00,00,\ 05,12,00,00,00,4f,00,47,00,00,00,1c,00,ff,01,0f,00,01,02,00,00,00,00,00,05,\ 20,00,00,00,20,02,00,00,4f,00,4e,00,00,00,18,00,8d,01,02,00,01,01,00,00,00,\ 00,00,05,0b,00,00,00,20,02,00,00,00,00,1c,00,fd,01,02,00,01,02,00,00,00,00,\ 00,05,20,00,00,00,23,02,00,00,4f,00,4e,00,01,01,00,00,00,00,00,05,12,00,00,\ 00,01,01,00,00,00,00,00,05,12,00,00,00 (This also occurs as [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev] except that the 'ControlSet001' version has an additional key, 'Enum':: [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\ZopeDev\Enum] "0"="Root\\LEGACY_ZOPEDEV\\" "Count"=dword:0001 "NextInstance"=dword:0001 Now for the questions: - What is the difference between the 'ControlSet002' version and the 'ControlSet001' version? - How and where does 'LocalFS' get into the path? - Why isn't 'C:\programs\ZopeDev\bin\lib\win32\PyWinTypes15.dll' found? - What, for that matter, is the difference between *that* PyWinTypes15 and this one: 'C:\programs\ZopeDev\bin\PyWinTypes15.dll'? Any answers sorely appreciated! Regards, -- Jean Jordaan --technical writer-- Mosaic Software--Zope 2.1.6 on WinNT and W2K ___ 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] Re: File Attachments with Sendmail
Dear Luis, Dieter Mauer was kind enough to assist me with the answer to this question. The normal Sendmail tag does not accept variables. You need to install the MIME.py.patch. Once that is done you can include variables. Brendon - Original Message - From: "Luis Cortes" [EMAIL PROTECTED] To: "Brendon Grunewald" [EMAIL PROTECTED] Cc: "Zope mailing list" [EMAIL PROTECTED] Sent: Monday, 04 September, 2000 10:03 Subject: Re: [Zope] Re: File Attachments with Sendmail Great answer, but I have one question: dtml-boundary name="dtml-var Required_Doc" type=application/octet-stream disposition=attachment encode=base64 does not expand the Required_Doc name, do anyone know why?? - Original Message - From: "Brendon Grunewald" [EMAIL PROTECTED] To: "Chris Withers" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, August 31, 2000 5:12 AM Subject: [Zope] Re: File Attachments with Sendmail Hi Chris, This is what I have in total. I know I am being stupid, but this is frustrating me to hell. Perhaps I should not be doing this at 1AM. The form looks like this: dtml-var standard_html_header form METHOD="POST" ACTION="send_webdoc" Please provide the following information: br br Email address: input TYPE="TEXT" NAME="Email_address" SIZE="20" br Document: SELECT NAME="Required_Doc" OPTIONBrochure.doc/OPTION OPTIONPricelist.xls/OPTION OPTIONMap.pdf/OPTION /SELECT br pinput TYPE="submit" VALUE="Send Form" input TYPE="RESET" VALUE="Reset Form" /p /form dtml-var standard_html_footer - send_webdoc looks like this... --- html head TITLE!--#var title_or_id--/TITLE meta http-equiv="Refresh" content="5; url=!--#var Redirect_URL--" /head BODY !--#var BackgroundImage -- dtml-sendmail mailhost="MailHost" To: dtml-var Email_address From: WebForm [EMAIL PROTECTED] Subject: Web Doc Request dtml-mime type=text/plain encode=7bit Attached is the document you requested: dtml-var Required_Doc dtml-boundary name="dtml-var Required_Doc" type=application/octet-stream disposition=attachment encode=base64 dtml-var "Required_Doc.read()" /dtml-mime /dtml-sendmail H2Form Information Confirmation/H2 Thank you the document should be email to you immediately.BR You should be automatically redirected in a few seconds.BR p If not a href="!--#var Redirect_URL--"Click here/a. /p dtml-var standard_html_footer -- Thanks Brendon -- 70South: the No.1 source for Antarcticles. For the latest news and views on Antarctica visit : http://www.70south.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 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] Images slow rendering problem
Hi, I already posted this message several monthes ago, expecting a new Zope version would fix the problem, but... I have some images on my pages (let's say 10 - not a lot), rendered either by dtml-var or a manual IMG tag. When I render the page on some of my LAN boxes (especially with IE), some images doesn't load at the first time. I need to reload the page to make them appear. When I monkeyly hit the 'F5' key, some images do not show again. Argl. Anoying The problem is worst ever through Internet. Any clues ? Is it a Zope images rendering problem ? Many thanks, P.-J. ___ 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 + Apache + fastcgi + unix socket ..
Hi there.. Have any1 of you gotten local unix domain socket style access of Zope behind Apache to work? I have not .. and I am running this on Solaris. I see that Apache is trying to access the "file" .. and I presume the request is passed to fastcgi .. but I never see the request in Z2.log. I have fired Zope with socket access .. and configured Fast- CgiExternalServer .. etc. for apache. Anyone have any information about this? Would apriciate any! I have browsed www.zope.org too .. without any success .. ;) -- Med vennlig hilsen, Jørgen Skogstad /\System Specialist \\ \ \ \\ / Sun Microsystems AS / \/ / / Gjerdrums vei 12 / / \//\N-0486 Oslo, NORWAY \//\ / / / / /\ / Phone:+ 47 22 02 39 00 / \\ \ Cellular: + 47 92 41 30 23 \ \\ Fax: + 47 22 02 39 99 \/EMail:[EMAIL PROTECTED] Web: www.sun.no BTW; Opinions formed by myself in informal mailings are mine and not of my employer. ___ 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] Non-blocking MailHost
Kapil Thangavelu wrote: i was think about this in regard to doing bulk email, the best i could think of was to response.write and than send the email. no real confirmation but the user gets the page and the mail hopefully gets sent. i was planning on doing this from python with either calls to the mailhost or smtplib. What we really want is a non-blocking MailHost. Anyone know how or want to write one? cheers, Chris ___ 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] Migrating passwords from Apache to Zope?
Is it possible to smoothly migrate accounts and passwords from Apache to Zope? More details: I keep Apache accounts in some file of the format username:encoded_password where username is plaintext username and encoded_password is the password encoded in the normal Unix way (via crypt function). I would like to migrate those accounts to Zope. I do not know the passwords and I would not like to ask users for them or force them to change the password. Is it possible? -- Serwis dla programistw, kcik mieszkaniowy: http://www.mk.w.pl | | Working overtime sucks the spirit and motivation out of a team. | Projects that require overtime to be finished on time will be late no | matter what you do. (Wells) ___ 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] Announce: Squishdot 0.7.1 now available!
Squishdot 0.7.1 is now available from http://www.zope.org/Members/chrisw/Squishdot/ http://www.squishdot.org/Download/Squishdot The following changes were made: - Slightly updated roadmap. - Fixed bug that prevented deleting postings. If you run into problems, remember Squishdot has a mailing list at eGroups and a bug collector on SourceForge. The URL for the bug collector is: https://sourceforge.net/bugs/?group_id=1083 cheers, Chris ___ 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] Repost: zzLocale problems
After installing zzLocale I get an "AttributeError" every time I try to add a ZGadfly Connection: -- Traceback (innermost last): File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_addZGadflyConnectionForm) File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_addZGadflyConnectionForm) File C:\PROGRA~1\WebSite\lib\python\Products\ZGadflyDA\__init__.py, line 131, in manage_addZGadflyConnectionForm (Object: Traversable) File C:\Programme\WebSite\lib\python\Products\zzLocale\zzLocale.py, line 119, in __call__ (Object: addConnectionForm) AttributeError: dft_addConnectionForm -- Right now I don't have the time to go take a deeper look at this (or isn't it that deep?), so I tried to DE-install zzLocale, just for now. Well: Zope(Win2k :-() won't work without it anymore!!! What I did was remove the product through the product management screen, then deleting the folder "Locales" in lib/python and the folder "zzLocale" in lib/python/Products and then restart Zope. Actually just vice versa of what I did when installing it... -- 2000-08-31T13:35:20 ERROR(200) ZODB Couldn't load state for '\000\000\000\000\00 0\000\000\006' Traceback (innermost last): File C:\PROGRA~1\WebSite\lib\python\ZODB\Connection.py, line 447, in setstate ImportError: No module named zzLocale.zzLocale Traceback (innermost last): File "C:\Programme\WebSite\z2.py", line 554, in ? exec "import "+MODULE in {} File "string", line 1, in ? File "C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py", line 144, in ? OFS.Application.initialize(c) File "C:\PROGRA~1\WebSite\lib\python\OFS\Application.py", line 317, in initial ize app.Control_Panel.initialize_cache() File "C:\PROGRA~1\WebSite\lib\python\ZODB\Connection.py", line 447, in setstat e state = unpickler.load() ImportError: No module named zzLocale.zzLocale -- Who can help me with either one of the problems? (let me deinstall zzLocale or fix the gadfly creation error) TYVMIA, Danny ___ 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] Help with calcualtions in DTML
"Dario Lopez-Kästen" wrote: Hello! I have the following listing of objects in my folder: table tr tdpbName/b/p/td td align="right"pbSize/b/p/td td align="right"pbdate/b/p/td /tr dtml-in expr="doc.objectValues()" tr td pa href="dtml-var absolute_url"dtml-var id/a/p /td td align="right" pdtml-var get_size bytes/p /td td align="right" pdtml-var bobobase_modification_time fmt="%Y-%m-%d %H:%M"/p /td /tr /dtml-in /table you might want to grab a copy of the ZQR which goes through most of the zope's methods and syntax. http://www.zope.org/Members/ZQR get size in kbs assuming its an int dtml-var "get_size/1000" this should do the formatting (tested) dtml-let x="_.str(get_size/1000)" dtml-if "_.len(x)3" dtml-var "'%s %s'%(x[:-3], x[-3:])" dtml-else dtml-var x /dtml-if /dtml-let the time stuff dtml-var "bobobase_modification_time().toZone('GMT+2')" It gives me the name of the object, the size in bytes and the modification time in GMT. there is also a way to set this to be local time(your zope that is) to sleepy to remember or look it up... try searching the mailing lists... although i'm sure someone will chime in. I need to do the following: express the size in kb, format the output with spaces for thousands. I also need the date displayed according to my locale (+2 GMT in Sweden) so if bobobase_modification_time is 10:48, I need to show it as 8:48, and on top of that I also need to take dayligth savings into account. How do I do it? The fmt strings are abviously adjusted to US standards, so us ISO-people need to hack our own format strings :-). I know i could calculate the size in KB myself IF I only knew how to get the get_size attribute into a calculation expression (that goes for bobobase_modification_time as well, however this returns as string. How do I get the date as a date?) you might want to check out some of the howtos on DTML stuff, although generally its easier to do complex calculations in a python method. bobobase_modification_time is a method that returns a date time object, its just formatted as a string on the page when you render it. Any help is appreciated and needed. Thank you. /dario PS: has anyone been thinking of renaming bobobase_modification_time to something shorter and more intuitive, like, say, modification_time? it gets my vote. Cheers Kapil ___ 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] dtml-comment doesn't but should!
Jerry wrote: Sure, dtml-comment is meant for "comments", but every programmer needs to disable blocks of code to eliminate factors while debugging. We all abuse comment characters for this purpose, and it works well enough to get the job done. Gotta agree with that!! But in Zope it goes like so: cut the suspect block, paste it into another window (text editor), save the DTML object, test, paste back into DTML, etc. This was the last thing a colleague saw before he refused to have any more to do with Zope. Yeah, it is a pain in the arse... :-( Chris ___ 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] dtml-comment doesn't? Please fix... ;-)
Andrew Kenneth Milton wrote: But then you'd have to parse the contents to find out if the comments are properly nested... Well, the parsing should be pretty simple: 1. find dtml-comment 2. search for /dtml-comment 3. if found: ignore that block of text else if end of text reached: bitch like hell ;-) What's wrong with that? I've looked at this briefly today, and the code inside DT_String.py is recursively ugly... d;) You do surprise me ;-) It doesn't look difficult to provide what you want, but, I'm not motivated enough to fix it either at this stage. d8) Aww... go on, you know you want to really ;-) cheers, Chris ___ 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] dtml-comment yuk...
Dieter Maurer wrote: Chris Withers writes: Is is just me or does stuff inside a dtml-comment get parsed? "dtml-comment" must do a bit of parsing: It must at least recognized "/dtml-comment". well, yeah, but that's not what I meant... Maybe, it wants to recognize nested "dtml-comment" (probably not), then it must look at all tags. that wouldn't be nice ;-( Probably, however, dtml-comment just uses the same parser as every other tag and simply discards its content. Then, naturally, the content of "dtml-comment/dtml-comment" must be as syntactically correct as the content of e.g. "dtml-if/dtml-if". Surely that's a bit inefficient? I hope the contents don't actually get _executed_ and then discarded each time as well... I would expect: patches welcome. Yes, indeed :-) Chris ___ 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] Pages Half Rendering, probably fixed in 2.2?
Dieter Maurer wrote: When I reported the problem, DC immediatedly answered that the problem was already fixed in CVS: the threads were now synchronized. That sounds like it... Maybe, you should take a 2.2 ZServer and use it with your Zope 2.1.6. I do not know, however, whether this will bring up other problems. Guess I'll just have to wait and see if 2.2 makes it go away... cheers, Chris ___ 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: Non-blocking MailHost
Chris Withers wrote: Kapil Thangavelu wrote: i was think about this in regard to doing bulk email, the best i could think of was to response.write and than send the email. no real confirmation but the user gets the page and the mail hopefully gets sent. i was planning on doing this from python with either calls to the mailhost or smtplib. What we really want is a non-blocking MailHost. Anyone know how or want to write one? first, lets gather some requirements... probably best done on a fishbowl wikis... any volunteers?:) what do you mean by non-blocking MailHost, the smtplib.py waits for a reply to see if it should raise an error, but thats it as far as block that i see, i pretty much regard that as nonblocking and proper. if you're looking for send which doesn't check for reply than you could just hack smtplib but i doubt you'd see any performance benefit. assuming that smtplib and Mailhost are nonblocking... then the question becomes how to make it suitable for bulk emails and what are the requirements? do you want a mailhost that isn't connected to via a publishing thread? ie is it a requirement that processing won't affect a zope site and no response will be sent back to zope for messages processed (although an xml-rpc callback is possible). do you want to get respones back for messages you've sent? if this going to be added as a general zope feature its probably best to add some sort of mail queue, that can be added to by other zope objects. this would also avoid the overhead of connecting to the mailserver on every mail send. does it need to be multi=platform? (ie no cron, no popen2) if its for squishdot i guess i can assume the answer to this and my next question are yes. are zope/python solutions preferred? i ask because i've been considering a zope bridge into JServ which has an enterprise capable email system in James (http://java.apache.org/james/) a quick stab at portable implementation outside of zope would bundle a python script to be called by popen2 on Unix or spawnv on Windows that would read a pickle of email data and send it. course its ugly but it would work, could even get fancy and do it with an asyncore. another quick stab, if you assume the existence of xron, you could store email messages to be sent and a list of addrs to which they should be sent and xron it to be sent some other time. one possible (minor) speed improvement depending on the protocol def and the various server implementation is to mantain an open socket to the server as part of the MailHost, or at least maintain for as long as possible before getting a new connection. i need to sleep, i'll brainstorm some more in the morning night Kapil cheers, Chris ___ 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 + Apache + fastcgi + unix socket ..
I tried this on a Redhat 6.1 as far as I remember some time ago, and didn't succeed. It only worked with a tcp-socket. On Mon, 4 Sep 2000, Jørgen Skogstad wrote: Hi there.. Have any1 of you gotten local unix domain socket style access of Zope behind Apache to work? I have not .. and I am running this on Solaris. I see that Apache is trying to access the "file" .. and I presume the request is passed to fastcgi .. but I never see the request in Z2.log. I have fired Zope with socket access .. and configured Fast- CgiExternalServer .. etc. for apache. Anyone have any information about this? Would apriciate any! I have browsed www.zope.org too .. without any success .. ;) Look in the jun-2000 zope-dev mailinglist archives for zope, apache and fastcgi. Mit freundlichen Grüßen Joachim Schmitz AixtraWare, Ing. Büro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 ___ 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] If-Modified-Since problem again?!
Dieter Maurer wrote: [EMAIL PROTECTED] writes: To your image in properites add a string property called Last-Modified with value Wed, 15 Mar 2002 19:02:17 GMT And your broken image problem will disappear. What version of Zope is this with? However, this avoids browser caching of the images (at least until 2002-3-15). I think, disabling the caching is not a good thing. Definitely! By the way, Zope should cope with rounding problems for the "If-Modified-Since" headers. AFAIK, Brian Lloyd fixed this with a pretty generalised try...except in Image.py If stuff is still getting through, we should narrow it down further... A traceback for this would go a long way cheers, Chris ___ 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] Overdue comments on 6-1-Security.stx
Chris McDonough wrote: See (sneak peek) http://www.zope.org/Members/mcdonc/PDG/6-1-Security.stx, section named "The Superuser". No offence meant, but it doesn't do a very good job of explaining _why_ the superuser can't own anything. Well, I think the real problem is that the account that you use to "bootstrap" Zope is named "superuser". If it was named something else like "bootstrapuser" or "fixupuser" or something, I doubt you'd wonder why it couldn't own anything. Well, okay, let me rephrase the question: Why is it bad for the bootstrap user to own anything? It used to be considered okay before Zope 2.2, so was has been changed/discovered that makes this now such a bad idea that despite loads of newbie pain and confusion, it's still worth while/necessary? Come to thing of it, is there a concise description anywhere of what the new rules are WRT to ownership, the logged in user and how 'code' of all the various types is executed? What isn't covered in that document that you'd like to know? Urm, again, no offence ('cos I think the book is aimed at a different audience) but the keyword for me was 'concise'. I did have a look at the document above, but didn't read it 'cos it looked about 10 pages long :-( I'm looking for something closer to 10 _lines_ long, but that may not be possible ;-) cheers, Chris ___ 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] 2.1.6 will be your problem...
"T.J. Mannos" wrote: Yes, I have, and I spent hours tearing apart my site thinking I'd seriously screwed-up when suddenly all my images refused to load. But that was just on my Solaris 2.6 server. PCs and even Macs render my pages beautifully. It's just Netscape Communicator for Solaris that causes a problem. I don't have a clue. Yup, this is 'the Netscape with Images problem' :-( At work: Zope 2.1.6, Sparc Solaris 2.7, Linux Netscape 4.51 Sometimes, images are not shown by Netscape (broken image). No "simple" reload is able to change this, however a "forced" reload lets Netscape show the image correctly. From then on, the image is always shown correctly: by "simple" reload, "forced" reload or directly (served from cache). The strange thing, inside "Image.index_html" the failing "simple" reload and the succeeding "forced" reload look completely identical. At home: Zope 2.1.6, Intel Linux 2, Linux Netscape 4.5 All images are always shown correctly. However, there is no log entry in "var/Z2.log" for about 50 % of the requests that are answered by a 304 response. It is non-deterministic whether a log entry is written or not. This does seem a lot like the "If-Modified-Since problem" in 2.1.6 caused by certain versions of Netscape sending crap header information back to Zope, and zope throwing an exception. IIRC, 2.2 handles this much better... Check these bugs and see if any help: http://classic.zope.org:8080/Collector/1014/view http://classic.zope.org:8080/Collector/1388/view And try it with 2.2 to see if it's still broken... cheers, Chris ___ 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] Missing pictures: what's the error?
William JOYE wrote: I use Apache and Zope 2.1.6 under Linux. In the Apache log, I have notified that http code is always 304 but when pictures are missing in web page the transferred size is '-' and no '0'. If possible, try the system with Zope 2.2. Otherwise, checkout my recent reply to Dieter and also: http://classic.zope.org:8080/Collector/1388/view Hope they help, Chris ___ 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] Tree problems in standard_html_header?
Marcus Schopen wrote: I would also like to put my global navigation method in the standard header, so each document can use it. But I get a strange behaviour (see http://marcus.localguru.de:8080/b3/ ) That wasn't responding... Could you describe the behaviour or any errors you're getting? cheers, Chris ___ 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] Fourth Posting, is this really that difficult or have I been blackballed :)balled :)
Daniel Rusch wrote: not sure what you mean by "subobject adding in your __init__ method" python prod def manage_addfooclass(): x= fooclass() id = 1 self._setObject(id, x) def fooclass: def __init__(): add subobjects here seems like you were adding subobjects to your class in your manage_addfoo when it probably would have been better to add them in your __init__ method Dan Kapil Thangavelu wrote: btw daniel, i've looked at some your postings for the day and i thought i should tell you that most of your problems would go away if you did subobject adding in your __init__ method within your class or in the hook method manage_afterAdd within your class. for future reference. You'd get all the benefits of inheritance. Let manage_add to do just that, instantiate and set a instance of your class. Kapil Kapil Thangavelu wrote: Daniel wrote I've created a folderish product. When I select that product from the available objects list, thus creating an instance of that product, I can create objects like dtml document and dtml method in the new folderish object (very similar to what happens when you instantiate a folder object, you can have a dtml method created in the new folder). The question is why can't I create objects from the Products directory, such as Local File System? The code below works great, I get a dtml document, two folders each with a dtml method in them HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION??? def manage_addSimpleSite(self, id, title='', createNewFolder=0, createEditFolder=0, REQUEST=None): """Add a new SimpleSite object with id *id*. If the 'createNewFolder' and 'createEditFolder' parameters are set to any true value, an 'New sub Folder' and an 'edit sub Folder' objects are created respectively in the new SimpleSite. """ ob=SimpleSite() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addDTMLDocument(id='index_html', title='') if createNewFolder: if (user is not None) and not ( user.has_permission('Add User SimpleSites', self)): raise 'Unauthorized', ( 'You are not authorized to add User SimpleSites.' ) ob.manage_addFolder(id='New'+id, title='', createPublic=1) if createEditFolder: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addFolder(id='Edit'+id, title='', createPublic=1) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) a couple of things. A. you're not being blackballed. when you're posting to the list its hard to help without specifics. you're posting above, would be better with a traceback of code that does attempt to instantiate a product. which leads to B. how are you attempting to instantiate your other products. example code of what you're trying to do would be helpful. are you doing it the same as adding folders like above... i have no idea... C. seems like you're doing this in python. the code below should work fine. from Products import LocalFS in manage_add: id = 'foo' ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in LocalFS id2 = 'foo2' ob = yourproduct(id2) ob._setObject(id , ob2) in __init__ or manage_afterAdd id ='foo' ob = LocalFS.LocalFS(id) self._setObject(id, ob) ___ 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 -
[Zope] 2.1.6 Image problem again?
"Felipe E. Barousse Boué" wrote: Has anyone seen the following behavior: I am using PCGI with Zope 2.1.6 and Apache 1.3.9. Everything works fine except when reloading the same page, the graphics in it are not "painted" by the client browser. Try the patch in the following: http://classic.zope.org:8080/Collector/1388/view Nevertheless, the graphic is never rendered. Weirdly this happens on IE 5.0, Netscape 4.75 and StarOffice 5.2. All browsers do have at least 5 MB of disk cache and 3 MB of memory cache. This confirms the problem lies on Apache itself. Am I right? That said, if that patch stops this happening for these browsers, then I think Zope has a problem that needs fixing. Can you try Zope 2.2.1 in the same situation and see if you still get the same problems? cheers, Chris ___ 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.org Mirroring
Erik Enge wrote: It might not be interesting, but what I would really like is a complete mirror of documentation and products up and running all the time. That could be done statically, even without Zope if it sucks that much. (Although, I can't see why it would in such a situation.) You misunderstand how Zoep sucks ;-) The problem is making the mirror. I've seen quite a few postings describing how the common mirroring tools don't do a very good job of mirroring Zope sites, because of things like that BASE tag abomination and the confusion about what objects a file-system like 'folders' and what objects aren't. Anyone knwo of a tool that _does_ mirror Zope well? cheers, Chris ___ 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] Images slow nor not rendering?
Pierre-Julien Grizel wrote: I have some images on my pages (let's say 10 - not a lot), rendered either by dtml-var or a manual IMG tag. When I render the page on some of my LAN boxes (especially with IE), some images doesn't load at the first time. I need to reload the page to make them appear. When I monkeyly hit the 'F5' key, some images do not show again. Argl. Anoying What version of Zope are you using? What version(s) of what browser(s) are you using? cheers, Chris ___ 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] dtml-comment doesn't? Please fix... ;-)
+---[ Chris Withers ]-- | Andrew Kenneth Milton wrote: | But then you'd have to parse the contents to find out if the comments are | properly nested... | | Well, the parsing should be pretty simple: | 1. find dtml-comment | 2. search for /dtml-comment Or dtml-comment | 3. if found: | ignore that block of text |else if end of text reached: | bitch like hell ;-) | | What's wrong with that? It's wrong :-) dtml-comment crap more crap dtml-comment Lots of crap /dtml-comment /dtml-comment In order to parse that fragment, you need to parse the blocks in case you find another opening block, so that you can recursively process comments. | I've looked at this briefly today, and the code inside DT_String.py is | recursively ugly... d;) | | You do surprise me ;-) | | It doesn't look difficult to provide what you want, but, I'm not motivated | enough to fix it either at this stage. d8) | | Aww... go on, you know you want to really ;-) Now you know the problem domain, it shouldn't be hard for you to create a cut-down equivalent of the DT_String parser that only parses comment blocks. Take you less time than writing these emails I'm sure d;) -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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 )
Re: [Zope] dtml-comment doesn't? Please fix... ;-)
Andrew Kenneth Milton wrote: | What's wrong with that? It's wrong :-) dtml-comment crap more crap dtml-comment Lots of crap /dtml-comment /dtml-comment In order to parse that fragment, you need to parse the blocks in case you find another opening block, so that you can recursively process comments. Yeah, fair point... | It doesn't look difficult to provide what you want, but, I'm not motivated | enough to fix it either at this stage. d8) | | Aww... go on, you know you want to really ;-) Now you know the problem domain, it shouldn't be hard for you to create a cut-down equivalent of the DT_String parser that only parses comment blocks. You obviously have a better understanding of DT_String than me and so would be much better suited to the task ;-) Good luck, we're all rootin' for ya :P Chris PS: Take you less time than writing these emails I'm sure d;) Er... no! ___ 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] Images slow nor not rendering?
Chris Withers wrote: Pierre-Julien Grizel wrote: I have some images on my pages (let's say 10 - not a lot), rendered either by dtml-var or a manual IMG tag. When I render the page on some of my LAN boxes (especially with IE), some images doesn't load at the first time. I need to reload the page to make them appear. When I monkeyly hit the 'F5' key, some images do not show again. Argl. Anoying What version of Zope are you using? What version(s) of what browser(s) are you using? cheers, Chris Hi, I've got the problem with Zope 2.1.6 on a FreeBSD box. In fact, IE AND NS are affected (all versions, 3, 4, 5...), while NS less frequently than IE (???). Many thanks, P.-J. ___ 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] Images slow rendering problem
What IE browser are you using? What version of Zope? A similar sort of problem was once traced to a Y2K problem with IE but the new versions of Zope (2.1.6) should be able to handle the problem gracefully now. On Mon, Sep 04, 2000 at 10:13:33AM +0200, Pierre-Julien Grizel wrote: Hi, I already posted this message several monthes ago, expecting a new Zope version would fix the problem, but... I have some images on my pages (let's say 10 - not a lot), rendered either by dtml-var or a manual IMG tag. When I render the page on some of my LAN boxes (especially with IE), some images doesn't load at the first time. I need to reload the page to make them appear. When I monkeyly hit the 'F5' key, some images do not show again. Argl. Anoying The problem is worst ever through Internet. Any clues ? Is it a Zope images rendering problem ? -- Andres Corrada-Emmanuel Email: [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 )
Re: [Zope] Non-blocking MailHost
[EMAIL PROTECTED] wrote: Out of curiosity, what exactly is a non-blocking MailHost? One that doesn't hold up the process that is rendering the page... cheers, Chris ___ 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] (no subject)
Hi all, I am getting the following error when i try to install the portal toolkit with the ' experimental login manager support'. I am using the zpatterns version : ZPatterns-0-4-1snap1and demo portal : 0.8.2 and other products. If I create the portal with no initail member then i am able to have a portal with login manager support. But then after I have installed the portal I am unable to add a member. ?? Can i have a working snapshot of the portal toolkit with the login manager for a windows version or probably a direction as to how to go abt fixing the above problem?? -neeloy = Error Type: NameError Error Value: client File C:\Program Files\WebSite\lib\python\Products\ZPatterns\DataSkins.py, line 377, in _v_currentSheets (Object: wqeqw) NameError: (see above) = Traceback (innermost last): File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 222, in publish_module File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\PROGRA~1\WebSite\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: RoleManager) File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\PROGRA~1\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: Portal_add) File C:\PROGRA~1\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: Portal_add) File C:\PROGRA~1\WebSite\lib\python\OFS\DTMLMethod.py, line 167, in __call__ (Object: Portal_add) File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: Portal_add) File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_With.py, line 146, in render (Object: Portal.createInObjectManager(REQUEST['id'], REQUEST)) File C:\PROGRA~1\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval (Object: apply_wizard(REQUEST)) (Info: REQUEST) File string, line 0, in ? File C:\Program Files\WebSite\lib\python\Products\PTKDemo\Portal.py, line 261, in apply_wizard (Object: DemoPortalBase) File C:\Program Files\WebSite\lib\python\Products\Membership\PersistentUserSource.py, line 63, in setMemberProperties (Object: wqeqw) File C:\PROGRA~1\WebSite\lib\python\OFS\PropertySheets.py, line 607, in __getitem__ (Object: Traversable) File C:\Program Files\WebSite\lib\python\Products\ZPatterns\PropertySheets.py, line 11, in __propsets__ (Object: Traversable) File C:\Program Files\WebSite\lib\python\Products\ZPatterns\DataSkins.py, line 377, in _v_currentSheets (Object: wqeqw) NameError: (see above) ___ 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] Catalog AND Zieve
Hi Jean-Francios, You need to give Zieve a list of objects that have the attributes that you want to sort on defined. You can ether build a list of 'real results' from the ZCatalog that can then be passed to your Zieve, or you can just make sure the ZCatalog's 'meta_data_table' has all the attributes you might want to sort on. I haven't been following all the changes, but I think that the newer 'dtml-in .. ' may now support dynamic sorting... I'm sure I saw some patches about this... I don't know off hand if they've been incorporated into Zope-2.2.1, but I'll check... -steve "Menard" == Menard Jean-Francois [EMAIL PROTECTED] writes: Menard I'm trying to use the Zieve product with my Catalog to Menard sort the results on a variable key. Since the Catalog do Menard not return the actual objects, how can I use Zieve with Menard it? Menard Maybe an external method returning the object list? Menard If so, how shold I do that? Menard Jean-François Ménard Intranet DPAS Pratiques d'affaires et Menard orientations * (514) 840-3000 poste 3939 * (514) 840-5585 Menard * [EMAIL PROTECTED] * 855 Ste-Catherine Menard est, 6e étage Montréal, Qué. H2L 4P5 Menard ___ Zope Menard maillist - [EMAIL PROTECTED] Menard http://lists.zope.org/mailman/listinfo/zope ** No cross Menard posts or HTML encoding! ** (Related lists - Menard http://lists.zope.org/mailman/listinfo/zope-announce Menard 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] Regaining lost privileges
Andrew Kenneth Milton writes: Is there anyway to regain 'root' privs from inside a zope product? Using the -u flag to start causes the privs to be permanently gone because z2.py uses setuid + setgid (and python doesn't seem to define sete[ug]id, at least not on my system). Other than running zope as root permanently (which I really would like to avoid), does anyone have any quick ideas on how to achieve this? The same trick could be used by any process to gain root privileges It is easy to implement a Python wrapper for the sete[ug]id. 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] Non-blocking MailHost
One way to start an asynchronous job in Zope is with the Xron product. Instead of sending the email, you create a Xron scheduled method to perform that task. If you specify a trigger time of "now" (or any time in the past), the scheduled method will execute (almost) immediately in a separate Zope thread. Or you could specify a later time for all emails, thereby effectively batching them. You can store as much context as you need in the acquisition path or properties of the scheduled method. Anything written to STDOUT by the scheduled method will be stored in the log file, so you can easily log any problems with sendmail. http://www.zope.org/Members/lstaffor/Xron -- HTH -- Loren - Original Message - From: "Richard Taylor" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: September 04, 2000 08:11 AM Subject: Re: [Zope] Non-blocking MailHost I think what people have in mind (correct me if I am wrong) is something that will accept messages (for posting to the mailhost at some time in the future) and then immediately return. I guess it would spawn another process/thread to do the posting asynchronously. The problem, as I see it is how to handle an error with the posting. The user who submitted the mail is now long gone so it must be left to an administrator to pick up the pieces. Perhaps the posting routine could accept a user (developer) provided exception handler that gets called if a posting fails. It maybe better to just hand this off to a completely separate program rather than try to handle it within a zope thread. Richard [EMAIL PROTECTED] writes: Chris, Out of curiosity, what exactly is a non-blocking MailHost? On Mon, Sep 04, 2000 at 09:31:15AM +0100, Chris Withers wrote: What we really want is a non-blocking MailHost. Anyone know how or want to write one? ___ 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] Squishdot/Swishdot RFCs
Hi, I've just posted a set of articles relating to the future of Squishdot and Swishdot on http://www.squishdot.org which I'd really like to get lots of feedback on. Could anyone interested please pop along and comment? cheers, Chris ___ 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] Not like ASP complaint - any good answers
Sean McGrath wrote: All, I have had a number of e-mails from developers using Microsoft ASP in recent days. The paraphrased consensus in the e-mails is that the external methods/python methods approach to mixing markup with code in Zope is more clunky than in ASP where you can intermingle the two at will. Has anyone written anything on this topic I could point them to? asp+ (the next version of asp) will be following Zope's lead of template style setups, seperating code from content. I don't have the release handy, but I saw it last week or so. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] How does one rename document ids?
Hi, I have a number of dtml documents without the form "name_html". I would like to rename everything in a particular folder to name_html from name. Is there a way to do this? Thanks ___ 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] Way to list vocabulary words specific to a page?
Kevin Smith writes: I am interested in showing the vocabulary words indexed for the page being viewed, to be used as meta keyword data. Is this possible? Zope does not manage vocabulary words on a page basis. Therefore, you cannot simply ask: "give me the words for this given page". With some effort, you can emulate ZCatalogs word splitting: given an object, "o", and an attribute, "a", to be indexed, ZCatalog first determines "o"s "a" value: val= getattr(o,a) if callable(val): val= val() The resulting string is then fed to a C implemented module called "Splitter" which splits the text into a sequence of words. It is this sequence, you are interested in. You will probably need to write an external method. You will find the relevant code in "SearchIndex.UnTextIndex". 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] Migrating passwords from Apache to Zope?
Marcin Kasperski writes: Is it possible to smoothly migrate accounts and passwords from Apache to Zope? More details: I keep Apache accounts in some file of the format username:encoded_password where username is plaintext username and encoded_password is the password encoded in the normal Unix way (via crypt function) There is a GUF (Generic User Folder) HowTo that explains how to use encryted passwords in the same way as you do. After you have set up GUF (very good explanation in the HowTo), all you need to do is place your "username,password" pairs into the database. A small Python script can be used for this. It probably would use the DB Api to control the database. 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] How to access id and title of document calling standard_html_header
Tim Hicks writes: I have a standard_html_header that is inserted into Zclasses. These Zclasses have properties including meta_author ... In standard_html_header, I use code such as dtml-var meta_author ... This works fine and the properties of the *zclass* are inserted. However, if I put dtml-var id into the standard_html_header, I get the id of standard_html_header, *not* of the zclass. When I do this, I get the id of the Z class instance. It should be impossible to get the id of the *standard_html_header*, if this header is a DTML *method* (rather than document) as you told us in a different message. Because we see different things, we need to describe carefully, what we do. Apparently, we do not do the same. I have a folder-like ZClass, say ZC, and an instance of this class, say ZI. ZC has a method, say M, using "standard_html_header". "standard_html_header" is a DMTL method (!) rendering "id". When I open "ZI/M", "standard_html_header" renders "ZI", i.e. ZI's id. The same happens, if "standard_html_header" is not in ZI but a ZC method. Now, it is your turn to describe precisely, what you are doing. 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] Images slow rendering problem
Pierre-Julien Grizel writes: I already posted this message several monthes ago, expecting a new Zope version would fix the problem, but... I have some images on my pages (let's say 10 - not a lot), rendered either by dtml-var or a manual IMG tag. When I render the page on some of my LAN boxes (especially with IE), some images doesn't load at the first time. I need to reload the page to make them appear. When I monkeyly hit the 'F5' key, some images do not show again. Argl. Anoying The problem is worst ever through Internet. I, myself, have seen a very similar problem -- with Netscape 4.5.1 under Solaris 2.7. I tried to analyse it, but failed. I can say, that is was *not* the Netscape image bug (Netscape sends If-Modified-Since headers with two year digits). Inside Zope's "OFS.Image.File.index_html" everything looks fine. 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] .
-- - 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 )
Re: [Zope] dtml-comment doesn't? Please fix... ;-)
+---[ Kip Rugger ]-- | | [snip] | | dtml-if "0" | crap | more crap | dtml-if "0" | Lots of crap | /dtml-if | /dtml-if | | by analogy with the common practice of #if 0 in C Won't work, the container will still be parsed for correctness at 'save' time. The problem isn't getting nested comments per se, we already have that. The problem is to completely ignore the contents of the comment tag whilst still allowing nested comments. Th second part of the problem is that ChrisW(hinger) really wants it, but, doesn't want to do what is necessary to do it. So the problem is simplified to not actually doing anything except talking about doing it. d8) Thankyou for playing d8) -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[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 )
Re: [Zope] Fourth Posting, is this really that difficult or have Ibeen blackballed :)balled :)
One thing to remember about using __init__ to add subobjects: during __init__, you don't have access to any acquired objects. This is probably the main rationale for manage_afterAdd, and is the reason manage_afterAdd is so useful. There are a lot of dependencies on acquisition even in the Zope core, so when things fail during your __init__ method, suspect acquisition dependence. On Sun, 3 Sep 2000, Kapil Thangavelu wrote: Daniel Rusch wrote: not sure what you mean by "subobject adding in your __init__ method" python prod def manage_addfooclass(): x= fooclass() id = 1 self._setObject(id, x) def fooclass: def __init__(): add subobjects here seems like you were adding subobjects to your class in your manage_addfoo when it probably would have been better to add them in your __init__ method Dan Kapil Thangavelu wrote: btw daniel, i've looked at some your postings for the day and i thought i should tell you that most of your problems would go away if you did subobject adding in your __init__ method within your class or in the hook method manage_afterAdd within your class. for future reference. You'd get all the benefits of inheritance. Let manage_add to do just that, instantiate and set a instance of your class. Kapil Kapil Thangavelu wrote: Daniel wrote I've created a folderish product. When I select that product from the available objects list, thus creating an instance of that product, I can create objects like dtml document and dtml method in the new folderish object (very similar to what happens when you instantiate a folder object, you can have a dtml method created in the new folder). The question is why can't I create objects from the Products directory, such as Local File System? The code below works great, I get a dtml document, two folders each with a dtml method in them HOW CAN I CREATE A LOCAL FILE SYSTEM OR ANY OTHER OBJECT FROM THE PRODUCTS DIRECTORY IN THIS MANAGE_ADD FUNCTION??? def manage_addSimpleSite(self, id, title='', createNewFolder=0, createEditFolder=0, REQUEST=None): """Add a new SimpleSite object with id *id*. If the 'createNewFolder' and 'createEditFolder' parameters are set to any true value, an 'New sub Folder' and an 'edit sub Folder' objects are created respectively in the new SimpleSite. """ ob=SimpleSite() ob.id=id ob.title=title self._setObject(id, ob) try: user=REQUEST['AUTHENTICATED_USER'] except: user=None ob.manage_addDTMLDocument(id='index_html', title='') if createNewFolder: if (user is not None) and not ( user.has_permission('Add User SimpleSites', self)): raise 'Unauthorized', ( 'You are not authorized to add User SimpleSites.' ) ob.manage_addFolder(id='New'+id, title='', createPublic=1) if createEditFolder: if (user is not None) and not ( user.has_permission('Add Documents, Images, and Files', self)): raise 'Unauthorized', ( 'You are not authorized to add DTML Documents.' ) ob.manage_addFolder(id='Edit'+id, title='', createPublic=1) if REQUEST is not None: return self.manage_main(self, REQUEST, update_menu=1) a couple of things. A. you're not being blackballed. when you're posting to the list its hard to help without specifics. you're posting above, would be better with a traceback of code that does attempt to instantiate a product. which leads to B. how are you attempting to instantiate your other products. example code of what you're trying to do would be helpful. are you doing it the same as adding folders like above... i have no idea... C. seems like you're doing this in python. the code below should work fine. from Products import LocalFS in manage_add: id = 'foo' ob2 = LocalFS.LocalFS(id) # check the exact calls to __init__ in LocalFS id2 = 'foo2' ob = yourproduct(id2) ob._setObject(id , ob2) in __init__ or manage_afterAdd id ='foo' ob = LocalFS.LocalFS(id) self._setObject(id, ob) ___ 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
Re: [Zope] supplemental group ids (Linux)
Aplogies for the ignorance, but can you maybe explain the concept of supplemental group ids and give an example of how the current unpatched behavior could be subverted? On 4 Sep 2000 [EMAIL PROTECTED] wrote: I noticed when starting Zope as root (to get privilaged ports), but requesting suid to `nobody' (start -u nobody) the resulting processes have the correct uid and gid, but the supplemental group id list still has the appropriate value for root. This means that the Zope process could, for example, write to files that may belong to root. It's not clear whether this deserves a bug report, so I though I'd ask here instead. The fix is easy (and very lightly tested): 1) grab and install the supplemental gid package (for python) http://www.ccraig.org/software/group.c 2) patch (for 2.2.0) --- z2.py.origFri Jun 30 10:23:53 2000 +++ z2.py Mon Sep 4 14:33:51 2000 @@ -682,13 +682,20 @@ if type(UID) == type(""): uid = pwd.getpwnam(UID)[2] gid = pwd.getpwnam(UID)[3] +uname = UID elif type(UID) == type(1): uid = pwd.getpwuid(UID)[2] gid = pwd.getpwuid(UID)[3] +uname = pwd.getpwuid(UID)[1] else: raise KeyError try: if gid is not None: +try: +import group +group.initgroups(uname, gid) +except: +pass try: os.setgid(gid) except OSError: ___ 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 ) Chris McDonough Digital Creations, Publishers 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] Underscore Caracter
Hi Marcus, This is untested. Turn "asd asd" into "asd_asd" and output: dtml-var "_.string.join(_.string.split('asd asd'), '_')" Turn "asd_asd" into "asd asd" and output: dtml-var "_.string.join(_.string.split('asd_asd', '_'))" On Sun, 3 Sep 2000, Marcus Mendes wrote: Hello, I need replace 0x20 (space caracter ) to Undescore Caracter. I need also a function that UNDO this operation. How can I to do this in DTML sintaxe? Chris McDonough Digital Creations, Publishers 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] Folder and SQL security
On Tue, 5 Sep 2000, George Osvald wrote: My sql works now and security is satisfactory so thank you. The only thing that remains in question is that one subfolder. I created a user folder inside, set all the security and it does not do what I want. I want to restrict any access including viewing for nobody. Only authorised customers would be able to view the page. After turning off all the security options though I am still able to view the pages as nobody. How do I prevent that? Do you have "acquire permissions" set on all the permissions of the folder? Have you tried turning it off? This may be a wild goose chase because I'm sort of guessing at your problem. Your message has generalizations like "that one subfolder" (what subfolder? what are its settings?), "set all the security" (how?), "does not do what I want" (what do you want? exactly how does it fail, can you give a concrete example?) and "the page" (what page?). It'd be helpful to define these, because as much as I try, I can't read minds. :-) HTH, C George wrote: Security in ZOPE is very puzzling. If I have certain rules set for the root folder, can I set something different for the sub folders? Sure... for general security information see both http://www.zope.org/Members/michel/ZB (the Zope book security chapter, mostly finished) and http://www.zope.org/Members/mcdonc/PDG (security chapter mostly finished). Any changes seem to have no effect at all. can you be more specific? I am especially wandering about setting for anonymous user. I'd like to give them only 'viewing' privilege but that does not work. How doesn't it work? The site is not functional at all and asks for the password even for the viewing. Then I enable 'access the content' and the site works as long as I do not try to use sql. Yes, "access contents information" is equivalent to allowing the user to list the objects in an object manager. It's given to anonymous by default most of the time, and is probably required for most operations. When I how ever enable 'use sql methods' permission they can access my database, delete and add entries to it. This should have nothing to do with 'access contents information'. There should be permissions available to restrict the use of sql methods. Have you seen them? What do I have to do to allow anonymous viewers to just view the site Give them "view" and "access contents information" permissions. Depending on the products you've got installed and the operations you want the users to be able to carry out, you may need to give them other permissions. (keep in mind that I am using a couple of zsql methods for embedding of data in my html) I also want to have one of the sub folders not accessible to any one but me. Can you help anyone? Chris McDonough Digital Creations, Publishers 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] newbie question: installing ZSiteMap and ZPhotoAlbum
Tamara Temple wrote: Hi all, My first posting here, please forgive if this is obvious, cause it isn't to me. I already checked the How-To's and searched the zope-list archives and came up with nothing. I downloaded the two zexp files for ZSiteMap and ZPhotoAlbum, and put them in the import directory. When I try to import them, I get an error and a traceback saying that "this operation isn't support by ZSiteMap" (or ZPhotoAlbum, depending). There are no instructions with either one on how to install them. What do I need to do in order for these to work? You have to import products into the Control Panel - Products folder. -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Java applet with inner classes causing probs in Zope
Hello all, The problem is that inner classes have names like "Parent$Inner.class" I'm unable to create a Zope file object with a name that includes the dollar sign. However, the applet won't function without it. Has any one overcome this? Yes, the applet functions properly when served from apache (but I need to serve it from Zope). Please respond directly to me and mailing list as I am not currently on the mailing list. Thanks, Eric. ___ 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] Arrrgh!!! *Weird* SQLSession problem
Ok, all weekend I've been chasing my tail. Now I scream for help... I cannot get SQLSession to insert values into the zsession_data table to save my freeking life. I'm not getting errors of any kind, just no inserted session data. However, the zsessions table shows the sessions being created, so that table is working ok. I mangled the SQL syntax for sqlSetValue, *then* I got a pg. error, so sqlSetValue *is* running, yes? I installed Logger and logged the values from sqlSetValue to the zope log. I cut and pasted those values from the log into the test query screen for sqlSetValues and when I submit the query it inserts just fine. At that point I can see the manually inserted values from session_test.dtml, so sqlGetValues is working. But if I try to insert values with session_test, they show up in the very next screen, but are gone thereafter and of course they do not show up in the database. I'm really at quite a loss here. I made sure to give SQLSession its very own ZPyGresQLDA connection. After beating on that unsuccessfully for awhile, I installed ZPoPyDA, and set SQLSession to use that, which of course didn't change anything. Here's the version particulars: Zope version: Zope 2.1.6 (source release, python 1.5.2, linux2) Python version: 1.5.2 (#1, Sep 17 1999, 20:15:36) [GCC egcs-2.91.66 19990314/Linux (egcs- System Platform: linux-i386 ZPyGreSQLDA 0.3 ZPoPyDA 0.5.1 PoPy 1.3.2 beta SQLSession 0.3.0 PostgreSQL 7.0.2 Other installed products (if it matters...): ZPyGreSQLDA Fortune Calendar Logger Photo ZPatterns Confera LoginManager SQLSession ZPoPyDA WorldPilot iTrack Mild rant: I've got a big, scary, and now behind schedule database-enabled website to build for a client. Most everything I've read, and even my earlier, simpler experiences with Zope have been fantastic. I've been going on to my client about how great Zope is, rapid deployment, etc, blah. So I committed, but after fighting with LM (It took weeks to get it working once and I have not been able to duplicate that feat since), a failed upgrade to Zope 2.2 (LM wouldn't work there yet(?), doh!), and now SQLSession... I'm *not* having an overall good feeling about all this. I'm even starting to get thoughts of retreating to Perl or learning PHP3 and never looking back. But I really want to get over what's probably mostly newbie learning curve lack of docs and make this work in Zope. Please help!!! -cw- -- ~ Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer... Visit the Radio For Peace International Website: http://www.rfpi.org/ ~ CLOBBER INTERNET SPAM: See!! http://spam.abuse.net/ Join!! http://www.cauce.org/ ~ QOTD: Failure is not an option. It's bundled with your software. ___ 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] Nevermind? (SQLSession problem...)
In a last, desparate effort I downgraded to SQLSession 0.2.9a and it's working fine. Is this normal? -cw- -- ~ Charlie Wilkinson - [EMAIL PROTECTED] - N3HAZ Parental Unit, UNIX Admin, Homebrewer, Cat Lover, Spam Fighter, HAM, SWLer... Visit the Radio For Peace International Website: http://www.rfpi.org/ ~ CLOBBER INTERNET SPAM: See!! http://spam.abuse.net/ Join!! http://www.cauce.org/ ~ QOTD: Failure is not an option. It's bundled with your software. ___ 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] Managed Meeting semi-broken in 2.2.1
It appears that there has been _some_ change in security somewhere. As Manager, I cannot add a Managed Meeting object in a Zope 2.2.1 server. Nor can someone with the role 'Member', who has been given the neccessary permission. It tells me I don't have uthroization to access 'ManagedMeeting'. Bill -- Do not meddle in the affairs of sysadmins, for they are easy to annoy, and have the root password. ___ 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] Java applet with inner classes causing probs in Zope
[Eric L. Walstad] | Hello all, | | The problem is that inner classes have names like "Parent$Inner.class" | I'm unable to create a Zope file object with a name that includes the dollar | sign. However, the applet won't function without it. | | Has any one overcome this? Adding files to Zope through FTP doesn't seem to have the same restrictions. -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] Render the number of occurrence in a batch
On Fri, 1 Sep 2000, Kapil Thangavelu wrote: Francois-Regis CHALAOUX wrote: How to render the total number of result coming from the search in a ZCatalog even if the batch will be render in several sequences ? Howto render : "Your search contain results" dtml-var "_.len(YOURSEQUENCEGENERATOR)" Or just dtml-var sequence-length while inside the dtml-in, say inside the dtml-if sequence-start block. --RDM ___ 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] Folder and SQL security
On Mon, 4 Sep 2000, George wrote: asks for the password even for the viewing. Then I enable 'access the content' and the site works as long as I do not try to use sql. When I how ever enable 'use sql methods' permission they can access my database, delete and add entries to it. What do I have to do to allow Chris may have pointed you in the right direction, but depending on the complexity of what you are doing you may also need to learn about using proxy roles. This allows you to write a dtml-method that an anonymous user can call, where the dtml-method can accessed privileged functions. Since you control the method code, you thereby control the security of that access and can limit it to just what you need to make the site functional. --RDM ___ 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] supplemental group ids (Linux)
Chris McDonough [EMAIL PROTECTED] wrote: Aplogies for the ignorance, but can you maybe explain the concept of supplemental group ids and give an example of how the current unpatched behavior could be subverted? I can try... Supplemental gids are useful for allowing a user to belong to more than one group, or maybe to more than one project in normal parlance. This is normally effected by listing the uid opposite more than one group in /etc/group. The login process issues the initgroups(3) call to install these supplemental groups, which are inherited by all processes forked from the login shell. The problem is comes when you change user ids; for example what I saw with Zope (start -u nobody) was: before change after change = user id root nobody group idroot nobody sup id(s) root root Thus the process has group access privilages for nobody (correct) and root (bad) in unpatched Zope. I cannot give you an exploit based on this -- my knowledge of Zope is not deep enough -- and in a bug free world there probably would be no exploit. But the reason for running as nobody, I think, is to contain damage should an exploit be found. For that reason, it would seem reasonable to change the supplemental gids too. I saw this on Linux; supplemental groups come from the BSD tradition, so you likely will find the same situation on *BSD, Solaris, etc. ___ 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 )