[Zope-dev] ZCatalog text index search bugs?

2000-06-12 Thread R. David Murray

I am very confused.

I'm looking at the SearchIndex source under 2.1.4 (2.1.6 seems to be
the same).  In Lexicon.py the 'query' method defines the default_operator
to be 'or'.  I can't see that TextIndex overrides this when it calls
it.

But the response to PR 1141 (against 2.1.6) in the collector says:

  The TextIndex search does an AND, not an OR, of the search
  words: if you ask it to find "foo bar", it returns only
  objects matching *both* "foo" and "bar", rather than object
  matching *either* "foo" or "bar" (which Jason expected).

Indeed, if you do a search that includes a word that is not on an
item, the item is not returned.  So how is that working?

A possible answer is:  if you do a search like 'something or
somethingelse', this *also* does not return the object if one of
those words is not on the object.  So is 'or' searching broken?

Note that if you do a search like "something or with", this returns
the object, "with" being a stop word.   So does "something with".
On the other hand, "something and with" does *not* return the
object.

So I think 'or' searching is broken, and that text indexes being
a default 'and' search is just an accident grin.

Following up on the 'something and with', though:  Since "with" is
a stop word, it can never be on the object.  Since the user entering
search words into the search form doesn't know what the list of
stop words is, this stikes me as broken behavior.  Anyone disagree?

I also have a problem with a word such as "T-shirt".  If I search
on "T-shirt", my object that has that word in its text index does
not show up.  The splitter should be breaking that into "t" and
"shirt", right?  Is the problem that single letters are discarded
by the Splitter, therefore T is like a stop word (but it isn't in
the stopword table), therefore the implicit 'and' search(*) fails?
To corroborate this, a search for "something t" finds that
record, but "something and t" does not.  This can't be the whole
answer, though, since searching on just 'shirt' does *not*
return the object.

(*) I recall reading that the 'near' operator, which is used if
the splitter breaks up a word in the search string, is not really
supported and that the 'and' operator is used instead.)

I can't tell yet if this bug is (these bugs are?) fixed in 2.2.0b1
since I can't see the source release yet.  Looking at the a1 source,
things have moved around a bit.  But I see that "default_operator"
is still set to 'or', so I suspect these bugs may remain...

If I can reproduce this in 2.2.0b I'll file it in the collector.

--RDM




___
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] Request for comments: Directory storage

2000-06-12 Thread Stuart 'Zen' Bishop

On Fri, 9 Jun 2000, Petru Paler wrote:

  I'd love some sort of benchmarking tool for this (and posibly other 
  Storages). I guess the best way would a python script that uses urllib.
  Something that would algorithmically pump up the DB to  1GB in size
  and retrieve the URL's. Any volunteers or am I doing it in my
  copious spare time (tm)?
 
 It would be great if you could do it, but beware that you will be
 benchmarking a lot of overhead if you only plan to measure storage
 performance. Why not use ZODB directly ?

If I talk HTTP, it measures things fully - Python's interpreter lock
will mean a storage system written in python will benchmark better
without having to compete with ZServer, and vice versa for storage
systems with non-pythonic bits.

  I've got a nice NetApp here to run some tests on.
 
 What filesystem does that use ?

No idea :-) Something log based that is very fast and handles huge
directories happily. It also appears that another member of this
list has an EMC Symmetrix box to test on, which I believe is the next (and 
highest) level up from a Netapp.

I've attached a prerelease alpha of zouch.py for giggles. Not even a
command line yet, so you will need to edit some code at the bottom.
The current settings generate about 360 directories and about 36000 files,
and proceeds to make about 18 reads. This bloated by test ZODB
to just over 200MB and took about 2.6 hours attacking my development Zope
server from another host on my LAN.

Todo:
tidy and vet ugly code
command line interface
dynamic option (do more intensive DTML stuff - currently just 
standard_html_header/standard_html_footer)
catalog option (since DTML Documents arn't catalog aware, will need
to make two calls to make a new document)
upload larger documents and some binaries (200MB isn't great for 
benchmarking when you might have a gig of ram doing caching for you)
standard test suite
better reporting
spinning dohicky so we know it hasn't hung without having to look
at log files

-- 
Stuart Bishop  Work: [EMAIL PROTECTED]
Senior Systems Alchemist   Play: [EMAIL PROTECTED]
Computer Science, RMIT University



#!/bin/env python
'''
$Id: zouch.py,v 1.3 2000/06/12 04:23:01 zen Exp $

Zouch - the Zope torture tester
'''

import whrandom
import sha
import threading
import ftplib
import httplib

from string import split,join,replace
from time import time,strftime,localtime,sleep
from StringIO import StringIO
from Queue import Queue
from threading import Thread,RLock
from urllib import urlencode
from urlparse import urlparse
from base64 import encodestring

retries = 10
retrysleep = 1

def debug(msg): 
print 'D: %s - %s' % (threading.currentThread().getName(),msg)

# Fatal exceptions will not be caught
class FatalException(Exception): pass
class UnsupportedProtocol(FatalException): pass

class FolderLock:

def __init__(self):
self.locks = {}
self.sync = RLock()

def lock(self,dirs):
self._lock(self._mypath(dirs))
self._lock(self._parentpath(dirs))

def unlock(self,dirs):
self._unlock(self._parentpath(dirs))
self._unlock(self._mypath(dirs))

def _parentpath(self,dirs):
if len(dirs) == 1:
return 'root'
else:
return join(dirs[:-1],'/')

def _mypath(self,dirs):
return join(dirs,'/')

def _lock(self,d):
locks = self.locks
sync = self.sync

while 1:
try:
sync.acquire()
acq = 1
if locks.has_key(d):
l = locks[d]
sync.release()
acq = 0
l.acquire()
l.release()
else:
l = RLock()
l.acquire()
locks[d] = l
break
finally:
if acq: sync.release()

def _unlock(self,d):
locks = self.locks
sync = self.sync

sync.acquire()
try:
l = locks[d]
del locks[d]
l.release()
finally:
sync.release()

folderlock = FolderLock()

class HTTPMaker:
'Baseclass for HTTP Maker classes'

def __init__(self,queue,url,username,password):

purl = urlparse(url)

host,port = split(purl[1],':',1)
path = purl[2]
if port:
port = int(port)
else:
port = 80

if path[-1] == '/':
self.path = path
else:
self.path = path + '/'

self.queue = queue
self.ops = 0

if username is None:
self.auth = None
else:
if password is None: password = ''
self.auth = 'Basic %s' % \
 

Re: [Zope] how do I turn off tracebacks in production systems

2000-06-12 Thread Martijn Pieters

On Sun, Jun 11, 2000 at 11:16:09PM -0500, sathya wrote:
 How an I turn off trace backs on an exception in a production system I would
 rather mail this to the webmaster than a user see it. Any tips will be
 appreciated 

Switching off visible tracebacks:

  http://zdp.zope.org/projects/zfaq/faq/ZopeInstallation/959594145

Emailing on error:

  http://www.zope.org/Members/JohnC/StandardErrorMessage

-- 
Martijn Pieters
| Software Engineermailto:[EMAIL PROTECTED]
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
|   The Open Source Web Application Server
-

___
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] Traversable DTML methods

2000-06-12 Thread Ian Sparks


The one reason that may still exist for not making DTML Methods traversable
as you're suggesting would be if you want to call a DTML Method within the
acquisition context of another... something that some people may want to do
(I never have though). If a DTML Method chops off everything that follows in
the URL, then that remaining part of the URL can't be used for acquiring
other methods.


I don't see DTML Methods as "chopping off" the URL so much as "consuming"
parts of it. SQL Methods have this behaviour now :

www.mysite.com/flavor/cherry/showme

Where "flavor" is a SQL Method which takes a single parameter "cherry" and
"showme" is a DTML Document which makes some use of the flavor SQL Method.
In this instance "flavor" consumes the next part of the url because it is
looking for a parameter and when it is finished hands on control to the
next, unconsumed part of the URL "showme".

Notice though that I have to have the "showme" DTML Method to actually
display the results. If "flavor" was a parmeterized DTML Method my URL could
become :

www.mysite.com/flavor/cherry

which makes more sense to me. In this case the "flavor" DTML Method would
consume the "cherry" parameter, perhaps call some SQL Method to get the data
for the "cherry" display and then display itself.

If the parameters could have defaults then I could have URL's like :

www.mysite.com/members/ian/
www.mysite.com/members/ian/home
www.mysite.com/members/ian/preferences
www.mysite.com/members/ian/todo

Where "members" is a DTML method which takes parameters username,subsite
(default : "home") and decides what to display based on the parameters
passed.

This allows my "users" to become virtual (by which I mean DB-based). I can
do the last 3 URL's now with SQL Methods ("home", "preferences" and "todo"
become DTML documents or methods which are aquired) but I can't do the first
URL because SQLMethods don't do any rendering for display.

Well, that got rambling but it lays my argument out in full I think.

- Ian.


___
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] ZOracle connection trouble

2000-06-12 Thread Monty Taylor

The user/passwd@SID is the correct format. Zope, however, probably has
no clue about your environment variables. I would recommend looking at
the start-up script for Zope and adding the environment variables in
there (ORACLE_HOME is quite important, for one.)

Monty

"Bak @ kedai" wrote:
 
 hullo everybody,
 
 i want to access data on oracle server that resides on a remote machine.  i've
 installed oracle 8i(client side only) for linux on a redhat6.2 and managed to
 compile ZOracleDA with no problems.  i can connect ok from sqlplus and the test
 script that comes with ZOracleDA can import and connect to the remote database
 server OK.  however,  i can't create a ZOracleDA connection.
 
 what's the connection string?  i've tried user/passwd@myora_SID -
 this barfed out connection "Invalid connection string:
 emedia/emedia123@nstdb"
 
 user/passwd crashed zope.
 
 i think my environment is all set since i can connect from sqlplus and the
 ZOracleDA test script runs ok.
 
 what more should look at?  pointers/docs accepted.
 
 p/s - i'm a Oracle newbie and not the DBA for the server that i want to access.
 i d/l DCOracleDA, compiled it, ran the test script successfully and stopped at
 that since i'm not quite sure what to do next
 
 thanks
 
 --
 --
 http://www.kedai.com.my/kk
 Am I Evil?
 
 ___
 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 )

begin:vcard 
n:Taylor;Monty
tel;cell:+31 (0)6 200 17486
tel;fax:+31 (0)20 589 5566
tel;work:+31 (0)20 589 5517
x-mozilla-html:TRUE
url:http://www.goldridge.net
org:Information Innovation
adr:;;Amstelveenseweg 88-90;Amsterdam;;1075 XJ;The Netherlands
version:2.1
email;internet:[EMAIL PROTECTED]
title:Information Artist
x-mozilla-cpt:;0
fn:Monty Taylor
end:vcard



Re: [Zope] Re: FSSession newbie problem

2000-06-12 Thread Marcello Lupo

Hi,
well the system run now but as i told before if i put a dtml-call
FSSession in all my pages, FSSession open one session for page
everytime i load it. So the cart result everytime containing only the
last item and the files created contain the values.
If i put dtml-call FSSession only in the first document of the e-comm
section it works well, but the file created do not contain the values,
seems to remain in MEMORY.

Should I make some kind of call to FSSession UID in the pages to let the
FSSession to recover the right session and not to open a new one?
Becouse the problem seems to be in fact that the FSSession is not able
to recover the correct ID of the file (from cookie).

I made some try and if i use the site passing via Roxen web server
through the PCGI the cookie is all another becouse the browser has a
cookie that was set from another application on the same server so the
browser seems to pass only that cookie and not the SessionUID cookie.
I tried to clean all my cookies and it worked fine if a go directly to
my pages not passing from the pages that generate the other cookie.

If i pass directly from the Zope port to access the resource it is ok...

Have some ideas to let the browser pass the cookie in a right way? 
I think we can work on the PATH but i don't know how.
Thanks for help.
Bye

Hung Jung Lu wrote:
 
 From: Pavlos Christoforou [EMAIL PROTECTED]
 On Fri, 9 Jun 2000, Marcello Lupo wrote:
   1) Is necessary to call FSSession in every document of the site Yes it
 is neccessary beacuse HTTP is stateless. It will only start a new
 session if FSSession cannot find a valid UID either through a cookie or a
 FORM or as part of te URL
 
 Pavlos: this is the part that is confusing to newbies. FSSession can be made
 in such a way that this initial call can be avoided. HappySession works that
 way: no need for explicit initialization. Matter of fact, in the very first
 call to the HappySession (any dictionary method), it does the initialization
 itself behind the scene. FSSession can do the same thing.
 
 It's a minor detail, but anything to make a newbie's life easier is worth
 it. :)
 
 regards,
 
 Hung Jung
 
 
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] SINGOFF

2000-06-12 Thread Juanjo GarcĂ­a

SINGOFF

___
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] SINGOFF

2000-06-12 Thread Andrew Kenneth Milton

+[ [Juanjo Garc_a] ]-
|
| SINGOFF

La La La La

-- 
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 |  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] long columns on oracle

2000-06-12 Thread Riku Voipio

Hi, 

I'm running Oracle 8.1.5i / DCoracle 1.3/Zoracle 2.1.0/zope 2.1.6,
On Debian/potato (2.2.16)  and whenever I try select a LONG column, I 
get the following;

Error, exceptions.IndexError: 1 

SQL used:

select
 MSG_ID,
 USER_ID,
 HANDLER_ID,
 STATE,
 APP,
 TMODULE,
 VER,
 HEADER,
 VER_DONE,
 PATCH,
 TEXT,
 DATE_CREATED,
 DATE_CHANGED
from tmessage

Inserts work fine, and the select while be file, if I remove 
the 'TEXT' column, which is the LONG column.

-- 
Riku Voipio
[EMAIL PROTECTED]
09-862 60764


___
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] MIME Problem

2000-06-12 Thread Brown Fox

Hello all,
i'm following the thread on the mime type, adding my
own problem!

I have created a zclass where the index_html is:
Content-type: application/pdf

dtml-let username="AUTHENTICATED_USER.getUserName()"
dtml-in "SQL_get_priv(username=username)"
dtml-if "Priv  PrivilegioFile"
dtml-var MyView
dtml-else
  HTMLBODY
  P
  CENTER
   You are not allowed to see this file!
  /CENTER
  P
  /BODY/HTML
/dtml-if
/dtml-in
/dtml-let

Where MyView is an external python module:
def Test(self):
return self.data

This solution is not working, to be honest i've
checked it on NT2000 and it was perfect but on Win98 i
get a small icon saying that i'm missing something to
display the pdf file... If i delete the index_html
everything is ok, but without the initial check.
I don't understand why!
The content type is correct, i've also tried with
dtml-call
"RESPONSE.setHeader('Content-Type','application/pdf')"
but the problem is the same.
Anyone can help me? 

Thanks,
Bruno



__
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.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] ZOracle connection trouble

2000-06-12 Thread kdie


-Original Message-
From: Monty Taylor [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Monday, June 12, 2000 6:59 PM
Subject: Re: [Zope] ZOracle connection trouble


The user/passwd@SID is the correct format. Zope, however, probably has
no clue about your environment variables. I would recommend looking at
the start-up script for Zope and adding the environment variables in
there (ORACLE_HOME is quite important, for one.)

Monty

hi,
tried ypur suggestion.  put ORACLE_HOME,ORACLE_SID and export them all in
start
but it was all to naught.

here's something new, i tried sqlplus user/passwd and i got prompted for  a
userid and password.  this is not from the server that i wanted to connect
to.  not sure where it's from.  what do i need to set to tell the client to
connect to particular machine?

as said previously, i'm very green with oracle.

any help appreciated.

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] Re: [ZCommerce] Secure storage of credit card info

2000-06-12 Thread Ng Pheng Siong

On Sat, Jun 10, 2000 at 07:58:48AM +1300, Graham Chiu wrote:
 http://www.post1.com/home/ngps/zope/zsmime
 
 Any ETA on the Win32 binaries?

Real Soon Now! ;-)

Seriously, I've just compiled M2Crypto with Borland's BC++ 5.5 free
compiler suite and linked with MSVC-built Python and OpenSSL. It works!

I'm preparing a binary package of my latest snapshot. It should be
up on my site tomorrow this time. 

I expect further progress on M2Crypto to be slow in the next
few weeks, this being Euro 2000 month. ;-)

Germany vs Romania just started, gotta go!

Cheers.
-- 
Ng Pheng Siong [EMAIL PROTECTED] * http://www.post1.com/home/ngps


___
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 and Search Results

2000-06-12 Thread Jason Spisak

Aaron Payne writes:

We are closing in on it.

 At 07:37 pm 6/9/00 +, Jason Spisak wrote:
 Then it has to be the search forms.  Can you sned me the search and report
 methods.  Also, you should try looking up and instance programatically
 right after you create it, like so:
 
 dtml-in "Catalog(myProperty='knownValue')"
 dtml-var id
 /dtml-in
 
 Jason,
 
 I used the dtml-in for the catalog(myproperyty='xyz') and I found the newly 
 added zclass.  It may be the z search forms.
 
 Thanks for your help,
 Aaron
 
 

Yep. Let's take a look.

search snipped

 Here is the report method:
 dtml-var standard_html_header

Are any of these field indexes?  Vendor maybe, Zip?  If the ZClass
instances always have a value for them, then when you submit this search
and leave one of the 'field index' input boxes blank, you'll get no
results, I believe.

 
 form action="CatReport" method="get"
 h2dtml-var document_title/h2
 Enter query parameters:brtable
 
 trthCoupon text/th
  tdinput name="coupon_text"
 width=30 value=""/td/tr
 trthCategorylist/th
  tdinput name="categorylist"
 width=30 value=""/td/tr
 trthVendor/th
  tdinput name="vendor"
 width=30 value=""/td/tr
 trthZip/th
  tdinput name="zip"
 width=30 value=""/td/tr
 
 
 trtd colspan=2 align=center
 input type="SUBMIT" name="SUBMIT" value="Submit Query"
 /td/tr
 /table
 /form
 
 dtml-var menu
 dtml-var standard_html_footer
 

Try simplifying it. Try one at a time to find out which one is forcing the
no results.

All my best,

Jason Spisak
CIO
HireTechs.com
6151 West Century Boulevard
Suite 900
Los Angeles, CA 90045
P. 310.665.3444
F. 310.665.3544

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.

___
Zope 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] Oh no !! How to undo without manage interface ?

2000-06-12 Thread Andreas Elvers

Hi,

well... I did it. I was trying to install a second virtual host within
zope and after adding an access_rule I was locked out.

All access to zope via web interface gives me:

Error Type: AttributeError
Error Value: __call__

I tried to access zope via FTP. This kind of works but I can't see file
nor can I delete files.

Is there any solution to delete or undo information in the Zope database
from the outside ?

This is hopefully not critical, but annoying :-)

Thanks for any help !

- Andreas


-
Trouble Ticket #6
Problem Summary: Everything is bad
Problem Details: First of all I woke up, then other things happended!
 I want my money back !



___
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] XML Chat with Jim, Brian, and FourThought

2000-06-12 Thread ethan mindlace fremen

Zopatistas,

Jim Fulton, Brian Lloyd, and the FourThought team will be on #zope Wednesday,
June 14th at 13:00 EST to chat about XML/XSLT integration into Zope!

See the world clock to check for local play times:
http://www.timeanddate.com/worldclock/?year=2000mon=6day=14hour=17min=0sec=0
The chat page has more information:
http://www.zope.org/Documentation/Chats

ethan mindlace fremen
Zopatista Community Liason

___
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] Oh no !! How to undo without manage interface ?

2000-06-12 Thread ethan mindlace fremen

Andreas Elvers wrote:
 
 Hi,
 
 well... I did it. I was trying to install a second virtual host within
 zope and after adding an access_rule I was locked out.

http://my.site.foo/__no_before_traverse__/manage

lets you access the site without SiteAccess enabled.

~ethan

___
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: FSSession newbie problem

2000-06-12 Thread Hung Jung Lu

From: Marcello Lupo [EMAIL PROTECTED]
Have some ideas to let the browser pass the cookie in a right way?
I think we can work on the PATH but i don't know how.

Okie, you have a cookie problem.

You should definitely solve your cookie problem, if you can. But you can 
also use cookie-less sessions by tweaking the URL: you can append SessionUID 
form variable for all your links, and also use hidden fields for all your 
FORM requests.

FSSession and SQLSession both come with URL-modifier feature. For FSSession, 
instead of a link like:

  a href="dtml-var my_url" ...

you would use

  a href="dtml-var "FSSession.url(my_url)"" ...

And for forms, you have to remember to place a hidden field:

  form ...
  input type=hidden name="SessionUID" value="dtml-var 
"FSSession.getName()""
  ...
  /form

regards,

Hung Jung



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Property Question

2000-06-12 Thread Evan Simpson

- Original Message -
From: Tom Scheidt [EMAIL PROTECTED]
 result = []
 for item in self.objectValues( [ 'DTML Document' ] ):
 if item.hasProperty( 'publish' ):
 (and if there is something entered in the 'publish' field)
result.append( item )
 return result

If you just meant, is the value of the 'publish' property is "true"
(nonblank string, nonzero int, etc.) then you want:

result = []
for item in self.objectValues( [ 'DTML Document' ] ):
if item.hasProperty( 'publish' ) and item.publish:
   result.append( item )
return result

Cheers,

Evan @ digicool  4-am



___
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] ZPyGreSQLDA broken problem

2000-06-12 Thread Richard Moon

I've just installed Zope 2.1.6 and PostgreSQL 7.02 and now I get a broken 
ZPyGreSQLDA with the following

Traceback (innermost last):
   File "/opt/Zope-2.1.6-linux2-x86/lib/python/OFS/Application.py", line 
387, in import_products
 product=__import__(pname, global_dict, global_dict, silly)
   File 
"/opt/Zope-2.1.6-linux2-x86/lib/python/Products/ZPyGreSQLDA/__init__.py", 
line 89, in ?
 import sys, os, Globals, DA
   File "/opt/Zope-2.1.6-linux2-x86/lib/python/Products/ZPyGreSQLDA/DA.py", 
line 91, in ?
 from db import DB
   File "/opt/Zope-2.1.6-linux2-x86/lib/python/Products/ZPyGreSQLDA/db.py", 
line 89, in ?
 import _pg, regex, sys, types
ImportError: No module named _pg

I can import _pg from the python command line.

I still have a Zope 2.1.4 installed and that works fine with PostgreSQL 
7.02, though I haven't tried re-installing it.

(Running on Linux 2.1 with PostgreSQL binary RPMs if thats any help).

Any clues as to the problem ?

Thanks


Richard


Richard Moon
[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] Traversable DTML methods

2000-06-12 Thread Shalabh Chaturvedi

Hi all

I just created a 'Traversable DTML Document' product. You can get it here:
http://www.zope.org/Members/shalabh/TraversableDTMLDoc/

It is a ZClass product based on the TraversableMixin (which you'll have to
install anyway) to be found here:
http://www.zope.org/Members/shalabh/TraversableMixin/

And yes, you can use the mixin to create any ZClass that is 'traversable'. For
example create a new ZClass with DTMLMethod and the TraversableMixin as bases
and you have a 'Traversable DTML Method' (that's how I created the Traversable
DTML Document).

Mail me for any problems.

Many thanks to Itamar for pointing me in the right direction, and to Ian for
initiating this mindwave.

Enjoy!

Shalabh


Ian Sparks wrote:

 I don't see DTML Methods as "chopping off" the URL so much as "consuming"
 parts of it. SQL Methods have this behaviour now :

 www.mysite.com/flavor/cherry/showme

 Where "flavor" is a SQL Method which takes a single parameter "cherry" and
 "showme" is a DTML Document which makes some use of the flavor SQL Method.
 In this instance "flavor" consumes the next part of the url because it is
 looking for a parameter and when it is finished hands on control to the
 next, unconsumed part of the URL "showme".

 Notice though that I have to have the "showme" DTML Method to actually
 display the results. If "flavor" was a parmeterized DTML Method my URL could
 become :

 www.mysite.com/flavor/cherry

 which makes more sense to me. In this case the "flavor" DTML Method would
 consume the "cherry" parameter, perhaps call some SQL Method to get the data
 for the "cherry" display and then display itself.

 If the parameters could have defaults then I could have URL's like :

 www.mysite.com/members/ian/
 www.mysite.com/members/ian/home
 www.mysite.com/members/ian/preferences
 www.mysite.com/members/ian/todo

 Where "members" is a DTML method which takes parameters username,subsite
 (default : "home") and decides what to display based on the parameters
 passed.

 This allows my "users" to become virtual (by which I mean DB-based). I can
 do the last 3 URL's now with SQL Methods ("home", "preferences" and "todo"
 become DTML documents or methods which are aquired) but I can't do the first
 URL because SQLMethods don't do any rendering for display.

 Well, that got rambling but it lays my argument out in full I think.

 - Ian.


 ___
 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] how do I turn off tracebacks in production systems

2000-06-12 Thread sathya

On Mon, 12 Jun 2000, Andreas wrote:
 sathya wrote:
  
  How an I turn off trace backs on an exception in a production system I would
  rather mail this to the webmaster than a user see it. Any tips will be
  appreciated
 
 Set the OS environment variable BOBO_DEBUG_MODE=0
 Thanks ! also figured out this can be turned off in start or Zope.cgi
depending on what you are using
 ##
 necessity is the 
mother of invention
##

___
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] Attn all Minnesota Zope fans

2000-06-12 Thread Timothy Wilson

Hi everyone,

I'd like to know if anyone else in the Twin Cities region of Minnesota is
using Zope. I've hooked up with a couple other people in the past few
months, and I'm wondering if there's a critical mass of people who would be
interested in a *very* informal Zope SIG. Please let me know (even if you
don't want to be involved in any sort of SIG).

-Tim

--
Tim Wilson  | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
W. St. Paul, MN |  | http://slashdot.org/
[EMAIL PROTECTED] |   dtml-var pithy_quote | http://linux.com/


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Zope 2.2 beta 1 released

2000-06-12 Thread Brian Lloyd

Zope 2.2.0 beta 1 has been released - you can download it from
Zope.org:
http://www.zope.org/Products/Zope/2.2.0b1/


This release contains refinements to the new ownership model as 
well as better undo management and many bug fixes. For more 
information, see:

http://www.zope.org/Products/Zope/2.2.0b1/CHANGES.txt

If you are still using a 2.1.x version of Zope, be sure to 
see the document 
http://www.zope.org/Products/Zope/2.2.0b1/upgrading_to_220

for information on the recent changes to the Zope security model 
and other upgrade information.


Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.371.6909  
Digital Creations  http://www.digicool.com 



___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Oh no !! How to undo without manage interface ?

2000-06-12 Thread Andreas Elvers

Thanks !

Yes. This "kind" of worked. Although the access_rule for my first virtual
host was gone too, and after adding that one again, the whole thing
started over again. But I was prepared :-) 

Thanks for the quick help

- Andreas

  well... I did it. I was trying to install a second virtual host within
  zope and after adding an access_rule I was locked out.
 
 http://my.site.foo/__no_before_traverse__/manage
 
 lets you access the site without SiteAccess enabled.
 
 ~ethan
 

-
Trouble Ticket #6
Problem Summary: Everything is bad
Problem Details: First of all I woke up, then other things happended!
 I want my money back !


___
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 beta 1 released

2000-06-12 Thread R. David Murray

On Mon, 12 Jun 2000, Brian Lloyd wrote:
 Zope 2.2.0 beta 1 has been released - you can download it from
 Zope.org:
 http://www.zope.org/Products/Zope/2.2.0b1/

Either the -src file name is wrong, or the file is wrong, because it
still says 2.2.0a1.  I think it's the file, 'cause the
control panel still says 2.2.0a1...

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




[Zope] How to call methods of a ZClass superclass?

2000-06-12 Thread Christian Scholz

Hi there!

I have a little problem here: I created two ZClasses, where one is derived
from the other, let's say A is the superclass and B the subclass.

In both classes I created a dtml method called foobar().

Now when I have an instance of B, called b, and I call foobar on it,
as in 

dtml-with b
dtml-var "foobar()"
/dtml-with

and I want to call A's foobar() method inside B's foobar() method, how do I do this?

(Actually I have two methods which show forms to fill out and I B's form contains
more. So I want to make B's form to show also the contents of A's form without
copying the code.. Thus I simply want to call A's method to show his part of the
form.)

In Python I would write

class A:
def foobar(self):
do something;

class B(A):

def foobar(self):
A.foobar(self)
do something more;

but with ZClasses it seems to be different (I hope it's possible at all.. ;-)

Any ideas?

best, 
 Christian


___
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] error (200)

2000-06-12 Thread Mike Mikkelsen

Turns out ZopePTK already has it's own LoginManager.  When I installed the
LoginManager product, ZopePTK died.  From there other products started acting
weird and zope became unstable.

I couldn't fix it with tranalyzer.py and split.  So I exported all folders off
the root, rm -rf'd the zope dir and started over.

Everything is ok now.

Thanks for all the replies.




On Sat, 10 Jun 2000, you wrote:
 On Sat, Jun 10, 2000 at 09:47:54AM -0700, Mike Mikkelsen wrote:
  My Zope (2.1.6) installation has just become *very* unstable.  My most recent
  addition has been ZPatterns and LoginManager.  My passwords for my virtual
  sites (using SiteRoot) are no longer accessable by my account and superuser
  can't access them.  The site "disappears" three or four times a day without
  errors.  And clicking on Product Management link sometimes returns "No Data"
  notice in the browser and then Zope crashes.
  
  This is the error that shows up on the console when going to Product Management
  or accessing the subdir that holds the subdir that has LoginManager:
  
  date ERROR (200) ZODB Couldn't Load State for
  '\000\000\000\000\000\000\002\017'
  
  
  I'm exporting the sites now and am going to (I guess) re-install zope and all
  of the products. 8-/
  
  Are there any other options?
  Any ideas on what went wrong?
  Is their a way to fix a corruption in the ZODB?
 
 Have a look at Ty Sarna's Tranalyzer:
 
   http://www.zope.org/Members/tsarna/Tranalyzer
 
 which can tell you where your Data.fs is in trouble. You then can try and
 repair your Data.fs file by truncating the file at the point of corruption.
 For more details see the Disaster Recovery + Avoidance How-To at:
 
   http://www.zope.org/Members/vernier/recovery
 
 -- 
 Martijn Pieters
 | Software Engineermailto:[EMAIL PROTECTED]
 | Digital Creations  http://www.digicool.com/
 | Creators of Zope   http://www.zope.org/
 |   The Open Source Web Application Server
 -
 
 ___
 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 )
-- 
Mike Mikkelsen  [EMAIL PROTECTED]
Micro Business Systems  http://www.microbsys.com
Fresno Linux Users Grouphttp://linux.fresno.ca.us

It's all GNU to me!

___
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] mail host question

2000-06-12 Thread Sean Kelley

I am having some problem configuring zope mail to work properly,
particularly with PTK v 0.7.1.
When I logon as a new member, its says "successful", but I get no mail to
confirm my logon (I did get it to work once but don't know how).  I have the
smtp host set to an IP address for an smtp mail server.  I tried a couple of
others by name such as "mail.domain.com" but got an error relating to
needed/missing "domain"
The permissions on the various zope security screens has all possible users
set to "use mail host"


Sean Kelley
Prompt Software, Inc.
www.promptsoftware.com
[EMAIL PROTECTED]
voice: (415) 382-8840
fax:(415) 382-8868


___
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] Unless not quite the opposite of if?

2000-06-12 Thread Curtis Maloney

On Sat, 10 Jun 2000, Bill Anderson wrote:

 Quickie: Does _anything_ in the tree above the page have 'paramName'?
 IOW, say you are in /A/B/C. If A has paramName, and you test for it in
 C, it will return true.


A good call, but no.  Especially invalidated by the fact the same problem 
showed with FSSession.


 Just a stab in the dark...

Yeh.. I've seen the Acquision monster bight a few people... but not this time.

oh well... back to the sub-optimal solution.

-- 
Have a better one,
Curtis.

dtml-var standard_work_disclaimer

___
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] mail host question

2000-06-12 Thread Graham Chiu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In article 01bfd4d1$04fce840$28eaa0a7@Sean, Sean Kelley
[EMAIL PROTECTED] writes
I am having some problem configuring zope mail to work properly,
particularly with PTK v 0.7.1.
When I logon as a new member, its says "successful", but I get no mail to
confirm my logon (I did get it to work once but don't know how).  I have the
smtp host set to an IP address for an smtp mail server.  I tried a couple of
others by name such as "mail.domain.com" but got an error relating to
needed/missing "domain"

I'd be interested if you get this going. I had the same error.

You put the IP address for the SMTP server field.
What goes in the 'local' field?

- -- 
Regards,  Graham Chiu
gchiuatcompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

-BEGIN PGP SIGNATURE-
Version: PGPsdk version 1.7.1

iQA/AwUBOUTmL7TRdIWzaLpMEQILPgCfdo9MMnki1hFdaialOgf5McyQBBQAn3k8
EfZa90UkLXZ1GUp0nAusqO2I
=7zVk
-END PGP SIGNATURE-

___
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/Interbase

2000-06-12 Thread Chris McDonough

No... you wanna write a DA?  :-)

Somebody should.  I would try, but I can't right now.  It's a very nice
database.

Graham Chiu wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 I saw the Interbase product on the website where Interbase is being used
 to store the Zope database.
 
 Does this mean that an Interbase DA also exists now for Linux?
 
 - --
 Regards,  Graham Chiu
 gchiuatcompkarori.co.nz
 http://www.compkarori.co.nz/index.php
 Powered by Interbase and Zope and interested in moving off Win32
 
 -BEGIN PGP SIGNATURE-
 Version: PGPsdk version 1.7.1
 
 iQA/AwUBOUTMlrTRdIWzaLpMEQIz9QCfe5ofqdLmFqermUpEgiwm/AYFQHMAoJtZ
 XrgA3b/cm51UDgQvch5RE5ea
 =TcBr
 -END PGP SIGNATURE-
 
 ___
 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] ZClass newbie problem...

2000-06-12 Thread Eric L. Walstad

I'm stuck. I would like to build a "shiny new ZClass" that has the following
structure:

WebSimProduct
  WebSim Class
'Properties' Property Sheet
  string RunID
Calc Class Object
  'Properties' Property Sheet
PathToInputFile
PathToWxFolder
  Results Class Object
'Properties' Property Sheet
  float gashtg
  float elchtg
  float elcclg
  float euihtg
  float euiclg

I haven't seen anything in the Zope documentation on using Zclass instances
as members of a super class.  In other programming languages I would
instantiate default objects when the WebSim class is initialized.  That way,
to use a WebSim object, all I would need to do is instantiate one, then fill
the properties of the automatiacally-created Calc object and Results object.
However, I'm not sure how to build these default objects in Zope.

My next question is: do I have to build a bunch of products (one for the
Calc class and one for the Results class, for example)?  I can imagine this
would result in a huge number of products under the control panel if this is
the case.  I would like to have just a WebSim product and have all the other
classes defined within this product.  Does Zope work this way?  If not, how
is this class structure (or one similar) achieved?

BTW, I've read, and disected to the best of my ability, the Zope Developer's
Guide and the Searchable Job Board HowTo and Ta'sss Adding ZClass
Instances Programmatically and the Zope Content Manager's Guide 'Turining an
Application into a Product.'  However none of these deals with classes that
contain custom class objects.

Thanks for the guidance (TFTG?)!

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] Restricting access to Confera

2000-06-12 Thread ryon


I'm confused about the way Zope restricts access to products such as Confera.

I think I know about adding users, and setting their roles, and setting permissions on 
objects.  Acquisitional Zen escapes me, but I suppose I know enough of it to get 
along.  Unfortunately, when I put this all into practice, things don't work the way I 
think they should! 

I'm just trying to do simple stuff here.  Let's say we have a Zope website on sailing. 
 It has a public section which everyone is invited to view, and a section we wish to 
restrict just to sailboat captains.  The default works well for the public pages, but 
we have to do some special things in order to make the restricted stuff restricted.  
So we create a role of "captain".  In the acl_users folder for the pages we want to 
restrict, we add the user "Blackbeard" and give him a captain role.  In the 
to-be-restricted folder, under the security tab, we check the "Access contents 
information", "Can Login and Logout", and "View" roles under "captain", then tediously 
uncheck all of the "Acquire permission settings".  Things are just fine so far, I 
think.  Blackbeard can get in, and everyone else is kept out.

The problem is when we want to add a product like Confera, and only let Blackbeard and 
his captain buddies use it.  There is apparently something very different about the 
way Zope handles products.  Obviously, there are several more permissions that need to 
be checked due to the added functionality, such as "Add Confera Topics" etc., but 
regardless of how many permissions I check under the captain role, Zope+Confera will 
not let Blackbeard or the other captains in!

What am I missing here?





Get your free email from AltaVista at http://altavista.iname.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 )