Re: [Zope] Precondition

2000-08-05 Thread Martijn Pieters

On Fri, Aug 04, 2000 at 10:11:55PM -0400, R. David Murray wrote:
> On Fri, 4 Aug 2000, RC Compaan wrote:
> > What does the "Precondition" property of the file class refer to?
> 
> As far as I can tell from a quick scan of the source, the precondition
> is an object that is called just before the file object is rendered.
> It can raise an exception, in which case the object will not get
> rendered.  I could swear I read that documented somewhere, but I
> can't find it.  Someone should submit a doc patch for the API help
> pane.  I'd do it, but I haven't gotten around to learning how the
> help system works yet so I don't know what file to patch .

  Precondition

  Allows you to specify a precondition for the File. A precondition is a
  method or document which is executed before the File is viewed or
  downloaded. If the precondition raises an exception then the File cannot
  be viewed. 

This is from the Help page presented when you click the 'help' button on the
'Edit' tab of a 'File' object.

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
| ZopeStudio: http://www.zope.org/Products/ZopeStudio
-

___
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] Sybase & Thread

2000-08-05 Thread Nicholas Lo



Hi,I just wonder if anyone can help me with 
my problem. Recently, I've been working on creating a ZOPE product which 
requires periodic access to my Sybase. I have created a thread process using 
the Threading module. There is no problem of periodically wake up the 
thread and print something to the screen. So, I guess I have no problem 
with thread programming under ZOPE. However, when I add some database 
related routines to the thread, problems started to occur. I sometimes got 
'... not connected to the database'. When I did an SQL 'update', nothing has 
been updated on the database server when I actually looked into the database 
using isql. After a whole day of trial & error, now I've got 'ZOPE 
Memory Error'! I just wonder what has gone wrong. I really have no clue and 
my deadline is pressing :(1) I want to know what is the proper way of 
using thread under ZOPE.2) Is there any critical limitation of 
SybaseDAv2?3) Can SybaseDAv2 & Threading live together happily?4) 
What the role of ZODB in such situation?Thanks a million if anyone can 
help!Regards,Nick


Re: [Zope] Zope 2.2 under Debian (Woody) broken?

2000-08-05 Thread Terry Kerr

You only need the siteaccess product if you wish to server multiple domains
from one zope instance.

"Pedro I. Sanchez" wrote:

> Thank you for the hint.
>
> I had purged my old zope (dpkg --purge) but it seems something was still
> there hanging around. I did an "rm -rf /var/lib/zope /usr/lib/zope" and
> reinstalled zope and it worked!
>
> I then tried to install the package "zope-siteaccess" from Woody but it
> depends on zope (>= 2.0.0-2) which is not available :|
>
> I'm sort of new to zope so may I ask, Do I need this "zope-siteaccess"
> package from Woody?
>
> Thank you,
>
> Terry Kerr wrote:
> >
> > Did u upgrade an existing zope instance with the new distribution, or was
> > it a clean install?  Did you install the SiteAccess product?  This sounds
> > like the error you get with an old SiteAccess object in the new zope2.2.
> > You need to upgrade to the new SiteAccess.
> >
> > "Pedro I. Sanchez" wrote:
> >
> > > Hello,
> > >
> > > I installed zope 2.2.0-1 from the Debian (Woody) distribution. No
> > > problems are reported during the installation but when I try to access
> > > http://localhost:9673/ I get the following error:
> > >
> > > Zope Error
> > >
> > > Zope has encountered an error while publishing this
> > > resource.
> > >
> > > Error Type: TypeError
> > > Error Value: unexpected keyword argument: validated_hook
> > >
> > > The same happens when I try to access the management menus.
> > >
> > > Is the Woody package broken? Any ideas?
> > >
> > > Thank you,
> > >
> > > --
> > > Pedro
> > >
> > > ___
> > > 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 )
> >
> > --
> > Terry Kerr ([EMAIL PROTECTED])
> > Adroit Internet Solutions Pty Ltd (www.adroit.net)
> > Phone:   +613 9563 4461
> > Fax: +613 9563 3856
> > Mobile:  +61 414 938 124
> > ICQ: 79303381

--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124
ICQ: 79303381




___
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 2.2 under Debian (Woody) broken?

2000-08-05 Thread Pedro I. Sanchez

Thank you for the hint.

I had purged my old zope (dpkg --purge) but it seems something was still
there hanging around. I did an "rm -rf /var/lib/zope /usr/lib/zope" and
reinstalled zope and it worked!

I then tried to install the package "zope-siteaccess" from Woody but it
depends on zope (>= 2.0.0-2) which is not available :|

I'm sort of new to zope so may I ask, Do I need this "zope-siteaccess"
package from Woody?

Thank you,

Terry Kerr wrote:
> 
> Did u upgrade an existing zope instance with the new distribution, or was
> it a clean install?  Did you install the SiteAccess product?  This sounds
> like the error you get with an old SiteAccess object in the new zope2.2.
> You need to upgrade to the new SiteAccess.
> 
> "Pedro I. Sanchez" wrote:
> 
> > Hello,
> >
> > I installed zope 2.2.0-1 from the Debian (Woody) distribution. No
> > problems are reported during the installation but when I try to access
> > http://localhost:9673/ I get the following error:
> >
> > Zope Error
> >
> > Zope has encountered an error while publishing this
> > resource.
> >
> > Error Type: TypeError
> > Error Value: unexpected keyword argument: validated_hook
> >
> > The same happens when I try to access the management menus.
> >
> > Is the Woody package broken? Any ideas?
> >
> > Thank you,
> >
> > --
> > Pedro
> >
> > ___
> > 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 )
> 
> --
> Terry Kerr ([EMAIL PROTECTED])
> Adroit Internet Solutions Pty Ltd (www.adroit.net)
> Phone:   +613 9563 4461
> Fax: +613 9563 3856
> Mobile:  +61 414 938 124
> ICQ: 79303381

___
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 2.2 under Debian (Woody) broken?

2000-08-05 Thread Terry Kerr

Did u upgrade an existing zope instance with the new distribution, or was
it a clean install?  Did you install the SiteAccess product?  This sounds
like the error you get with an old SiteAccess object in the new zope2.2.
You need to upgrade to the new SiteAccess.

"Pedro I. Sanchez" wrote:

> Hello,
>
> I installed zope 2.2.0-1 from the Debian (Woody) distribution. No
> problems are reported during the installation but when I try to access
> http://localhost:9673/ I get the following error:
>
> Zope Error
>
> Zope has encountered an error while publishing this
> resource.
>
> Error Type: TypeError
> Error Value: unexpected keyword argument: validated_hook
>
> The same happens when I try to access the management menus.
>
> Is the Woody package broken? Any ideas?
>
> Thank you,
>
> --
> Pedro
>
> ___
> 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 )

--
Terry Kerr ([EMAIL PROTECTED])
Adroit Internet Solutions Pty Ltd (www.adroit.net)
Phone:   +613 9563 4461
Fax: +613 9563 3856
Mobile:  +61 414 938 124
ICQ: 79303381




___
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 2.2 under Debian (Woody) broken?

2000-08-05 Thread Chris McDonough

It would seem to be broken you might want to contact the package
maintainer.  I think it's Glyph Lefkowitz?

> -Original Message-
> From: Pedro I. Sanchez [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 05, 2000 10:39 PM
> To: [EMAIL PROTECTED]
> Subject: [Zope] Zope 2.2 under Debian (Woody) broken?
> 
> 
> Hello,
> 
> I installed zope 2.2.0-1 from the Debian (Woody) distribution. No
> problems are reported during the installation but when I try to access
> http://localhost:9673/ I get the following error:
> 
> Zope Error
> 
> Zope has encountered an error while publishing this
> resource. 
> 
> Error Type: TypeError
> Error Value: unexpected keyword argument: 
> validated_hook
> 
> The same happens when I try to access the management menus.
> 
> Is the Woody package broken? Any ideas?
> 
> Thank you,
> 
> -- 
> Pedro
> 
> ___
> 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] Zope 2.2 under Debian (Woody) broken?

2000-08-05 Thread Pedro I. Sanchez

Hello,

I installed zope 2.2.0-1 from the Debian (Woody) distribution. No
problems are reported during the installation but when I try to access
http://localhost:9673/ I get the following error:

Zope Error

Zope has encountered an error while publishing this
resource. 

Error Type: TypeError
Error Value: unexpected keyword argument: validated_hook

The same happens when I try to access the management menus.

Is the Woody package broken? Any ideas?

Thank you,

-- 
Pedro

___
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] Python Class trickyness

2000-08-05 Thread Andrew Kenneth Milton

+[ Erik Enge ]-
| 
| Good evening.
| 
| I know how to make a Python Class, which is a container.  But how do
| I make another Class which can only be added from the container-class
| I have created.  Know what I mean?  The last class should only show up
| in the "Available Objects"-list if the user is in a instance of the
| first class.  Did this make any sense?
| 
| Thanks for any answers.  :-)

This is easier than you might think:-

Step 1: Do not register your 'sub' class(es) in your __init__.py

Step 2: In your container class import your sub class manage_add function(s)
(not sure if this is really needed, but, I do it for completeness).

Step 3: In your container class add:-

meta_types=({'name':'Sub Product', 'action':'manage_addSubProduct'},) # Sub-ob
ject types that are specific to this object

You can add as many as you like...

Step 5: Optionally add a meta_type to your sub class (if you haven't)
Step 6: Optionally add icon='thisIcon.gif" into your sub classes so they get
pretty icons.

Copy over new Product, and Restart Zope :-)

-- 
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 )




[Zope] LoginManager and ZPatterns - Sparse Install Docs, Help.

2000-08-05 Thread Darin Lee

Zopistas,

Maybe I'm making this harder than it needs to be.

I want to set up a membership system for the site I am developing with Zope.
I do not want to "restrict" any part of the site - instead I want a user to
login (at their convenience) and then extend the "menu" options based on
their group membership. If a user is not logged in - no problem, they just
won't be able to view the advanced options - they'll still be able to surf
the site (I want to maintain my user list in an external database as well).

What is the best tool in Zope to accomplish this? After searching the site,
I find there are several products - ACL Users, GUF, and LoginManager. Is GUF
deprecated (The intro tends to give me this feeling)? Is LoginManager the
way to go?

It also appears GUF is more tailored toward restrictive authentication (I've
already perused the "Using GUF with an SQL Database" how-to). I want a user
to login (via HTML form/cookie) whenever they like, and get presented with
additional menu options (based on their AUTHENICATED/GROUP status). Not have
them try to access a "restricted" page (or type "manage") and get a basic
authentication login box to get in.

As far as LoginManager itself is concerned, I assume it requires ZPatterns.
However, the Zpatterns install instructions are *very sparse.*  How do I get
the thing set up? Here's verbatim from the ZPatterns docs:

-
After unpacking the ZPatterns product, you will need to build this [c]
>extension using the included Setup file in the ZPatterns directory.
-

How do I use the "Setup" file?? With the command "python Setup"? It doesn't
say *how* to use it.

-
Please follow the standard procedures for building a Python module on your
platform. (On Unix-ish systems, this usually consists of copying a
Makefile.pre.in to the directory, then doing a make -f Makefile.pre.in boot
>followed by make.
-

What are these standard procedures?? I built Python itself with
"configure|Make|Make install". Where do I get this "Makefile.pre.in" file in
the first place, from my Python src/build directory?? Correct me if I'm
wrong, but there's usually some kind of script file to run that get's things
going, or a "configure" script. I find none of this in the
lib/python/Products/ZPatterns directory after I untarred it.

So, I'm basically stumped. It doesn't appear GUF will do what I need, and I
have failed on multiple attempts to get Loginmanager/ZPatterns installed. If
someone could point me in the right direction on this I sure would
appreciate it.

Thanks much,
-Darin Lee


___
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] DA threading issues (was: server instability: ZODB corruption?)

2000-08-05 Thread Guido A.J. Stevens


If I'm running current stable versions of Zope and Zope-MysqlDA, do I
need to consider threading issues or are these safely abstracted away
in the DA?

"Luis Cortes" <[EMAIL PROTECTED]> writes:

> It may just be the version of Zope you have ( with regard to the Thread
> problem ) there exists a version of zope that was known to cause the thread
> death problem.  You might want to check the patches or upgrade to a good
> version.

I'm running the Debian frozen release, i.e. 2.1.6 with security
patches. Do you have any specific references on the thread problem? I
find nothing on it in the changelogs I've found. Do I need to go to
2.2.0 for this? 

A seach on 'threading problem' turns up a hornet's nest of deep
technical shit. Most of those mails are a year old, is this still an
issue? As a developer, do I need to understand threading issues when
developing database accessing products, or may I safely assume that
threading, locking and transaction semantics are handled between the
Database Adapter and Zope itself?

I found a mail that says I should run Zope single-threaded when using
MySQL: http://lists.zope.org/pipermail/zope/1999-July/006487.html
Checking my installation, I find I have no threading option activated, 
which means I'll be running the default number of 4 threads. What will 
my server performance look like if I reduce this to 1 thread? Not
that I'm having such a wonderful performance now, having my pager go
off every hour :-(

Is there a way to allocate different threads to different SiteRoot
virtual websites, so I can lock a single site in a single thread but
let my installation as a whole still retain some multi-threading
performance?

:*CU#
-- 
***Guido A.J. Stevens  ***mailto:[EMAIL PROTECTED]***
***Net Facilities Group***tel:+31.43.3618933***
***Postbus 1143***fax:+31.43.3560502***
***6201 BC  Maastricht ***http://www.nfg.nl ***

Cyberspace is portrayed as some strange realm inside the network,
in a theoretical realm, or in some utopia. The concept of
being-in-the-world brings us back to the significance of
everyday involvement in keyboards, desks, monitors, cables,
workstations, and practices...
[Coyne, ISBN 0-262-03228-7, p.168]

___
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] Problems adding Properties to ZClass

2000-08-05 Thread Erich Seifert

Hi,

I'm having problems with adding Properties to a ZClass propertysheet.
I always get an IndexError (no traceback, sorry) when I've hit the Add button.
There are no special characters in the name ('Daten').
Does someone know what could be the problem?

Thanks in advance
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] (Fwd) Re: [Zope] Pluggable brains aren't seen by first-nnn in - SOLUTION

2000-08-05 Thread Brad Clements

On 4 Aug 2000, at 22:10, Dieter Maurer wrote:

> Brad Clements writes:
>  > However first-eventday is ALWAYS true, however when I print &dtml-
>  > eventday; the output value is always the same for each row, so first-
>  > >
>  eventday shouldn't be true on any row except the first.
> 
> Almost surely, the "in" tag does not call a callable object
> (because it does not expect, they could be callable).
> You, therefore, get the method itself.
> It is identical for all records.


So true, the solution is to define an __init__ class in the brain class,
then use that to populate "self".

class   PackageEvent:
"""Package Event Pluggable Brain"""
def __init__(self):
"""initialize"""
self.__dict__['eday'] = self.eventday()

def eventday(self):
return
DateTime(apply(time.mktime,self.eventtime.tuple()[:3]+(0,0,0,0,0,-1
)))


Now 'first-eday' works.


Brad Clements,[EMAIL PROTECTED]   (315)268-1000
http://www.murkworks.com  (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com   AOL-IM: BKClements

___
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 attachments?

2000-08-05 Thread Phil Harris

All,

Doing the text pulling from COM is *SLOW* to say the least,  You'd probabnly
be better converting them to RTF and then using something like OmniMark to
convert to XML.

That way you'd have the best of both worlds, including something you can
render to HTML when zDOM/zXSLT becomes a reality.

I already do this and it's fast enough at the conversion, a 500k doc takes
about 2 seconds.

hth

Phil
[EMAIL PROTECTED]
- Original Message -
From: Dieter Maurer <[EMAIL PROTECTED]>
To: Simon Coles <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, August 04, 2000 9:06 PM
Subject: Re: [Zope] ZCatalog attachments?


> Simon Coles writes:
>  > We have binary files stored in Zope, for example Word documents (but
>  > could be any of a variety of document types).
>  >
>  > We would like to be able to index and search the contents of these
>  > files using ZCatalog. So if a Word file contains the word "Fred",
>  > then any search for "Fred" would include that file in the list of
>  > documents returned.
> Someone else already told you, that you must create a parameterless
> method (it need not necessary be named "PrincipiaSearchSource")
> that returns the files content.
>
> You may not need to keep the rendered version around but
> may be able to extract the plain text on demand.
> I think, there is a "word.dll" that provides access to
> MS Word from applications. Alternatively, you could
> control Word via COM.
>
>
> 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 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] Python Class trickyness

2000-08-05 Thread Erik Enge


Good evening.

I know how to make a Python Class, which is a container.  But how do
I make another Class which can only be added from the container-class
I have created.  Know what I mean?  The last class should only show up
in the "Available Objects"-list if the user is in a instance of the
first class.  Did this make any sense?

Thanks for any answers.  :-)

___
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] Troubles with ZOracleDA successfully resolved

2000-08-05 Thread Pedro Vega

All the problem was an permissions issue;

Pedro Vega


___
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] riddle me this Batman, coded copy/paste syntax?

2000-08-05 Thread Darran Edmundson


The Zope quick reference lists the following methods
for the stock folder object:

   manage_copyObjects(self, ids, [REQUEST, RESPONSE])
   manage_cutObjects(self, ids, [REQUEST])
   manage_delObjects(self, [ids, REQUEST])
   manage_pasteObjects(self, [cb_copy_data, REQUEST])

For the life of me I can't get copy|cut and paste
to work even for the simplest of examples.  I've
tried snippets like the following (embedded within
a DTML method in a folder) but to no avail:

  
  

  
  

Can someone shed some light on my misunderstanding?

Cheers,
Darran.


___
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] Using MailHost with an SMTP server that wants authentication

2000-08-05 Thread Jean Jordaan

Hi Zopers

Looking at the attributes of the dtml-sendmail tag, I don't 
see any way of conveying authentication data to the smtphost. 
Our setup here (using Exchange) requires a username/password 
to send. Any way of coping with this?

-- 
Jean Jordaan   --technical writer--Mosaic Sofware

___
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] server instability: ZODB corruption?

2000-08-05 Thread Guido A.J. Stevens

I'm hunting down an arcane problem in one of our Zope sites and find
myself hitting new and wildly diverse problems every day. I hope
somebody can point me in the direction of some solution strategies.

Main suspect is a corrupted Data.fs.in file. How can I audit and
repair it?

problem A: access denied vs. KeyError


For starters, we built a website with a lot of custom programming. I
created the NFGnav product
http://www.zope.org/Members/gyst/NFGnav
and my partner built a collection of ZClasses. 

All this was Tested And Working Fine (TM).

Since some weeks, part of the site gives an 'access denied' error. We
had to shut down that subtree. Strange thing is, it also gives access
denied for the manager/owner logins of the site - that's me and I
really have access to everything. What is even stranger, is that when
I logon as superuser, I get a KeyError instead of an access denied
error.

=> Question: which parts of zope would be prone to denying access to a 
privileged user, while generating KeyErrors for the superuser?


problem B: hanging zope thread zombies all zope sites


While debugging this problem, I found a strange correlation with
another problem we're having: zope threads consuming 99.9% CPU. Now
and again, a zope thread hangs. All zope sites are dead. I have to not
only restart zope; I have to stop zope, restart apache, and start zope
again to get rid of the hanging thread and get the zope sites alive
again.

As soon as I start digging around in the buggy site, the number of
thread crashes jumps up. In combination with the problems we're having 
with that site itself, this suggests two possible causes:

1) ZODB curruption. We've had a complete server crash 3 weeks ago and
it is quite possible the ZODB isn't 100% healthy. In my zope
installation I found a utility 'bbb.py' to audit data storage
files. Alas, it is of no use:
 | zeno:/usr/lib/zope/utilities# python bbb.py 
 |/var/lib/zope/import/www.intratuin.nl.zexp
 | 
 | The input file is not a ZODB 2 database file.
 | This script only works with ZODB 2 (BoboPOS) data or export files.

=> Question: is there another utility for checking and repairing
object stores?

2) Another possible cause would be an infinite loop in one of our
custom scripts. To try and debug this I wanted to import a copy of the 
offending site into one of our testlab machines. However, on importing 
the zexp file I got:

  Error Type: TypeError
  Error Value: ('len() of unsized object', , None) 
 

Re: [Zope] REPOST: README.txt Tab

2000-08-05 Thread Erik Enge

On Fri, 4 Aug 2000 [EMAIL PROTECTED] wrote:

> I'll re-ask the question:
> 
> > How do I get the README tab to appear in a product?

In the Squishdot Product I discovered this:

Readme = Document('', __name__='')
Readme.__roles__ = None

This one seems to add a README tab.  If you have a README.txt file in your
Products directory it displays it.


___
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] Python Product Tutorial

2000-08-05 Thread Erik Enge

On Fri, 4 Aug 2000, Loren Stafford wrote:

> I don't know of any tutorial. ZScheduler creates a container (a subclass of
> Catalog in fact), so you might use that code as a starting point. It doesn't
> put other objects in the container, tho.

Thanks, but I'm really interested in how I would add other objects.  I
guess if I dig deep enough, I'll find it. :-)


___
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] Less than helpful traceback

2000-08-05 Thread Dieter Maurer

Spicklemire, Jerry writes:
 > Any thoughts about how to find out what the erro message 
 > (below) means? If I could just find out what exactly is 
 > not being found, it would help alot, but there's no hint.

 > Zope has encountered an error while publishing this resource. 
 > 
 > Resource not found
 > 
 > 
 > Troubleshooting Suggestions
 > 
 > 
 > For more detailed information about the error, please refer to the HTML
 > source for this page. 

For unknown (but strange) reasons, at least earlier Zope versions
(up to 2.1.6), sometimes place the URL of the missing resource into
an HTML comment. Therefore, you will not see it in rendered problem report,
only in its HTML source.

Thus, follow the hint: tell your browser you want to see
the HTML source of the error report.


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] Solution Suggestions?

2000-08-05 Thread Dieter Maurer

Craig writes:
 > ... special "Tips" objects in Zope ...

It seems, this is an ideal task for a Catalog Aware ZClass.

On zope.org, you will find tutorials for ZClass and ZCatalog.


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] ZCatalog attachments?

2000-08-05 Thread Dieter Maurer

Simon Coles writes:
 > We have binary files stored in Zope, for example Word documents (but 
 > could be any of a variety of document types).
 > 
 > We would like to be able to index and search the contents of these 
 > files using ZCatalog. So if a Word file contains the word "Fred", 
 > then any search for "Fred" would include that file in the list of 
 > documents returned.
Someone else already told you, that you must create a parameterless
method (it need not necessary be named "PrincipiaSearchSource")
that returns the files content.

You may not need to keep the rendered version around but
may be able to extract the plain text on demand.
I think, there is a "word.dll" that provides access to
MS Word from applications. Alternatively, you could
control Word via COM.


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] Zope in single thread mode during DTML rendering

2000-08-05 Thread Dieter Maurer

A collegue of mine succeeded today to implement an infinite DTML
loop. That happens ...
However, during this loop, Zope did not respond to any request.
Effectively, it was in single thread mode.

Zope 2.1.6 Binary Distribution for Sparc Solaris 2.6
ZOracle DA, DCOracle, Oracle 8.1.6

After several minutes, Zope reported an "infinite recursion in document
template" and the world awoke from its sleep.


I was unable to reproduce this at home, though:

Zope 2.1.6 Source Distribution on Linux 2
No database connections.


Hugh, I have been lying:

  I just removed the "-D" from the Linux start script,
  and Zope blocked during the infinite loop.

  The behaviour is not related to the "-D" set or unset.

  It just blocks sometimes and at other times, it does
  not.


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] Pluggable brains aren't seen by first-nnn in ?

2000-08-05 Thread Dieter Maurer

Brad Clements writes:
 > However first-eventday is ALWAYS true, however when I print &dtml-
 > eventday; the output value is always the same for each row, so first-
 > eventday shouldn't be true on any row except the first.

Almost surely, the "in" tag does not call a callable object
(because it does not expect, they could be callable).
You, therefore, get the method itself.
It is identical for all records.


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] Confusing "sqlvar" error message

2000-08-05 Thread Dieter Maurer

Today, I analysed a confusing error message from "dtml-sqlvar".

SQL query template:




reported: "missing input variable: _[name]"


Of cause, I did not expect that such an input variable should
be necessary and I suspected the DTML parser not to
see the "..." around "_[name]".


After analysis, the explanation was simple:

SQLVar.render is a bit stupid in its error handling:

try:
expr=self.expr
if type(expr) is type(''): v=md[expr]
else: v=expr(md)
except:
if args.has_key('optional') and args['optional']: return 'null'
raise 'Missing Input', 'Missing input variable, %s' % name


This error handling is only senseful for "type(expr) == type('')",
i.e. for plain variable access.
For true expressions, the original exception would be
*much* more useful.

In my case, unwrapping the "try ... except ..."
produced "KeyError: FOLLUP_UP",
an obvious type (FOLLOW_UP rather than FOLLUP_UP).


Thus, the above exception handling should become:

except:
if args.has_key('optional') and args['optional']: return 'null'
if type(self.expr) != type(''): raise
raise 'Missing Input', 'Missing input variable, %s' % name

  
I will put it 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 )