Re: [Zope-dev] Cache-bug in handling of files

2000-08-14 Thread Peter Arvidsson

So there is nothing else I can do but to make my files open in a new
window then...

But what I dont understand is why IE doesnt send any If-Modified-Since
header? Shouldnt it always do that if the settings are not set to never
update cached files?

Peter


Jim Sanford skrev:
 
 since all the data at my corporate intranet site is pulled from a RDMS, all my 
refrence URLS are generated in JavaScript and have a
 rnd="a randomly generated number between 1 and a million" to force the browser to 
get the current page.
 
  __
 
   Jim Sanford
   .   Database Engineer
  / \  /   Accelerated Technology, Inc.
 /   / 720 Oak Circle Drive East
/  /  \Mobile, AL 36609
   / / \   Voice: 334-661-5770  fax: 334-661-5788
  / \  E-Mail: [EMAIL PROTECTED]
   Web: http://www.atinucleus.com
 
  Nucleus.  All You NEED in an RTOS.  Royalty Free
  __
 
 - Original Message -
 From: Brian Lloyd [EMAIL PROTECTED]
 To: 'Peter Arvidsson' [EMAIL PROTECTED]; Brian Lloyd [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, August 11, 2000 10:44 AM
 Subject: RE: [Zope-dev] Cache-bug in handling of files
 
  I am using IE 5 (5.00.2919.6307), cache settings set to:
  "Check for newer versions of stored pages:
  Automatically
 
  Those settings should get the new file if it has changed.
 
  I am accessing the server through a proxy.. could that be a problem? I
  think it would be strange if everyone accessing the website I am
  building can see the new files..
 
  What do you think?
 
  Peter
 
 Peter - I have done some testing here and I can demonstrate
 that this is an IE issue.
 
 I set my cache to "Automatically" like yours and restarted
 it. I then opened a Netscape and created a new file object.
 I instrumented the code in the 'index_html' method of File
 objects so that I could tell _for sure_ whether things were
 actually being called at the server or not. Here's what I
 did:
 
   - create a file 'myfile.txt', uploading a contents of
 text1.txt into it.
 
   - visit the view tab with IE. The server
 confirms that the index_html was called, and the whole
 content was sent, not a 304.
 
   - now (using netscape again) upload the contents of
 text2.txt into the file object. The mgmt screen
 correctly shows the updated byte length, etc.
 
   - click the 'view' tab again on IE. My instrumenting
 confirms that IE is not contacting the server *at all*
 no matter how many times I click the 'view' tab, and I
 keep seeing the old content. A look at the headers
 produced by this shows nothing that tells IE it should
 be doing that:
 
 HTTP/1.1 200 OK
 Server: Zope/(unreleased version) ZServer/1.1b1
 Date: Fri, 11 Aug 2000 15:18:50 GMT
 Connection: close
 Content-Type: text/plain
 Content-Length: 944
 Last-Modified: Fri, 11 Aug 2000 15:16:06 GMT
 
 Interestingly, if you open the "view" tab in a new window,
 you'll see the updated content. Now, using that same new
 window, set your cursor at the end of the url string in the
 url bar and hit return. IE seems to reload the page, but it
 is not actually even contacting the server. Stranger yet, if
 you click the "refresh" button it *will* contact the server
 (and it passes an If-Modified-Since header, and correctly
 gets a 304 Not Modified).
 
 Now, use netscape to change the content again. The whole thing
 starts over. Clicking the 'view' link on the page or pressing
 return in the URL bar will not even contact the server and
 the only way to get the updated content is to explicitly press
 "refresh" or open a new window, even though the resource
 returned no caching information one way or the other.
 
 I'm going to close that bug report and include this report
 for those who may find it useful in the future.
 
 Brian Lloyd[EMAIL PROTECTED]
 Software Engineer  540.371.6909
 Digital Creations  http://www.digicool.com
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

___
Zope-Dev 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
 

Re: [Zope-dev] Cache-bug in handling of files

2000-08-14 Thread Toby Dickenson

On Mon, 14 Aug 2000 10:01:03 +0200, Peter Arvidsson
[EMAIL PROTECTED] wrote:

So there is nothing else I can do but to make my files open in a new
window then...

But what I dont understand is why IE doesnt send any If-Modified-Since
header? Shouldnt it always do that if the settings are not set to never
update cached files?

Browser dont spontaneously generate If-Modified-Since - only if you
include a Last-Modified header in the original response (Im not
entirely sure whether or not they are allowed to)

Note that Brian was observing that IE was not sending any request to
the server - any request (even one that includes cache control
headers) is going to involve a performance hit.

Brian: could you repeat your test including the header
cache-control: must-revalidate
This certainly *should* have the desired effect of not letting IE
display stale data.

Ive covered the use of this header in some detail in a recent HowTo:
http://www.zope.org/Members/htrd/howto/caching


Toby Dickenson
[EMAIL PROTECTED]

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




[Zope-dev] ZPatterns, Transactions, _register/_unregister

2000-08-14 Thread Bob Pepin

Hi,
I've encountered some weird behaviour in the ZPatterns Transactional class when
I was trying to write a User Source for the Login Manager Product.

I'm using Zope 2.2.0 with LoginManager 0.8.7a1 and ZPatterns 0.4.1snap1

The problem is that _unregister seems to be trying to delete the _v_registered
attribute of an object that doesn't have it set whenever I return None from
authenticateUser(). The weird thing is that the object seems to be
_register()ed and _v_registered appears to be set to 1 in _register(), but when
_unregister() is called it has the value 'None' again.

I've attached my code that's trying to implement the UserSource.

here is what my modified _register and _unregister functions look like:

def _register(self):
f=open('/tmp/zopelog', 'a', 0)
f.write('Register %s(%s)\n' % (self.id, str(self)))
f.write('Before: %s._v_registered=%s\n' % (self.id, getattr(self, 
'_v_registered', 'N/A')))
for i in traceback.format_stack():
f.write(i)
if self._v_registered: return
get_transaction().register(Reporter(self))
self._v_registered = 1
f.write('After: %s._v_registered=%s\n' % (self.id, getattr(self, 
'_v_registered', 'N/A')))
f.close()

def _unregister(self):
f=open('/tmp/zopelog', 'a', 0)
f.write('Unregister %s(%s)\nBefore: %s._v_registered=%s\n' \
% (self.id, str(self), self.id, getattr(self, '_v_registered', 'N/A')))
f.close()
del self._v_registered

and this is a sample log:

Register UserSource(NisUserSource instance at 85ab2e8)
Before: UserSource._v_registered=None
  File "/home/picard/bpe/Zope-2.2.0-src/ZServer/PubCore/ZServerPublisher.py", line 95, 
in __init__
response=response)
  File "/home/picard/bpe/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py", line 222, 
in publish_module
response = publish(request, module_name, after_list, debug=debug)
  File "/home/picard/bpe/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py", line 162, 
in publish
object=request.traverse(path, validated_hook=validated_hook)
  File "/home/picard/bpe/Zope-2.2.0-src/lib/python/ZPublisher/BaseRequest.py", line 
427, in traverse
else: user=v(request, auth, roles)
  File 
"/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/LoginManager/LoginManager.py", 
line 110, in validate
user = _DefaultAuth.findLogin(self, request, auth, user, roles)
  File 
"/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/LoginManager/LoginMethods.py", 
line 147, in findLogin
user = manager.getItem(name)
  File 
"/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/LoginManager/LoginManager.py", 
line 65, in getItem
user = source.__of__(self).getItem(name)
  File "/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/ZPatterns/Rack.py", line 
61, in getItem
self._registerCanonical(k,item) # XXX Should we cache non-existence?
  File 
"/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/ZPatterns/DataManagers.py", line 
52, in _registerCanonical
self._register()
  File 
"/home/picard/bpe/Zope-2.2.0-src/lib/python/Products/ZPatterns/Transactions.py", line 
47, in _register
for i in traceback.format_stack():
After: UserSource._v_registered=1
Unregister UserSource(NisUserSource instance at 85ab2e8)
Before: UserSource._v_registered=None


from Products.ZPatterns.PlugIns import PlugIn
from Products.LoginManager.UserSources import BasicUserSource,LoginUser
from Products.LoginManager.LoginMethods import LoginMethod
from Products.LoginManager import LoginManager
import nis, string, crypt
from Products.ZPatterns.PlugIns import defaultConstructors

class NisUserSource(BasicUserSource, PlugIn):

__plugin_kind__ = "User Source"
meta_type = "NIS User Source"

f=open('/tmp/zopelog', 'a', 0)
i=0

def dbg(self, str):
self.f.write('[%03d] %s\n' % (self.i, str))
self.i = self.i + 1

def retrieveItem(self, name):
self.dbg('retrieveItem: %s' % name)
try: passwd=nis.match(name, 'passwd.byname')
except nis.error: return None
user=LoginUser(name)
user._setRack(self)
self.dbg('retrieveItem: %s ok.' % user.getUserName())
return user

def authenticateUser(self, user, password, REQUEST=None):
self.dbg('authenticateUser: %s %s' % (user, 'password'))
name=user.getUserName()
if name is None: return None
try: passwd=nis.match(name, 'passwd.byname')
except nis.error: return None
crypted=string.split(passwd, ':')[1]
test=crypt.crypt(password, crypted)
self.dbg('%s == %s: %d' % (crypted, test, crypted==test))
return crypted==test

def rolesForUser(self, user):
if user.getUserName() == 'bpe':
return ['Write Access']
else:
return ['Read Access']

def domainsForUser(self, user):
return []

def initialize(context):
context.registerPlugInClass(

Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Chris Withers

Steve Alexander wrote:
 That makes for a lot of security checks.
 There are possible optimisations, though. But this starts to get even
 more complicated.

Does that mean it won't work, would be very slow, or both? ;-)

cheers for looking though...

Chris

___
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] Acquisition Confusion :S

2000-08-14 Thread Chris Withers

Michel Pelletier wrote:
  A.B.C.D
 
  Look for D in C,
  if it's not there, look in B
  if it's not there, look in A
 
 Someone correct me if I'm wrong here, but...
 
 This is a linear search, which is the way acquisition *used* to work.

Which Zope version? ;-)

 Consider:
 
 A /
   B/
 C/
 
 D
 
 (A contains B, B contains C and D).
 
 A.B.C.D
 
 By your desire first look for D in C, then B and then A.  

Yup...

 But A says
 "You cannot see Ds".  Now, in the linear case, D is found in B, and A is
 never asked if this operation is permitted.  This is a security
 violation because root policies should be enforced unless they are
 explicitly overidden further down.

Hurm :S 
I didn't say I had the answers, I was just posing the question ;-)

 Further, it actually makes *more* sense because the

Well, maybe for security, but not for everyday use by people who have
trouble getting their heads around (((D o C) o (C o A)) o ((C o A) o (B
o A))) and the like...

 Not from the perspective of the way most development is done.  For
 example, when you want to have your children objects (whatever they may
 be) be acquireable, you don't need to think about the complexity of the
 situation, you just make sure you make them accessable in the context
 *of* you.

Hmmm, the thing which is bugging me is described quite nicely here:
http://www.zope.org/Wikis/zope-dev/AcquisitionFeedback

How can Steve achieve what he wants with the way acquisition currently
works?

cheers,

Chris

___
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] Acquisition Confusion :S

2000-08-14 Thread Steve Alexander

Chris Withers wrote:
 
 Steve Alexander wrote:
  That makes for a lot of security checks.
  There are possible optimisations, though. But this starts to get even
  more complicated.
 
 Does that mean it won't work, would be very slow, or both? ;-)

It will work. It will be slower.

I think Evan Simpson's suggestion of adding two new methods to the
acquisition wrapper is a good idea. That way, Zope remains
backward-compatible, and you get to make an explicit choice of how you
want acquisition to work, if you wish.

Perhaps there's a Collector entry on this?

 quoted from Evan's email. Untested.
def aq_context(ob):
context = []
while ob is not None:
context.append(ob.aq_base)
ob = ob.aq_parent
ob = context.pop()
while context:
ob = context.pop().__of__(ob)
return ob

def aq_containment(ob):
context = []
while ob is not None:
context.append(ob.aq_base)
ob = ob.aq_inner.aq_parent
ob = context.pop()
while context:
ob = context.pop().__of__(ob)
return ob


As he pointed out, they'd make useful external methods too.

Perhaps these will find their way into Zope 2.3?

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope-dev] hmmm.. wierd permission issues with getPersistentItemIDs()...

2000-08-14 Thread Steve Spicklemire


Hi ZPatterns folks...

ZPatterns-0.4.1snap1
Zope2.2.0-src

I have a specialist with a defaultRack storing DataSkin subclassed
ZClass instances with only persistent attribute providers.

dtml-var "defaultRack.getPersistentItemIDs()"

or 

dtml-in "defaultRack.getPersistentItemIDs()"
...
/dtml-in

raise AuthorizationFailed

dtml-in "defaultRack.getPersistentItemIDs()" sort
...
/dtml-in

works fine. What did I do now? ;-)

thanks for any ideas!

-steve


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




Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Chris Withers

Evan Simpson wrote:
 I haven't got the whole reason, but here are some of the pieces:
 
 - never expose a "bare" object, or even one with an incomplete context

Why? You can get at it through aq_base anyway, surely?

Also, Jim Fulton wrote a while back:
 Sure. There is no guarentee that all objects are wrapped.

 - allow the user to backtrack along the context chain

I take it this is the reason for wrappers? Would it matter if the
wrappers were structured differently to provide a different search
order?

 These two together give you the part about aq_parent always being the
 previous acquisition result.

Yup, got that :-)

 - allow recovery of containment information

Urm, didn't quite follow that :S

 - base security on containment

aq_inner, right?

 These two motivate the simplification of raw acquisition.  

Which simplification is that?

 The current acquisition implementation is thus a weird hybrid of containment
 and context.  

I'll say ;-)

 It isn't hard to convert a standard acquisition wrapper into either of the
 other sort.  I'm going to propose adding something like the following
 functions:
 def aq_context(ob):
 def aq_containment(ob):

Okay, so taking our long-running example:

 A /
   I
   B/
 I
   C/
 D
 
 (A contains B and C, C contains D).
 (A contains an I, as does B)
 A.B.C.D

Which I, if any, would each of the following return:

dtml-var expr="aq_context(A.B.C.D).I"
dtml-var expr="aq_context(A.B.C).I"
dtml-var expr="aq_context(A.B).I"
dtml-var expr="aq_context(A).I"

dtml-var expr="aq_containment(A.B.C.D).I"
dtml-var expr="aq_containment(A.B.C).I"
dtml-var expr="aq_containment(A.B).I"
dtml-var expr="aq_containment(A).I"

cheers,

Chris

___
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] ZCatalog brains

2000-08-14 Thread Chris Withers

Steve Alexander wrote:
 Although there are ways to do this now, I guess I was wondering about
 making it a standard part of catalogs.

I'm sure code will be greatfully recieved ;-)

 Thinking further though, if it is as easy as adding "url" to the
 catalog's metadata, why bother?

Hmm, how about (for Zope 2.2 anyway) just adding a metadata column
called getPhysicalPath?

As long as your catalogued items support the traversal interface, this
should work fine :-)

cheers,

Chris

___
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] hmmm.. wierd permission issues with getPersistentItemIDs()...

2000-08-14 Thread Steve Alexander

Steve Spicklemire wrote:
 
 Hi ZPatterns folks...
 
 ZPatterns-0.4.1snap1
 Zope2.2.0-src
 
 I have a specialist with a defaultRack storing DataSkin subclassed
 ZClass instances with only persistent attribute providers.
 
 dtml-var "defaultRack.getPersistentItemIDs()"

When I call that, I get BTreeItems object at 869a5d8. To get that list
of IDs, I use an external method:


def get_persistent_ids(self):
try:
items = self.defaultRack.aq_base.getPersistentItemIDs()
return map(lambda x: x, items)

except:
import sys, traceback, string
etype, val, tb = sys.exc_info()
sys.stderr.write(string.join(traceback.format_exception(etype,
val, tb),''))
del etype, val, tb

I've tried something like your code, with no sheetproviders in the rack.
I can't reproduce your error. I'm using the method as a Manager.
 
 or
 
 dtml-in "defaultRack.getPersistentItemIDs()"
 ...
 /dtml-in
 
 raise AuthorizationFailed
 
 dtml-in "defaultRack.getPersistentItemIDs()" sort
 ...
 /dtml-in
 
 works fine. What did I do now? ;-)

Line 318, Rack.py. The method getPersistentItemIDs has no docstring. Is
that still significant under the new security model?

Does the user you're running the method as have the permission "Access
contents information" ?

Looks like you may have uncovered a Zope security bug in dtml-in ...
sort :-/

How could we test this further?

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net

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




[Zope-dev] Re: Zope security alert and hotfix product...

2000-08-14 Thread Brian Lloyd

   The issue involves the fact that the getRoles method of 
 user objects 
   contained in the default UserFolder implementation returns 
 a mutable 
   Python type. Because the mutable object is still 
 associated with the 
   persistent User object, users with the ability to edit DTML could 
   arrange to give themselves extra roles for the duration of 
 a single 
   request by mutating the roles list as a part of the request
 processing. 
 
 OK, so I can exploit this with something similar to
 user.getRoles().append('A Role That I Dont Have')
 
 But, why isnt the append method covered by the new
 inaccessible-by-default 2.2 security rules?

Back when we were considering how much tightening would 
be considered acceptable in one dose, we ended up not 
preventing access to methods of mutable python types 
([], {}). The main reason that we were aware of a fair 
number of people using this (including one or two internal 
things) for legitimate things:

  dtml-var "REQUEST.set('some_stuff', [])"
  dtml-in other_stuff
dtml-call "some_stuff.append(_['sequence-item'])"
  /dtml-in

etc. So we made the decision not to break those things. 
The real problem, of course, is that the Zope APIs (and 
the APIs of add on products) should not return references 
to mutable subobjects. If an API method must return a 
mutable Python type, it should return a copy rather than 
a direct reference:

  def myMethod(self):

# self.stuff is a dict

# dont do this!
return self.stuff

# do this instead
return self.stuff.copy()

# or if stuff is a list either do:
return self.stuff[:]

# or 

return tuple(self.stuff)


Now - should methods of mutable types be off-limits in the 
future? I'm not sure that the jury is in yet on that. Consider 
that PythonMethods (that soon will be part of the core) play 
by basically the same rules as dtml. While it might be pretty 
easy to argue that the list-juggling in my DTML example above 
is bad practice, I think most people would expect to be able 
to do:

  mylist=[]
  mylist.append('one')
  return mylist

...in a PythonMethod and have it work. I don't think it would 
be acceptable for 'append' to be off-limits in this case, so 
the alternative is that the security machinery would somehow 
have to be able to distinguish mutables created by the user 
from those obtained from the secure environment. That would 
probably mean that API code would have to make some sort of 
security assertions about mutables they returned. Exactly 
how that would work I don't know...


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


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




Re: [Zope-dev] Acquisition Confusion :S

2000-08-14 Thread Evan Simpson

From: Chris Withers [EMAIL PROTECTED]
  - never expose a "bare" object, or even one with an incomplete context

 Why? You can get at it through aq_base anyway, surely?

Only from unrestricted code.  DTML and (CVS) Python Methods only let you
access aq_parent.  This only applies to objects that are part of the
containment hierachy, of course.  Brand new objects aren't wrapped, nor are
simple non-persistent types like lists and dicts.

  - allow the user to backtrack along the context chain

 I take it this is the reason for wrappers? Would it matter if the
 wrappers were structured differently to provide a different search
 order?

Only to anyone who depends on the current behavior :-)  Also, there is a
very limited range of "natural" ways to construct the wrappers.  Once
contructed, of course, we can fool with them in arbitrary ways.

  - allow recovery of containment information

 Urm, didn't quite follow that :S

We want to be able to find out what an object's container is, regardless of
what we acquired it from.  In raw acquisition, there's no straightforward
way to do this.  In simplified acquisition, aq_inner.aq_parent is the
container.  The simplification is the rule (A o B) o (B o C) = A o (B o C).

 Okay, so taking our long-running example:

  A /
I
B/
  I
C/
  D
 
  (A contains B and C, C contains D).
  (A contains an I, as does B)
  A.B.C.D

 Which I, if any, would each of the following return:


All of these would search the dotted expression from right to left, so they
would give you B's I.
 dtml-var expr="aq_context(A.B.C.D).I"
 dtml-var expr="aq_context(A.B.C).I"
 dtml-var expr="aq_context(A.B).I"

All of these would search the containers of the right-most object, so the
first two would give you A's I, and the third B's I.
 dtml-var expr="aq_containment(A.B.C.D).I"
 dtml-var expr="aq_containment(A.B.C).I"
 dtml-var expr="aq_containment(A.B).I"

Cheers,

Evan @ digicool  4-am


___
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] Re: Zope security alert and hotfix product...

2000-08-14 Thread Andrew Wilcox

Now - should methods of mutable types be off-limits in the 
future?  [...]  I don't think it would 
be acceptable for 'append' to be off-limits in this case, so 
the alternative is that the security machinery would somehow 
have to be able to distinguish mutables created by the user 
from those obtained from the secure environment. That would 
probably mean that API code would have to make some sort of 
security assertions about mutables they returned.

I have another alternative --

Unless I really intend to return an unprotected mutable across subsystems,
most often it's a mistake.  Even if security isn't an issue, it leads to
wonderfully obscure bugs if a customer of my class blithely modifies my
return value.  (I returned it to you, after all, you thought it was yours
now!)  If I do want to return a dictionary for you to *read*, I could just
as easily code my intention and return a read-only class that implements
__getitem__. 

Since on occasion I might deliberately want to return an unprotected
mutable value for a good reason, what would be helpful is if the security
system forbid me from returning unprotected mutable values unless I
explicitly say I intend to do so.  I'd encourage the check to recursively
descend through tuples and, if we create a standard read-only dictionary
for everyone to use, through read-only dictionaries.

Note such a check would be just as helpful for products written using
Python Methods, or DTML, as it would be for products written in plain Python.

Then the security system doesn't need to keep track of where unprotected
mutables came from.  Once I've said explicitly that I intend to return an
unprotected mutable, I can take care to return a copy that I don't use
after I've passed it on to you.

Andrew



___
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] zope221b1 - zclass zexp import into clean database error

2000-08-14 Thread Brian Lloyd

Shane has tracked this down to a mis-bugfix in the beta - 
the fix will be in the 2.2.1 final.


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




 -Original Message-
 From: Dr. Ross Lazarus [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, August 12, 2000 9:49 PM
 To: [EMAIL PROTECTED]
 Cc: Brian Lloyd
 Subject: [Zope-dev] zope221b1 - zclass zexp import into clean database
 error
 
 
 More on testing zope221b1 - source tar, redhat 6.2
 I seem to be the only one reporting problems on the list (0-:) - it
 really is just me.
 Thought I better try again - start with a clean slate
 
 So, I restarted zope with a new empty Data.fs from the 221b1 source
 distribution.
 Started as superuser, made a real user with manager/owner rights.
 Logged in as the real user, took ownership of the entire heirarchy.
 Tried to import a zclass zexp file freshly exported from 
 2.2.0 that I've
 been happily using with 2.2.0 and previously.
 Traceback appears below
 
 ===
 Zope Error
 Zope has encountered an error while publishing this resource. 
 
 Error Type: Permission mapping error
 Error Value: Attempted to map a permission to a permission, Add SMP
 Blocks, that is not valid. This should never happen. (Waaa). 
 
 
 
 --
 --
 
 Troubleshooting Suggestions
 
 The URL may be incorrect. 
 The parameters passed to this resource may be incorrect. 
 A resource that this resource relies on may be encountering an error. 
 For more detailed information about the error, please refer 
 to the HTML
 source for this page. 
 
 If the error persists please contact the site maintainer. 
 Thank you for
 your patience. 
  
 
 
 
 Traceback (innermost last):
   File 
 /usr/local/home/rossl/zope221b1/lib/python/ZPublisher/Publish.py,
 line 222, in publish_module
   File 
 /usr/local/home/rossl/zope221b1/lib/python/ZPublisher/Publish.py,
 line 187, in publish
   File 
 /usr/local/home/rossl/zope221b1/lib/python/Zope/__init__.py, line
 221, in zpublisher_exception_hook
 (Object: Traversable)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/ZPublisher/Publish.py,
 line 171, in publish
   File 
 /usr/local/home/rossl/zope221b1/lib/python/ZPublisher/mapply.py,
 line 160, in mapply
 (Object: manage_importObject)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/ZPublisher/Publish.py,
 line 112, in call_object
 (Object: manage_importObject)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/OFS/ObjectManager.py,
 line 508, in manage_importObject
 (Object: Traversable)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/OFS/ObjectManager.py,
 line 263, in _setObject
 (Object: Traversable)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/OFS/ObjectManager.py,
 line 271, in manage_afterAdd
 (Object: Traversable)
   File /usr/local/home/rossl/zope221b1/lib/python/ZClasses/ZClass.py,
 line 422, in manage_afterAdd
 (Object: ZBlockStore)
   File 
 /usr/local/home/rossl/zope221b1/lib/python/OFS/ObjectManager.py,
 line 271, in manage_afterAdd
 (Object: Traversable)
   File /usr/local/home/rossl/zope221b1/lib/python/App/Factory.py, line
 144, in manage_afterAdd
 (Object: RoleManager)
   File
 /usr/local/home/rossl/zope221b1/lib/python/AccessControl/Permi
 ssionMapping.py,
 line 137, in manage_setPermissionMapping
 (Object: RoleManager)
 (Info: (['', 'Access contents information', 'Add Database 
 Methods',
 'Add Documents, Files, and Images', 'Add Documents, Images, 
 and Files',
 'Add External Methods', 'Add Folders', 'Add LDAPAdapter Object', 'Add
 MailHost objects', 'Add Survey Creator', 'Add Sybase Database
 Connections', 'Add TinyTable', 'Add User Folders', 'Add 
 Versions', 'Add
 Vocabularies', 'Add Z Gadfly Database Connections', 'Add ZCatalogs',
 'Add ZWiki Pages', 'Add Zope Tutorials', 'Browse LDAPAdapter', 'Change
 DTML Documents', 'Change DTML Methods', 'Change Database Connections',
 'Change Database Methods', 'Change External Methods', 'Change 
 Images and
 Files', 'Change LDAPAdapter', 'Change TinyTable', 'Change Versions',
 'Change ZWiki Pages', 'Change configuration', 'Change permissions',
 'Change proxy roles', 'Change survey', 'Create class 
 instances', 'Create
 survey', 'Delete objects', 'Edit Factories', 'FTP access',
 'Import/Export objects', 'Join/leave Versions', 'Manage Vocabulary',
 'Manage Z Classes', 'Manage ZCatalog Entries', 'Manage properties',
 'Manage users', 'Open/Close Database Connection', 'Open/Close Database
 Connections', 'Query TinyTable Data', 'Query Vocabulary', 
 'Save/discard
 Version changes', 'Search ZCatalog', 'Submit survey', 'Take 
 ownership',
 'Test Database Connections', 'Undo changes', 'Use Database Methods',
 'Use Factories', 'Use mailhost services', 'View', 'View 
 History', 'View
 management screens'], 'Add SMP Blocks', 0))
 Permission 

[Zope] Letting a content manager add ZClass instances

2000-08-14 Thread Jean Jordaan

Hi Zopers ..

I want content managers to be able to add and edit ZClass 
instances without having to negotiate the Zope management
interface. So I want them to visit the Add and Edit forms,
but to be redirected back to where they were browsing.

The best I could do was: in 'ccDocClass_add', the
ccDocClass constructor, check the user:


dtml-if DestinationURL

  dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
dtml-call "RESPONSE.redirect(
 DestinationURL+'/index_html')"
  dtml-else
dtml-call "RESPONSE.redirect(
 DestinationURL+'/manage_workspace')"
  /dtml-if

dtml-else


I gave their user both 'ContentManager' and 'Manager' roles, 
as I couldn't figure out which permissions 'ContentManager' 
needed to have. I gave it all the ones I thought obvious, but
was still being denied entrance.

Is there anything here I could do 1000 times better?

Yours,
-- 
jean

___
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] Editing ZClasses properties as ContentManager

2000-08-14 Thread Jean Jordaan

Hi Zopers,

In my ccDocClass / propertysheets / methods / edit_properties 
method, right after reindexing the changed instance like so:

  dtml-call
"propertysheets.ccDocProperties.manage_changeProperties(REQUEST)"
  dtml-call reindex_object

(from the How-To: Creating a CatalogAware ZClass
Created by AlexR. Last modified on 1999/10/31.)
I have the following:

FORM 
  dtml-if "AUTHENTICATED_USER.has_role('ContentManager')"
ACTION="dtml-var URL1" 
  dtml-else
ACTION="edit_propertiesForm" 
  /dtml-if
METHOD="GET"

Why do I get URL1 if I authenticate as the "superuser" (the user 
who installed Zope)? That user shouldn't have role ContentManager,
should it? Is this some kind of IE (5.5) caching hassle?

If I login as a different 'Manager' (defined in the root's acl_users
folder), I get edit_propertiesForm as I'd expect.

Another question: is there a good way to let a user login using 
only the builtin acl_users mechanism? Hmm, I think I answered my
own question: Say a href="confirmation"Login/a and make 
the 'confirmation' method require authentication. (Now how do 
you do that again?)

Ah well, g'night!
-- 
jean  (running Zope 2.1.6 on 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 )




Re: [Zope] ANNOUNCE: Zope 2.2.1 beta 1 released

2000-08-14 Thread Aleksander Salwa


On Thu, 10 Aug 2000, Brian Lloyd wrote:

 Hi all - 
 
   Zope 2.2.1 beta 1 has been released - you can download it from
   Zope.org:
 

Is there corrected this bug, that some ZClasses (probably those derived
only from ZObject (not from DTMLDocument, for example)), doesn't support
basic operations - 'paste', 'rename'... ?
(Announced on this mailing list some time ago.)

I can't find it in CHANGES.txt.


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/




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




[Zope] Start-up log?

2000-08-14 Thread William BC Crandall

G'morning all.

Simple question: Does Zope generate a log file 
noting each transaction, including start-up 
complaints?

(I get error messages that scroll out of sight
when I run START.BAT.)

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] application/octet-stream vs. application/msword

2000-08-14 Thread Jean Jordaan

Hi Dieter  all 

 The problem is, currently, not interesting enough for 
 me to analyse is seriously. 

I can well understand, I wish I could forget about it :(

 If you know, that you add only "*.doc" files 

I add .doc, .zip, .exe (self-extracting zip), .pdf and 
.ppt ... so the quick and dirty route won't save me this
time .. 

Thanks for your time till now!
-- 
jean

___
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] ZSQL returning a trailing L

2000-08-14 Thread didier georgieff

Hello,

I get a trailng "L" on smallint variables from ZSQL/MySQL on 2.1.4 (prod
server) but not on 2.1.6 (developt server).
I do remember a post some times ago about that, BUT i can't find it
again on the archives despite my (weak ?) efforts..
Any info/tip would be great as the production 2.1.4 is not migrate right
now.
Didier Georgieff

___
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] Simple DTML date-stamp

2000-08-14 Thread William BC Crandall

Holger, Peter, and Luis,

Thanks for your emails.

This:

dtml-with "this"
dtml-var bobobase_modification_time fmt=aCommonZ
/dtml-with

gave me what I was looking for. 

"http://www.zope.org/Members/AlexR/CustomDateFormats"

Was also a good pointer.

For those into historical trivia, what or who is "bobo"?

Regards,

___
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] zeo and rdb backend

2000-08-14 Thread Tino Wildenhain



"Bak @ kedai" wrote:
 
  "Bak @ kedai" wrote:
  
   BTW, site summary doesnot work with zeo.  i can vview an instance fine on the
   machine that server Data.fs, but not on the other machine.
   what should we look out for when considering zeo?
 
 
 boy, am i talking to myself a lot.  another follow up.  as always, right after
 i sent a distress signal to the list, i got enlightened.
 
 i missed all my external progs when i installed  the other machine.  so, in
 the hopes of not showing how dense i am ;), in conclusion
 -get a mirror copy of your working site - products, external methods, etc
 -change host for connectiing to SQL backend.   use ip, not localhost

Better: use hostname, not localhost-alias or ip. So you can assign this
Hostname
on the local machine with 127.0.0.1 and on the remote machine with the
network
interfaces ip-address. Just for performance...

 -make sure access are granted for all machines wanting to access the sql backend
 -to minimize error, make changes from one machine only.

I have to look further, but I think a good solution for local
configuration
issues would be a mountable database for specific sections (like
products
and some folders with database-connections and such)
Imagine a situation where different instances of zope, connected via zeo
have 
to use different database-connections (odbc for windows, any other for
unix).

Regards
Tino Wildenhain

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

2000-08-14 Thread Bill Welch

I'm having trouble with nested dtml-in. The outer ZSQL returns the
coordinates of a zip code as zlat and zlong. The inner ZSQL takes
zlat and zlong as well as Range and Otype as arguments.  

When I run it I get
  Error Type: Bad Request
  Error Value: ['zlat', 'zlong']

If I hardwire the inner one with just zlat and zlong, I get
  Error Type: Bad Request
  Error Value: ['Range', 'Otype']

If I hardwire the inner one with all four keyword arguments it runs fine.

Here're the relevant lines from my DTML Doc:

dtml-in zipCoord
  dtml-var Rangedtml-var zlatdtml-var zlongdtml-var Otype
  dtml-in orgZipRadius

Trace line prints fine when all four arguments are hardwired or inner ZSQL
is commented out.

Bill.


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




[Zope] (no subject)

2000-08-14 Thread Michel Houben

Hello,

I have a problem; How can I fix the date in Dutch, for example Vrijdag 12 
Augustus 2000 instead of Fruday 12 August 2000.

I hope you can help me with this problem.
Michel Houben


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




[Zope] FTP and container type products

2000-08-14 Thread Petr Knapek

Hi Zopists,
I have created new container product 'ISNG Folder' by modification of
classical Folder object. Only some attributes are added to every instance
of ISNG Folder and in future a more functionality. 
But when I try to put any object over ftp, an error occurs. I can't
create any object inside the ISNG Folder object over ftp. I have no such
problem when putting the object into ISNG Folder over web interface. Can
anybody tell me more about ftp access and help me with my problem?

Below the part of my source is listed.

Thanks, Petr


# -
# Here starts code for 'ISNG Folder' object


manage_addISNGFolderForm=HTMLFile('addFolder', globals())

def manage_addISNGFolder(self, cz_id, title='', key_words=[],
 createPublic=0,
 createUserF=0,
 REQUEST=None):
"""Add a new 'ISNG Folder' object with id *id*.

If the 'createPublic' and 'createUserF' parameters are set to any true
value, an 'index_html' and a 'UserFolder' objects are created respectively
in the new folder.
"""
author = repr(REQUEST.AUTHENTICATED_USER)
id = cz_id2id(cz_id)
ob=ISNGFolder()
ob.id = id
ob.cz_id = cz_id
ob.title = title
ob.creation = DateTime.DateTime(time.time())
ob.author = author
ob.modifier = author
ob.key_words = key_words
self._setObject(id, ob)
try: user=REQUEST['AUTHENTICATED_USER']
except: user=None
if createUserF:
if (user is not None) and not (
user.has_permission('Add User Folders', self)):
raise 'Unauthorized', (
  'You are not authorized to add User Folders.'
  )
ob.manage_addUserFolder()
if createPublic:
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_addDTMLDocument(id='index_html', title='')
if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1)




class ISNGFolder(OFS.Folder.Folder):
"""ISNGFolder class.

Is created by inheritance from Folder Zope object."""


meta_type = 'ISNG Folder'

manage_options = OFS.Folder.Folder.manage_options + ({'label':'Edit', 
'action':'manage_editForm'},)

__ac_permissions__ = OFS.Folder.Folder.__ac_permissions__

manage_editForm = HTMLFile('editFolder',globals())

   # manage_main = HTMLFile('editFolder',globals())

def manage_edit(self, title, key_words, REQUEST=None):
"""Edits title and key_words atributes of 'ISNG Folder"""
self.title = title
self.key_words = key_words
if REQUEST is not None:
return MessageDialog(
title = 'Edited',
message = 'Properties for %s changed' % self.cz_id,
action = './manage_main',
)
-- 
Petr Knpek
NEXTRA Czech Republic, s.r.o., Veve 102, 659 10 Brno, Czech Republic
e-mail: mailto:[EMAIL PROTECTED]
tel:+420-5-41 558 394
FAX:+420-5-41 558 390

___
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] Looking for different style

2000-08-14 Thread cuiod-tec Jens Gelhaar

I need a better way to render a DTMLDocument and store the result in
variable than
dtml-let variable="_['documentname']"
but I do not like the style, it looks clumsy. Is there an another way? I
would think something like documentname(...), but the acquisition does not
work.

Thanks Jens


___
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] tree plus/minus url

2000-08-14 Thread Tino Wildenhain



Ragnar Beer wrote:
 
 I found quite an easy solution for Zope 2.1.6:
 
 In lib/python/TreeDisplay/TreeTag.py you have to replace the "old
 code" with the "new code". (Blame me - I forgot to make a copy
 beforehands which keeps me from using diff.)
 
 The idea is to "export" the piece of code that puts together the url
 to treeData['tree-item-clickurl'] so that you can access it with
 dtml-var tree-item-clickurl within your tree-tag. I haven't checked
 this for unwanted side effects. Perhaps someone more familiar with
 the zope code could do that? For me it works fine!

Would you mind including an alias for tree-item-clickurl which reads
tree_item_clickurl before posting it to the collector?

I hope we can make all this ugly hypenation variables go away someday...

Regards
Tino Wildenhain
_[_['sequence-item']] avoidance taskforce.

___
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] Difference between 2 permissions

2000-08-14 Thread Tom Deprez

Hi,

What is the difference between 

Open/Close database connection

and

Open/Close database connections

Thanks in advance,

Tom.

___
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!! RE:mutilple select forms and ZSQL Method

2000-08-14 Thread Tino Wildenhain



Erik Lacson wrote:
 
 We are trying to insert an values from a multiple
 select form into an SQL Database. Does anyone know
 how to handle arguments of type 'list' inside an
 SQL Method ?

You could use dtml-in over the argument or
dtml-var "_.string.join(argument),' something between the values in the
statement')  ...
But note, there might be anything inside the variable which would 
not be properly sql-quotet this way. Can be very securety riscy.

Regards
Tino Wildenhain

___
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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Jean Jordaan

Hi all

I've got a lot of Word docs and Powerpoint presentations
and PDFs etc in the ZOBD, stored with their full text in
a property of the containing object, so that all those binary 
docs are searchable. This works great, but returns only the 
found objects and the cached properties specified in the 
MetaDate Table.

Wouldn't it be great to be able to give just a line or two
of context from the full text, the way Google does? I have
a feeling I'm asking for pie in the sky, but if anyone has
a brilliant (or a functional) solution I'd be delighted.

cheers,
-- 
jean

___
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 -- returning context of hits on fulltext

2000-08-14 Thread Geir Bækholt

on Monday, August 14, 2000 Jean Jordaan wrote :

JJ This works great, but returns only the
JJ found objects and the cached properties specified in the 
JJ MetaDate Table.

JJ Wouldn't it be great to be able to give just a line or two
JJ of context from the full text, the way Google does? I have
JJ a feeling I'm asking for pie in the sky, but if anyone has
JJ a brilliant (or a functional) solution I'd be delighted.

make a pythonmethod that returns the first 200 letters or
something  of the text , and add a metadata field to your
catalog referencing this pythonmethod..

-- Should give you what you want..

:-)

--
Geir Bækholt
web-developer/designer
[EMAIL PROTECTED]
http://www.funcom.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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Jean Jordaan

Hi Geir

 make a pythonmethod that returns the first 200 letters or
 something  of the text , 

I've already got a pretty structured-text "Abstract" field
that tells about the document, but I'd like to *see* the 
sentence on page 67 or wherever in a document where my 
term matches, so I know whether it's mentioned in passing
or really important .. 

-- 
jean

___
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] zeo and rdb backend

2000-08-14 Thread bak @ kedai

 I have to look further, but I think a good solution for local
 configuration
 issues would be a mountable database for specific sections (like
 products
 and some folders with database-connections and such)
 Imagine a situation where different instances of zope, connected via zeo
 have
 to use different database-connections (odbc for windows, any other for
 unix).

i think mountable databse is still alpha, even with filestorage.  not sure
whether it works if we use ZEO.

one thing that still bothers me, how can we minimize conflict error?  we
cannot restrict users from making changes, updates.  but users will complain
for such errors.

i'm looking at writing a howto use ZEO, and am looking for responses,notes
from the gurus, what's good, what to avoid, good design methods, multiple
storage points (still can't get to work), etc.  i need pointers, help
because i am a user not a brilliant programmer/developer like most of you
guys are, and do not fully understand ZEO.


 Regards
 Tino Wildenhain

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 )




[Zope] manage_upload not found?

2000-08-14 Thread Sean McGrath

I can call manage_addFile to add a new file to the ZODB.
If I try and add a file with the same id as an
existing object, I get an error from manage_addFile. Fair enough.
I looked at the source of the management interface and
say manage_upload used to change the contents of
an existing object. However, when I try and use
this Zope is saying it cannot find it.

Any ideas?

regards,

http://www.pyxie.org - an Open Source XML Processing library for Python


___
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] ZMySQLDA on Win32

2000-08-14 Thread William BC Crandall

[Re-sending w/o attachments -- too big for mail servers.]

William BC Crandall wrote:
 
 Chasing down MySQL question, I get here:
 
 (Besides having a strong urge to return to Linux ;)
 
 I now have three MySQL.pyd modules (attached for your
 inspection -- labeled 01,02,03). The oldest file (01) 'works',
 in that it imports into PythonWin (once the name is changed
 back to MySQL.pyd), and read its __doc__ files, etc.
 The other two break on import:
 
 ImportError: DLL load failed: One of the library files
 needed to run this application cannot be found."
 
 The one remaining MySQL.pyd module 'works': PythonWin loads it
 __doc__: 'MySQLmodule-1.4: A Python interface to the MySQL database.'
 And with it in zope/bin/lib, "Z MySQL Database Connection"s
 are available in Zope/manage.
 
 But, trying to 'test' a connection, with anything stronger than
 'use tmm' crashes Zope:
 
 PYTHON caused an invalid page fault in
 module MYSQL.PYD at 015f:012d3827.
 
 MySQL (3.23.21-beta), for it's part, hears Zope calling, and
 try's to respond (the two tests in Zope were 'use tmm'
 and 'select * from country'):
 
 C:\mysql\bin\mysqld.exe, Version: 3.23.21-beta-debug-log, started with:
 Tcp port: 3306  Unix socket: MySQL
 Time Id CommandArgument
 000814 12:18:13   1 Connectroot@localhost on
   1 Init DBtmm
 000814 12:18:44   1 Query  use tmm
 000814 12:19:02   1 Query  select * from country
 
 Then it waits politely to be shut down:
 
 000814 12:21:42   2 Connectroot@localhost on
   2 Shutdown
 
 Is there a problem with MySQL.pyd, or perhaps something with my
 login procedure?
 
 Zope has difficulty 'Computing default hostname' at start-up,
 and ends up using 'lap_will'.
 
 Or am I formatting test queries in Zope incorrectly?
 When I run the same queries ('use tmm'; 'select * from country')
 in the mysqlc monitor, the log shows the transactions thus:
 
 C:\mysql\bin\mysqld.exe, Version: 3.23.21-beta-debug-log, started with:
 Tcp port: 3306  Unix socket: MySQL
 Time Id CommandArgument
 000814 12:26:14   1 Connectwcra@localhost as anonymous on
   1 Query  show databases
   1 Query  show tables
 000814 12:26:31   1 Init DBtmm
   1 Query  show databases
   1 Query  show tables
   1 Field List city
   1 Field List country
   1 Field List newspaper
 000814 12:26:42   1 Query  select * from country
 000814 12:26:47   1 Quit
 000814 12:26:50   2 Connectroot@localhost on
   2 Shutdown
 
 Thanks to any and all for suggestions.
 
 [Phil, I tried your pointer to http://www.dustman.com, but cannot
 his server seems dead or gone.]
 
   
   Name: MySQL03.pyd
MySQL03.pydType: unspecified type (application/octet-stream)
   Encoding: base64
 
   Name: MySQL02.pyd
MySQL02.pydType: unspecified type (application/octet-stream)
   Encoding: base64
 
   Name: MySQL01.pyd
MySQL01.pydType: unspecified type (application/octet-stream)
   Encoding: base64

-- 
William BC Crandall
Wiesbaden . Germany
[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] GUF

2000-08-14 Thread Mathias Bengtsson

I'm afraid that this will be a little newie question.

How is the call to user_Authenticate used.
Is it throgh a dtml-call or a dtml-var or dtml-in ?
How am I supposed to pass the variables through to the function. How do
I "collect" the return value?

/Mathias




___
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 -- returning context of hits on fulltext

2000-08-14 Thread Chris Withers

Jean Jordaan wrote:
 I've already got a pretty structured-text "Abstract" field
 that tells about the document, but I'd like to *see* the
 sentence on page 67 or wherever in a document where my
 term matches, so I know whether it's mentioned in passing
 or really important ..

erk... that's a little harder :S

I don't know if Catalog can do it, but at the very least you'd need a
reference to your object to search the whole text, which means you loose
the 'cool' metadata feature of not sucking a lot fo resource for search
results.

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] manage_upload not found?

2000-08-14 Thread Phil Harris

Sean,

I *think* you have to call manage_upload of the object itself.

So if you have a DMTLMethod called doc then it would have to be:

   doc.manage_upload([file,REQUEST])

hth

Phil
[EMAIL PROTECTED]

- Original Message - 
From: "Sean McGrath" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 12:13 PM
Subject: [Zope] manage_upload not found?


 I can call manage_addFile to add a new file to the ZODB.
 If I try and add a file with the same id as an
 existing object, I get an error from manage_addFile. Fair enough.
 I looked at the source of the management interface and
 say manage_upload used to change the contents of
 an existing object. However, when I try and use
 this Zope is saying it cannot find it.
 
 Any ideas?
 
 regards,
 
 http://www.pyxie.org - an Open Source XML Processing library for Python
 
 
 ___
 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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Jean Jordaan

Dunno if Catalog can do it either .. not even if I do include the 
fulltext in the MetaData Table. 'Cause the hit will have come
from the indexed text, so it has no way of knowing *which* hit in
the original fulltext it was .. right?

-- 
jean

___
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] About Squishdot and permissions

2000-08-14 Thread Chris Withers

Jean Jordaan wrote:
   Unauthorized
   You are not authorized to access leftbox_items.

Either give the method making the call to leftbox_items the 'Manager'
proxy role or add 'Query TinyTable Data' to the list of permissions that
anonymous has.

Is anyone maintaining TinyTables these days?

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] Squishdot upgrade HELP- screwy max posts behaviour

2000-08-14 Thread Chris Withers

albert boulanger wrote:
 It would be nice is that ratio is a property that can be set.
 Also for an application that I am working on if all the attachments
 for postings go to a central table that can be displayed.

If you provide the patches, I'll be more than happy to include them ;-)

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] problems connections to database

2000-08-14 Thread Tom Deprez

Hi,

I get a strange error here. Suddenly the connection to my interbase db
doens't works anymore. I get the following message :

  H2Zope Error/H2
  PZope has encountered an error while publishing this resource.
  /P
  PSTRONGProducts.gvibDA.gvib.gvibExceptions.Error/STRONG/P
  
  Sorry, a Zope error occurred.p
!--
Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 240, in abort
  File /usr/local/zope/lib/python/ZODB/Transaction.py, line 155, in abort
  File /usr/local/zope/lib/python/Shared/DC/ZRDB/TM.py, line 126, in abort
  File /usr/local/zope/lib/python/Products/gvibDA/db.py, line 178, in _abort
  File gvib/gvib.py, line 466, in rollback
Error: - Unable to complete network request to host quot;localhostquot;.
-- Error writing data to the connection. -- Broken pipe

The thing is that I can access to the database with another program, but
with Zope I get this error. It has worked the past days, but now it keeps
returning this error.

Anybody an idea?

Thanks, Tom.


___
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] ANNOUNCE: Zope 2.2.1 beta 1 released

2000-08-14 Thread Aleksander Salwa


On Mon, 14 Aug 2000, Aleksander Salwa wrote:

 Is there corrected this bug, that some ZClasses (probably those derived
 only from ZObject (not from DTMLDocument, for example)), doesn't support
 basic operations - 'paste', 'rename'... ?
 (Announced on this mailing list some time ago.)
 
 I can't find it in CHANGES.txt.

I'm sorry, it was my misunderstanding. (as I remember more folks had
this problem before). Now I know, what is ZClasses:ObjectManager :))

Just to give some Zen for those with similiar troubles:
When building your own class, not deriving (directly or indirectly) from
any of built-in classes, you should select ZClasses:ObjectManager as a
base class in order to be able to copy/paste and so on...


[EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/



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




Re: [Zope] Removing tracebacks from error message

2000-08-14 Thread Chris Withers

Martijn Pieters wrote:
 On Thu, Aug 10, 2000 at 03:30:00PM -1000, David Trudgett wrote:
  I thought I solved this problem a while ago, but if so I can't remember
  how. I have a custom error page in Zope (2.1.6), but Zope wants to put the
  traceback information into an HTML comment at the foot of the page (which I
  don't want to have there). I set BOBO_DEBUG_MODE=0 and exported it in the
  "start" script, and also removed the "-D" from the command line that
  launches Z2.py. I thought that was all there was to it, but there must be
  something else that I've forgotten.
 
 Just removing the -D flag should do it. It may be that just having
 'BOBO_DEBUG_MODE' defined (whatever the value you set it to) triggers debug
 mode, so defining 'BOBO_DEBUG_MODE=0' may well set Debug Mode on :)

I think what David means is that, when not in debug mode, Zope appends
the error in HTML comments to the end of the HTML stream. There was a
thread on this not long ago and, IIRC, this was found to be hard coded
into Zope.

My own view is that Zope shouldn't stick any error messages into or on
the end of error reports. At best, it's bad HTML, at worst it's a
security risk (the python traceback includes the full paths of the files
on the machine...) If you want an error report/traceback, you should
specifically include it in standard_error_message.

Has anyone put this in the collector, or is it more suited to
dev.zope.org?

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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Chris Withers

Jean Jordaan wrote:
 
 Dunno if Catalog can do it either .. not even if I do include the
 fulltext in the MetaData Table. 'Cause the hit will have come
 from the indexed text, so it has no way of knowing *which* hit in
 the original fulltext it was .. right?

Yeah, but there may be some undocumented way of getting where the hit
came from in the attribute out of the catalog.

Your guess is as good as mine :S

UTSL ;-)

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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Toby Dickenson

On Mon, 14 Aug 2000 13:04:49 +0100, Chris Withers [EMAIL PROTECTED]
wrote:

Jean Jordaan wrote:
 I've already got a pretty structured-text "Abstract" field
 that tells about the document, but I'd like to *see* the
 sentence on page 67 or wherever in a document where my
 term matches, so I know whether it's mentioned in passing
 or really important ..

erk... that's a little harder :S

I don't know if Catalog can do it, but at the very least you'd need a
reference to your object to search the whole text, which means you loose
the 'cool' metadata feature of not sucking a lot fo resource for search
results.


If you really do have a 67 page document, it would be better to store
each page in its own ZODB object, and index each page individually.

With that scheme your search results page only has to load a few
pages, rather than a few documents.


Toby Dickenson
[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] problems connections to database

2000-08-14 Thread Bob Tierney

Tom,

Have you tried deleting the Interbase connection object, then restarting
Zope and then adding the Interbase connection object back in.  It may not
help but it might provide more clues as to where the problem lies.

Regards,

Bob

_

Robert E. Tierney   EMail: [EMAIL PROTECTED]
Going VirtualHTTP: www.goingv.com
10800 Independence Pointe Pkwy  Phone: 1-704-849-0731 x109
Matthews, NC 28105Fax: 1-704-849-2279
  AIM: RETierney
_

On Mon, 14 Aug 2000, Tom Deprez wrote:

 Hi,
 
 I get a strange error here. Suddenly the connection to my interbase db
 doens't works anymore. I get the following message :
 
   H2Zope Error/H2
   PZope has encountered an error while publishing this resource.
   /P
   PSTRONGProducts.gvibDA.gvib.gvibExceptions.Error/STRONG/P
   
   Sorry, a Zope error occurred.p
 !--
 Traceback (innermost last):
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 222, in
 publish_module
   File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish
   File /usr/local/zope/lib/python/Zope/__init__.py, line 240, in abort
   File /usr/local/zope/lib/python/ZODB/Transaction.py, line 155, in abort
   File /usr/local/zope/lib/python/Shared/DC/ZRDB/TM.py, line 126, in abort
   File /usr/local/zope/lib/python/Products/gvibDA/db.py, line 178, in _abort
   File gvib/gvib.py, line 466, in rollback
 Error: - Unable to complete network request to host quot;localhostquot;.
 -- Error writing data to the connection. -- Broken pipe
 
 The thing is that I can access to the database with another program, but
 with Zope I get this error. It has worked the past days, but now it keeps
 returning this error.
 
 Anybody an idea?
 
 Thanks, Tom.
 
 
 ___
 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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Jean Jordaan

Hi Toby

 If you really do have a 67 page document, 

For the sake of the argument, that was page 67 of a 149-page
document .. 

 it would be better to store each page in its own ZODB 
 object, and index each page individually.

Well, the number of pages depends on the formatting .. but it
might be an idea -- chunking the input, say a paragraph, or, 
better, a sentence at a time.

I want to spend the absolute minimum time doing anything like 
that manually though. Content managers should be able to add a 
document without jumping through any hoops. So that chunking 
should be automatic. 

-- 
jean

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




[Zope] Import broken by namespace conflict - fragile!

2000-08-14 Thread Jason CUNLIFFE [EMAIL PROTECTED]

Hello

This is a repost of a serious message I posted on friday.
[The threaded version of this list is corrupted - my message content has
been automatically replaced by another person's message, athough strangely,
the gzip archive is ok.]


Please can someone help us understand how to avoid DTML method names
conflicting with other zope objects with same name.

For example using Zope export/import during recent site development to
transfer work from local machines to the linux server broke sections of our
site in a manner which was very hard to find. The reason we have finally
traced to namespace conflict.

We imported code which included calls to a local zope object named 'swf' for
simple substitution. But suddenly our code did not work. It turned out that
another object identically named 'swf'  was an already existing 'folder'
..!!

This is a very disturbing discovery, becuase it implies that one might have
anywhere at anytime hidden or visible namespace conflicts emerging and
vanishing with no control. We had thought that dtml-with
something/dtml-with would avoid this. But it does not and may even cause
it! It also implies that makes development of Zope sites across various
machines very hit-or-miss

Please help..

Exact code dump follows...

1. I have an original DTML template called 'objembedswf' in a folder named
'Flash4'

OBJECT ID='login' CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-44455354'

CODEBASE='http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0
,0'
WIDTH=dtml-var width HEIGHT=dtml-var height
  PARAM NAME='Movie' VALUE='dtml-var swf'
  PARAM NAME='Play' VALUE='false'
  PARAM NAME='Quality' VALUE='best'
  PARAM NAME='swLiveConnect' VALUE='true'
  PARAM NAME='menu' VALUE='false'
  EMBED NAME='login' mayscript='mayscript' SRC='dtml-var swf'
swLiveConnect='true'
   WIDTH='100%' HEIGHT='100%' salign='t' quality='best' play='false'
menu='false'
   TYPE='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash'
  /EMBED
/OBJECT


2. Below this my DTML file includes calls to this template like this:

dtml-with Flash4
dtml-call "REQUEST.set('swf','login.swf')"
dtml-call "REQUEST.set('width','100%')"
dtml-call "REQUEST.set('height','100%')"
dtml-var objembedswf
/dtml-with


3. Here is the result of substitution returned in browser

OBJECT ID='login' CLASSID='clsid:D27CDB6E-AE6D-11cf-96B8-44455354'

CODEBASE='http://active.macromedia.com/flash2/cabs/swflash.cab#version=3,0,0
,0'
WIDTH=100% HEIGHT=100%
  PARAM NAME='Movie' VALUE='Folder instance at 8557b00'
  PARAM NAME='Play' VALUE='false'
  PARAM NAME='Quality' VALUE='best'
  PARAM NAME='swLiveConnect' VALUE='true'
  PARAM NAME='menu' VALUE='false'
  EMBED NAME='login' mayscript='mayscript' SRC='Folder instance at
8557b00' swLiveConnect='true'
   WIDTH='100%' HEIGHT='100%' salign='t' quality='best' play='false'
menu='false'
   TYPE='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash'
  /EMBED
/OBJECT

I draw you attention to the fact that dtml-var swf was supposed to be
subsituted with 'login.swf',  but instead became Folder instance at
8557b00
..ouch..


4. The reason appears to be that there is a namespace conflict elsewhere in
my Zope tree. As it turns out, we have a folder right under / called 'swf'.
In fact it could be many places and still cause a conflict.

This 'bug/feature' is the same under Zope 2.1.6, and Zope 2.2.0 in Win98se
and LinuxRedhat.
Is it something about dtml-with or perhaps our use of dtml-call
"REQUEST.set which creates this unpredictable and confusing effect?
Is this is a bug? As it stands it means is is very hard to have people
working on separate sections of a Zope site because at any time they might
be causing namespace collisions like this. In our case the effect was
obvious - our swf files immedaitely woudl not display. But other voodoo
could easily occur which migh not appear for some time.

It provokes me to ask simply what is the search path priority of object
acquistion in zope and how do you control it safely?

Thank you
- Jason Cunliffe




___
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] Using Zope as App Server for non http-Protocols

2000-08-14 Thread Toby Dickenson

On Fri, 11 Aug 2000 23:30:43 +0200, "Philipp Auersperg"
[EMAIL PROTECTED] wrote:

We want to (mis)use zope as an application server servicing a proprietary non-http 
protocol 
for transmitting compressed data.

Its easy to overlook http if your application is not a conventional
'web' application, but there are strong reasons for sticking with http
if possible: you can benefit from the existing tools and
infrastructure, plus Zope already talks http.

SOAP looks like it will be popular for similar reasons.

What do you need to do that makes http unsuitable?



Toby Dickenson
[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] Zope culture (Was: [Zope] Simple DTML date-stamp)

2000-08-14 Thread William BC Crandall

Hello Chris, 

Thanks for the historical pointer.

Also explains why 'Add Z Gadfly Database Connection'
pops up a strange sounding comment for new Zopers:

Additional data sources may be created by making 
additional directories in the var/gadfly subdirectory 
of your Principia installation. 
^

Another question of 'Zope Culture': Is the anti Win98 feeling 
I get an accurate assessment of the Zopista community?

I've been having more than a little difficulty installing 
MySQL-Zope tools on Win98 ('ZMySQLDA on Win32'). Only one 
person (Phil Harris) has been willing to answer questions.

But the mailing list, by volume and quality, gives clear 
evidence of an active and intelligent Zope community.

Andy Dustman's documentation for what seems like a nice 
MySQL interface puts it clearly:

PWindows is EMnot/EM a supported platform. 

I currently function in two worlds, Win98 and Linux.
Would I be right to say that 90% of Zopers live in world
number two?

Regards,

___
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 culture (Was: [Zope] Simple DTML date-stamp)

2000-08-14 Thread Chris Withers

William BC Crandall wrote:
 Thanks for the historical pointer.

Read the QuickStart if you really want to dig up some archane terms ;-)
(Acquaduct, Bobo, Principia, etc)

 Another question of 'Zope Culture': Is the anti Win98 feeling
 I get an accurate assessment of the Zopista community?

Not so much the Zope community as anyone who runs servers IMHO :S

 I've been having more than a little difficulty installing
 MySQL-Zope tools on Win98 ('ZMySQLDA on Win32'). Only one
 person (Phil Harris) has been willing to answer questions.

Maybe he's tried it, I know i haven't...

 But the mailing list, by volume and quality, gives clear
 evidence of an active and intelligent Zope community.

Thanks, on their behalf ;-)

 I currently function in two worlds, Win98 and Linux.
 Would I be right to say that 90% of Zopers live in world
 number two?

I dunno. Lots of Linux yes, but a lot of other *nix too and at least a
proportion of WinNT and 2K.

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] Problem to access my DTML files

2000-08-14 Thread Jarkko Veijalainen

Hi!

I developed my project on Zope 2.1.6 on NT environment.
Last week i installed Zope 2.2.0 on Solaris 8.
i transferred my project to 'new' Zope.

But when i try to access my DTML document comes authentication window. I
can't authenticate it in any of my usernames.

Traceback (innermost last): File
/usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 222, in
publish_module File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py,
line 187, in publish File
/usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 171, in publish
File /usr/local/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160, in
mapply (Object: email_accounts) File
/usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 112, in
call_object (Object: email_accounts) File
/usr/local/Zope-2.2.0/lib/python/OFS/DTMLDocument.py, line 170, in __call__
(Object: email_accounts) File
/usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_String.py, line 502, in
__call__ (Object: email_accounts) File
/usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Let.py, line 147, in
render (Object: resDTML="Imap('Authentication',REQUEST,1)") File
/usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line 337, in
eval (Object: resDTML.cn) (Info: resDTML) File string, line 0, in ? File
/usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py, line 142, in
careful_getattr File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLMethod.py,
line 189, in validate (Object: email_accounts) File
/usr/local/Zope-2.2.0/lib/python/AccessControl/SecurityManager.py, line 139,
in validate File
/usr/local/Zope-2.2.0/lib/python/AccessControl/ZopeSecurityPolicy.py, line
159, in validate Unauthorized: cn 
case is that i have login window which passes user information to another
DTML document. User information is different than my zope user.

ex. i log into my Zope management as jarkkov (so that stays at my browsers
cache, until i restart browser)
i type in my login document '66' and 'password', these values are
submitted to another document called email_accounts, which uses external
method with submitted parametres and return values into email_accounts
document. Above error message is shown. in zope 2.1.6 environment it did'nt
happen.

I tied to create all kind of users on users folder and tried to give all
permissions to anonymous user and tried to access anonymously thrue another
browser, but nothing seems to work.

This is essential that i can anonymously access to this DTML documents and
submit any kind of values on my REQUEST.

All the documents are on subfolder called testweb and i noticed that Zope
2.2.0, i have ownership in all documents and folders. testweb is owned
directly by jarkkov (testweb/acl_users) and all documents in that folder. 

I can't remove ownership or can i? Is it the blocking my access anonymously
to documents?
What i have to do to make my project work on new Zope version?

jarkkov



___
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] Persistence.py does not define Persistent

2000-08-14 Thread Skip Montanaro


I'm trying to publish my own module with ZServer (from Zope 2.2.0).  I get
the following traceback:

Traceback (most recent call last):
  File "z2.py", line 673, in ?
from AccessControl.User import super
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/AccessControl/User.py", 
line 89, in ?
import Globals, socket, regex, SpecialUsers
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/Globals.py", line 90, in ?
import Acquisition, ComputedAttribute, App.PersistentExtra, os
  File "/home/beluga/skip/src/Zope-2.2.0-src/lib/python/App/PersistentExtra.py", 
line 87, in ?
from Persistence import Persistent
ImportError: cannot import name Persistent

When I look at lib/python/Persistence.py, all I see is a copyright notice
and the following short doc string:

"""Provide access to Persistent and PersistentMapping

This avoids dependency on the database package name.
"""

I can't find a definition of an object named Persistent (probably ought to
be a class or ExtensionClass, based upon the usage I saw) anywhere in the
Zope 2.2.0 tree.

Suggestions?

-- 
Skip Montanaro ([EMAIL PROTECTED])
http://www.mojam.com/
http://www.musi-cal.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] zcatalog -- returning context of hits on fulltext

2000-08-14 Thread Jimmie Houchin

Hello,

I may be clueless and out of my league here and I haven't read the
sources so I don't know... Well enough of a disclaimer. :)

Is there anything in there which can provide the seek or byte position
of the hit within text object? If so, it shouldn't be too difficult to
read X bytes before and after the position and thereby provide what your
looking for.

This would be nice to have out of the box.

Just a thought.

Jimmie Houchin


Jean Jordaan wrote:
 
 Hi Geir
 
  make a pythonmethod that returns the first 200 letters or
  something  of the text ,
 
 I've already got a pretty structured-text "Abstract" field
 that tells about the document, but I'd like to *see* the
 sentence on page 67 or wherever in a document where my
 term matches, so I know whether it's mentioned in passing
 or really important ..
 
 --
 jean
 
 ___
 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] Zope culture (Was: [Zope] Simple DTML date-stamp)

2000-08-14 Thread Peter Bengtsson

  I currently function in two worlds, Win98 and Linux.
  Would I be right to say that 90% of Zopers live in world
  number two?

 I dunno. Lots of Linux yes, but a lot of other *nix too and at least a
 proportion of WinNT and 2K.


Why not set up a Poll on zope.org to find out about these things.
Like a weekly poll.
Here - DC - are some other questions I can consider to participate in:
- What platform do you use for your Zope?
- Do you use Apache (ZAP) infront of your Zserver?
- Are you subscribing to the mailing list?
- Do you check the mailing list archive before you post to the mailninglist?
- Are you webmaster of the server you run Zope on?
-
-

This would also make people go back to zope.org more often, and all its
benefits.
Count me in for help!


___
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 -- returning context of hits on fulltext

2000-08-14 Thread Jimmie Houchin

Hello,

I may be clueless and out of my league here and I haven't read the
sources so I don't know... Well enough of a disclaimer. :)

Is there anything in there which can provide the seek or byte position
of the hit within text object? If so, it shouldn't be too difficult to
read X bytes before and after the position and thereby provide what your
looking for.

This would be nice to have out of the box.

Just a thought.

Jimmie Houchin


Jean Jordaan wrote:
 
 Hi Geir
 
  make a pythonmethod that returns the first 200 letters or
  something  of the text ,
 
 I've already got a pretty structured-text "Abstract" field
 that tells about the document, but I'd like to *see* the
 sentence on page 67 or wherever in a document where my
 term matches, so I know whether it's mentioned in passing
 or really important ..
 
 --
 jean
 
 ___
 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] Problem with nested dtml-in

2000-08-14 Thread Bill Welch

I'm having trouble with nested dtml-in. The outer ZSQL returns the
coordinates of a zip code as zlat and zlong. The inner ZSQL takes
zlat and zlong as well as Range and Otype as arguments.  

When I run it I get:
  Error Type: Bad Request
  Error Value: ['zlat', 'zlong']

If I hardwire the inner one with just zlat and zlong, I get:
  Error Type: Bad Request
  Error Value: ['Range', 'Otype']

If I hardwire the inner one with all four keyword arguments it runs fine.

Here're the relevant lines from my DTML Doc:

dtml-in zipCoord
  dtml-var Rangedtml-var zlatdtml-var zlongdtml-var Otype
  dtml-in orgZipRadius

Trace line prints fine when all four arguments are hardwired or inner ZSQL
is commented out.

Bill.



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




Re: [Zope] Zope culture (Was: [Zope] Simple DTML date-stamp)

2000-08-14 Thread Toby Dickenson

On Mon, 14 Aug 2000 15:43:25 +0200, William BC Crandall
[EMAIL PROTECTED] wrote:

Another question of 'Zope Culture': Is the anti Win98 feeling 
I get an accurate assessment of the Zopista community?

Andy Dustman's documentation for what seems like a nice 
MySQL interface puts it clearly:

   PWindows is EMnot/EM a supported platform. 

I currently function in two worlds, Win98 and Linux.
Would I be right to say that 90% of Zopers live in world
number two?

Most of Zope (and python in general) is shockingly platform-neutral.

It sounds like the same might not be true of MySQL.


Toby Dickenson
[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] Seeking Zope Volunteers

2000-08-14 Thread Lyno Sullivan, Candidate

Greetings,

My name is Lyno Sullivan and I am the endorsed Independence Party (see
www.eIndependence.org) candidate to the Minnesota State Senate from the
Stillwater area, District 56, which is in Washington County and spans
Stillwater Township south to Hastings and west to Mahtomedi and part of
Oakdale and Woodbury.

I have obtained the endorsement of Richard Stallman, a leader of the free
software community, for my position on free software.  Please see:

http://www.lynosullivan.org/position/pos/964668700

If you visit lynosullivan.org and have a look around, you will get a feeling
for what the campaign teams are up to.  We are creating a product called
"Free Politics" ("free" as in "to free", "freedom" and "free software").  We
are using Red Hat Linux, Linux Router Project, Python, Zope, mySQL, Mailman,
etc.  Please see:

http://www.lynosullivan.org/free/FreePolitics

We are in desperate need of volunteers to help with various Zope and Python
programming assignments.  All this work will become part of the Free
Politics software which is already on the radar screen of some of Governor
Ventura's advisors.  With you help I am hopeful Free Politics can put free
software squarely onto the Minnesota political scene.  Our work might even
draw national recognition and acclaim.  As a politician I seek media
attention. I intend to offer our campaign as a showcase of how affordable
technology can be applied to politics.  Once I am elected our campaign web
site will become the prototype of a new kind of representative democracy
where politicians seek guidance from "We the People" instead of PAC, special
interest and lobbyist groups.  Free Politics has the potential to be really
big but I need your help to make it happen.  If you can volunteer some time
(even a few hours per week), please go to lynosullivan.org and complete the
Volunteer form.

If you cannot volunteer your time but would like to help, please consider
making a $5 to $500 contribution to my campaign.  If you are a Minnesota
eligible voter you can receive a refund on the first $50 through the
Minnesota Political Contribution Refund program.  My campaign cannot accept
contributions from corporations, PACs or special interest organizations so
we rely on contributions from individuals like you.

Thank you for considering our request for help.

Sincerely,

Lyno Sullivan

--
Lyno Sullivan
206 S. 5th. St.
Stillwater, MN 55082
651-430-0507
mailto: [EMAIL PROTECTED]
web: lynosullivan.org

Contributions: Campaign Fund of Lyno Sullivan
and mailed to the following address.  Prepared and paid for by the
Lyno Sullivan Volunteer Committee
P.O. Box 272
Stillwater, MN 55082
651-430-2815


___
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] use properties to get an object with dtml-var

2000-08-14 Thread Gerard Metrailler Jr.

Hello,

I am trying to get the following more generic.

dtml-var "content.whos_who.gmetrail.real_name"

In that case, content and whos_who are folder, gmetrail is a ZClass I 
created which derivates from Image and real_name is a property of that object.

What I am trying to do is getting something like:

dtml-var "user_info + REQUEST.AUTHENTICATED_USER + real_name" where 
user_info is a property that I defined in /

I've tried to use a dtml-with wrapped arround the dtml-var, but couldn't 
figure out how to get the dtml-with use the property instead of the 
hardcoded path.

Thank you for your help.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Technical Account Manager Europe
Phone: +41 (79) 239 25 08
Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.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] ANNOUNCE: Xron alpha version 0.0.9

2000-08-14 Thread Loren Stafford

Shortly after posting this, I found a buglet that causes an error when you
edit a Xron DTML Method that was created before version 0.0.9.

I upload the fixed product without changing the version number.

-- Loren

- Original Message -
From: "Loren Stafford" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: August 10, 2000 09:31 PM
Subject: ANNOUNCE: Xron alpha version 0.0.9


 Xron Version 0.0.9 Date: 2000/08/10

 1. Added simple rescheduling capability to the "reschedule" method. Now
you
 can make repetitive
  events without creating a subclass.

 http://www.zope.org/Members/lstaffor/Xron

 -- Loren



___
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] on ZCatalog

2000-08-14 Thread tav



since ZCatalog refuses to work with SiteRoot (SiteAccess), i 
have thought of implementing a temporary solution of making a dtml method 
which:

- deletes the SiteRoot object

- traverses the site for ZWiki pages to add to the 
ZCatalog

- adds the SiteRoot object back again

i am lost as to the dtml for getting ZCatalog to find and 
update all the ZWiki pages... :/

also, can someone advise me on how often i should call this 
method... so as to not cause too much strain on the machine

many thanks in advance

--
best regards, tav
http://plexnews.com


[Zope] Connection problem with database

2000-08-14 Thread Tom Deprez

Hi,

If somebody had the same problem as I've now, please let me know something:

At certain moments, Zope encounters problems connecting to my database
(Interbase, don't know if it is solely Interbase related). When I then
Close and reopen the connection, everything works fine again.

Somebody experienced this also? Found the error? Or what am I doing wrong?

More information on my situation:

The database isn't visited often at the moment (only by me). This is just a
test-setup. The error happens when there is a long time between 2 requests.
As if the connection closes itself, but doesn't opens itself again.

Thanks, Tom.



___
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] Best way to subclass DTML Document and some other ZClasses questions

2000-08-14 Thread Marcin Kasperski

I decided to subclass DTML Document and (using ZClass) create my own
document class (in fact I wanted all my documents to possess some
standard properties and prompt for them on initialization and also to be
CatalogAware). I succeeded (everything more-or-less works), but I still
have some doubts:

1) How can I set standard DTML Document properties (title!) from my
constructor? I created constructor form and constructor method, I
succesfully prompt for and set all my properties but I do not know how
to set properties belonging to DTML Document.

2) Can I do anything to have single property screen which would behave
as original DTML Document property screen but present both original
properties and properties belonging to my custom property sheet?

3) Can I influence property editing screens (what I want is to increase
some edit boxes)?

I created also some classes which do not inherit DTML Document or DTM
method. I have questions about such a configuration:

4) Can I do something to have ZCatalog PrincipiaSearch (i.e. full text
search) to scan some property of my custom ZClass (say property body
from propertysheet Basic)?

5) Can I write index_html method of my custom class so it interpret DTML
tags (like dtml-var substitution)?

And one question after the whole mess. I migrated my (fairly small so
far) website from DTML Documents to my custom document class - and I did
it manually. But I would not like to perform similar operation manually
if the site contained 500 or 5000 pages. 

6) What you, Zope gurus, would do if you were to find all the DTML
Documents in some directory tree and remove them, creating instead 
Documents (where  Document is some subclass of DTML Document) - and
keeping the document id, title, contents and properties without change? 

7) And what if you were to change something a little - say detect that
some property belongs to custom propertysheet and put it there instead
on putting on standard DTML Document propertysheet?

Regards and thanks in advance for any hints and references
Marcin


-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| Osoba jest omegalizacj ewolucji uniwersalnej na  okrelonym odcinku  
| etapowym (Teilhard de Chardin)
|

___
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] UserDb, GUF, LoginManager, etc, which one?

2000-08-14 Thread Andrew Wilcox

At 05:58 PM 8/14/00 +0200, Martijn Faassen wrote:
What I want is an acl_users equivalent that has an SQL database backend.
I want an easy to understand, easy to install solution for this that
has some kind of future in Zope land. Currently I'm deploying 2.1 but
that should change into 2.2 eventually.

Haven't needed to do this particular task myself, but I'll venture an
approach.  Based on code inspection rather than having a working solution,
so take it with a grain of salt.  If I were looking at this, I'd consider
coding a specific solution right in Python.  Not try to make it generic,
through-the-web, or customizable, but something very simple does the
specific job of looking up users directly from your particular database.
Take a look at the interface in AccessControl/User.py, you'll see it's
straightforward.  I'd try creating my own user folder class which
subclasses from BasicUserFolder just like UserFolder does.  When asked for
a user, such as by a getUser() method call, I'd try returning a SimpleUser
object with the fields filled in from my database.

Andrew



___
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] Create and start version?

2000-08-14 Thread Marcin Kasperski

Does there exist any simple method to add 'Create and Start Working In'
button on 'Add Version' page? I still repeat simple mistake with adding
version and forgetting to start working in it?

-- Serwis nie tylko mieszkaniowy: http://www.mk.w.pl 
|
| We want to know as early as possible whether or not this project will 
| succeed. Thus we attack the high-risk areas first. (Martin)   
|

___
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] accessing PARENTS from python???

2000-08-14 Thread Casey Duncan

Kevin Howe wrote:

 I am trying to access the PARENT of an object in a python class of mine.
 I want to use the absolute_url() of the parent in a variable.

 I though it could be done the following way, but got an error:

  parent=self.PARENTS[0]
  aurl = parent.absolute_url()

 I then tried using REQUEST. It works, but doesn't give the correct
 information. Instead of giving me the parent  of the current
object(self),
 it gives the parent of the DTML page in which the object was called.

  parent=self.REQUEST.PARENTS[0]
  aurl = parent.absolute_url()

 How do you resolve the PARENT object of an object?

you might want to try an alternative method using acquisition

aurl = self.aq_parent.absolute_url()

Kapil

This should also work:

aurl = self.getParentNode().absolute_url()


___
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: [Zope]compile ZPoPyDA product problem (the patch)

2000-08-14 Thread Stephen Nosal



Ed -

Sorry, I guess it was just sent to me.

Please enjoy, and good luck.

- Steve

--- Start of forwarded message ---
 
Subject: Re: [Zope]compile ZPoPyDA product problem (continued)
To: Stephen Nosal [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Federico Di Gregorio)
Date: Sat, 5 Aug 2000 10:21:02 +0200

hi,

it is my fault. i let a buglet infiltrate the last distribution.
you can solve it in two ways:

1/ ln -s /opt/pgsql/lib/libpq.so /usr/lib/libpq.so  (dirty!)
2/ apply attached patch
3/ wait a couple of days until 1.3.4 hits the ftp server
 
have fun with popy...

ciao,
federico

p.s. to apply patch:

cd /your/popy/directory
patch -p1 /the/path/to/the/patch

-- 
Federico Di Gregorio
MIXAD LIVE System Programmer   [EMAIL PROTECTED]
Debian GNU/Linux Developer  Italian Press Contact[EMAIL PROTECTED]
 A short story: I want you. I love you. I'll miss you. -- Me



__
Get your Private, Anti-Spam, Free Email at http://e3mil.com 
and Step into a Friendly Universe!


Index: PoPy/ChangeLog
diff -u PoPy/ChangeLog:1.27 PoPy/ChangeLog:1.28
--- PoPy/ChangeLog:1.27 Thu Aug  3 12:16:25 2000
+++ PoPy/ChangeLog  Sat Aug  5 10:21:06 2000
@@ -1,3 +1,9 @@
+2000-08-05  Federico Di Gregorio  [EMAIL PROTECTED]
+
+   * configure.in: fixed bug in --with-postgres-libraries switch. now
+   the library path is correctly added to LDFLAGS *before* checking
+   for libpq.
+
 2000-08-03  Federico Di Gregorio  [EMAIL PROTECTED]
 
* Makefile.pre.in: defines VERSION from POPY_VERSION in
Index: PoPy/configure.in
diff -u PoPy/configure.in:1.10 PoPy/configure.in:1.11
--- PoPy/configure.in:1.10  Thu Aug  3 12:07:14 2000
+++ PoPy/configure.in   Sat Aug  5 10:21:06 2000
@@ -8,11 +8,13 @@
 dnl postgresql headers and libraries (by default in /usr/lib and 
 dnl /usr/include/postgresql, can be changed with --with-postgres-* options)
 
-AC_ARG_WITH(postgres-libraries,  [  --with-postgres-libraries=DIR  PostgreSQL 
libs in DIR [/usr/lib]], PGSQLLIBS="-L $withval", PGSQLLIBS="")
+AC_ARG_WITH(postgres-libraries,  [  --with-postgres-libraries=DIR  PostgreSQL 
+libs in DIR [/usr/lib]], PGSQLLIBS="-L$withval", PGSQLLIBS="")
 AC_ARG_WITH(postgres-includes,  [  --with-postgres-includes=DIR   PostgreSQL 
includes in DIR [/usr/include/postgresql]], PGSQLFLAGS="-I$withval", 
PGSQLFLAGS="-I/usr/include/postgresql")
 
+LDFLAGS="$PGSQLLIBS $LDFLAGS"
+ 
 AC_CHECK_LIB(pq, PQconnectStart, PGSQLLIBS="$PGSQLLIBS -lpq",
-   AC_MSG_ERROR(can't build without PostgreSQL libraries))
+   AC_MSG_ERROR(can't build without PostgreSQL libraries), -lcrypt)
 AC_SUBST(PGSQLFLAGS)
 AC_SUBST(PGSQLLIBS)
 



[Zope] Implementing a login form instead of BASIC authentication

2000-08-14 Thread Meeting Maker Webmaster

Hello,

I am currently looking into implementing a login form to replace the 
standard BASIC authentication.

I've looked into AccessControl/User.py and there seems to be a validate 
function that would enable me to do it. The only problem is that I am 
unable to figure out how to use it.

The basic idea is to have a forms that requires the username and the 
password. This will then enable users to log into the system.

Thank you for your help.

Best regards,

Gérard Métrailler Jr.

Meeting Maker Inc.
... the intelligent choice for collaborative scheduling

Email: [EMAIL PROTECTED]
Web: http://www.meetingmaker.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] dtml-with namespace conflict question needs explanation

2000-08-14 Thread Casey Duncan

Jason Cunliffe Wrote:
 Hello

 Please can someone help us understand how to avoid DTML method names
 conflicting with other zope objects with same name.
...
 2. Below this my DTML file includes calls to this template like this:

 dtml-with Flash4
 dtml-call "REQUEST.set('swf','login.swf')"
 dtml-call "REQUEST.set('width','100%')"
 dtml-call "REQUEST.set('height','100%')"
 dtml-var objembedswf
 /dtml-with
...
 It provokes me to ask simply what is the search path priority of object
 acquistion in zope and how do you control it safely?

This appears to be a classic aquisition gotcha. You can use the "only"
option of the
dtml-with tag to eliminate namespace conflicts. However, in this case I
might suggest passing the parameters directly to objemedswf instead of using
REQUEST. like so:

dtml-var "Flash4.objembedswf(swf='login.swf', width='100%',
height='100%')"

This leaves no ambiguity about what is being called, where it is located and
what is being passed to it. This creates more readable code IMHO.

-Casey Duncan


___
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] substring search on zcatalog textindex

2000-08-14 Thread R. David Murray

On Thu, 10 Aug 2000, Chris Withers wrote:
 Casey Duncan wrote:
  TextIndexes index individual words separately (using a vocabulary object to
  identify each word in the catalog). All non-alphanumeric characters (such as
  punctuation) are dropped so that excludes searching for "?" or "*" or any
  other non-alphanumerics using TextIndexes.
 
 IIRC, you can use another Vocabulary that wouldn't necessarilly behave
 like that.
 I wonder if this works yet?
 
 If it does, my initial question still remains ;-)

In fact, to use substring matching on a text index, you have to
set the Vocabulary to support it *when you first create the ZCatalog*.
Which seems a little bit broken to me, since unless I missed
something you have to choose not to add a vocabulary when you first
create the ZCatalog, and then go add one with substring checked
from the management screens afterwards.  In the code the difference
between the checkbox checked and not checked is two different
lexicon implementations, not just the setting of a flag.  So you
can't just change the flag, you have to see to it that the whole
lexicon gets rebuilt.  I haven't checked into how you do that yet
wry grin.

As for your question about different vocabularies, punctuation,
and globbing support, all of that happens at the lexicon level.
That is, the lexicon implements the breaking up of strings into
indexable words (calling the splitter) and it also implements the
expansion of wildcards into matches.  It gets to do that *before*
the text index machinery parses the query, so it can decide on the
syntax rules, as far as I can see.  So if you want a Vocabulary
that supports punctuation and globbing, you'll have to write one,
and then *you* get to decide what the syntax is to handle the case
you ask about grin.

--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] Xron not seeming to work

2000-08-14 Thread Bill Anderson

Ok, after downloading the new Xron (0-0-9), I seem to have a problem.

This code:
=
dtml-with "PARENTS[-1].manage_addProduct['DinerItems']"
 dtml-call "DailyOrder_add(_.None, _)"
/dtml-with

dtml-with "PARENTS[-1]"dtml-sendmail mailhost=MailHost
To: Portal Admin [EMAIL PROTECTED]
From: Portal Admin [EMAIL PROTECTED]
Reply-To: Portal Admin [EMAIL PROTECTED]
Subject: REMINDER: Take out the garbage tonight!

Daily order Created
/dtml-sendmail/dtml-with "PARENTS[-1]"
=

works when I hit 'trigger', and reschedules itsself for the next day.
It does not, however, work at the specified time. No mail is sent, and
the adding of the product does not occur. :(

Any ideas?



-- 
Bill Anderson (ARC)Unix/Linux System Administrator
HPSO Engineering Productivity Team Thursday, July 13, 2000  
Random Quote:
  A bug in the hand is better than one as yet undetected.

___
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] substring search on zcatalog textindex

2000-08-14 Thread Casey Duncan

This is illuminating. I have a question maybe you (or somebody else) could
answer:

Searching TextIndexes you can use "and", "or" or "andnot" as query criteria.
I also see support in the source code for near searches using "..." in the
query string. I have not been able to get this to work (although the first
three work great for me), and would like to.

Am I missing something?

-Original Message-
From: R. David Murray [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 14, 2000 12:59 PM
To: Chris Withers
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Zope] substring search on zcatalog textindex


On Thu, 10 Aug 2000, Chris Withers wrote:
 Casey Duncan wrote:
  TextIndexes index individual words separately (using a vocabulary object
to
  identify each word in the catalog). All non-alphanumeric characters
(such as
  punctuation) are dropped so that excludes searching for "?" or "*" or
any
  other non-alphanumerics using TextIndexes.

 IIRC, you can use another Vocabulary that wouldn't necessarilly behave
 like that.
 I wonder if this works yet?

 If it does, my initial question still remains ;-)

In fact, to use substring matching on a text index, you have to
set the Vocabulary to support it *when you first create the ZCatalog*.
Which seems a little bit broken to me, since unless I missed
something you have to choose not to add a vocabulary when you first
create the ZCatalog, and then go add one with substring checked
from the management screens afterwards.  In the code the difference
between the checkbox checked and not checked is two different
lexicon implementations, not just the setting of a flag.  So you
can't just change the flag, you have to see to it that the whole
lexicon gets rebuilt.  I haven't checked into how you do that yet
wry grin.

As for your question about different vocabularies, punctuation,
and globbing support, all of that happens at the lexicon level.
That is, the lexicon implements the breaking up of strings into
indexable words (calling the splitter) and it also implements the
expansion of wildcards into matches.  It gets to do that *before*
the text index machinery parses the query, so it can decide on the
syntax rules, as far as I can see.  So if you want a Vocabulary
that supports punctuation and globbing, you'll have to write one,
and then *you* get to decide what the syntax is to handle the case
you ask about grin.

--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] Editing dtml using ftp, and errors.

2000-08-14 Thread rob

Hi

If I try to save a dtml method in emacs which has errors, I get:

426 Error creating file. 

Is there any way of seeing more information about the error, like what
the web interface provides?

-- 
Rob Murray

___
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] on ZCatalog

2000-08-14 Thread Andy McKay



You dont need to delete and then add back in the 
SiteRoot object, just alter the url that is passed to ZCatalog.

--  Andy McKay, Developer, 
ActiveState http://www.ActiveState.com 
Programming for the People


- Original Message - 
From: tav 
To: [EMAIL PROTECTED] 
Sent: Monday, August 14, 2000 9:16 AM
Subject: [Zope] on ZCatalog

since ZCatalog refuses to work with SiteRoot (SiteAccess), i 
have thought of implementing a temporary solution of making a dtml method 
which:

- deletes the SiteRoot object

- traverses the site for ZWiki pages to add to the 
ZCatalog

- adds the SiteRoot object back again

i am lost as to the dtml for getting ZCatalog to find and 
update all the ZWiki pages... :/

also, can someone advise me on how often i should call this 
method... so as to not cause too much strain on the machine

many thanks in advance

--
best regards, tav
http://plexnews.com


[Zope] restrict -tree tag global navigation- to subfolders

2000-08-14 Thread Marcus Schopen

Hi,

I found this to create tree tag global navigation:
http://lists.zope.org/pipermail/zope/1999-February/002164.html

Is it possible (and how) to change the DTML method SideBar to list only
subfolders of the directory where SiteBar itself has been created? Background:

Under the Zope root-folder our homepage has subfolders of different people, eg.
   www.jura.uni-bielefeld.de/web_for_Prof_A
   www.jura.uni-bielefeld.de/web_for_Prof_B


Now I would like to have an automatic Navigation like the above global navigation, but
one for each web_for_Prof_X and only with the content of this subfolder.

Thank you for helping
Marcus
__

 (0   Marcus Schopen
 //\   Bielefeld, Germany
 V_/_
__


___
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: Xron seems to not work

2000-08-14 Thread Loren Stafford


From: "Bill Anderson" [EMAIL PROTECTED]
  Bill,
 
  After the scheduled time, is there anything in the STUPID_LOG_FILE?
What?

 --
 2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr
 Trigger event: http://telescop:8100/MakeDailyOrder
 Trigger time: 2000/08/14 13:15:00 US/Mountain
 Failed to trigger event.
 Type=bci.NotAvailable
 Val=argument 1: expected read-only character buffer, tuple found (File:
 http://telescop:8100/MakeDailyOrder/trigger Line: [])
 None None for None
 --
 2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr Failed to disarm
 event


That's the Client.py bug (there's a proper patch here:
http://classic.zope.org:8080/Collector/1480/view).

-- Loren




___
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] dtml-in and tuples

2000-08-14 Thread Chris Withers

Hi,

Why and how are python tuples (like, this) handled differently (and not
in a logical way I can see...) than python lists [like, this]?

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] UserLDAP and DTML

2000-08-14 Thread Eric Shuman

I have just installed the recent product betas of ZopeLDAP and 
UserLDAP.  Everything seems to be working except for one problem.  DTML 
statements do not seem to be recognized by the LDAP queries. The 
"ldapUserQuery" under the properties of the "acl_users" folder created by 
the addition of a "User LDAP" object is the key offender.   In this query 
there is this statement:

uid=!--#var name --

The parameter "name" is passed to the query.  If run here are the results:

-
no results

Filter used:

uid=!--#var name --

--
If I hard code the query to use a specific uid then everything words 
fine.  Has anyone else run into this issue?  Any ideas on what may be the 
problem? Are there any specific permissions that need to be set?


Thanks for the help,

Eric Shuman

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




Re: [Zope] Requested Zope feature

2000-08-14 Thread R. David Murray

On Wed, 9 Aug 2000, Martijn Pieters wrote:
 I am currently implementing Skinnable objects for Zope that'll allow you to
 easily define an alternative version of the management interface, and switch
 between these interfaces very easily. You could build your own version that
 doesn't use JavaScript at all.
 
 IIRC, you can tell Mozilla to switch on JavaScript for certain sites though.
 Believe me, it'll be worth your while allowing JS in the Zope management
 screens by the time I am done.

I'm looking forward to this.  I'm hopeing we'll see some interesting
stuff come out once this capability is available.  I know I for one
am interested in putting together a management interface tailored
for use from text mode browsers like lynx and w3m.

--RDM (java-who-script-what?)


___
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-in and tuples

2000-08-14 Thread Jonothan Farr

Well in Python a list is mutable and a tuple is not.
--jfarr

- Original Message - 
From: Chris Withers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 14, 2000 3:38 PM
Subject: [Zope] dtml-in and tuples


 Hi,
 
 Why and how are python tuples (like, this) handled differently (and not
 in a logical way I can see...) than python lists [like, this]?
 
 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 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] Removing tracebacks from error message

2000-08-14 Thread David Trudgett

At 2000-08-14 13:33 +0100, Chris Withers [EMAIL PROTECTED] wrote:
Martijn Pieters wrote:
  On Thu, Aug 10, 2000 at 03:30:00PM -1000, David Trudgett wrote:
   I thought I solved this problem a while ago, but if so I can't remember
   how. I have a custom error page in Zope (2.1.6), but Zope wants to 
 put the
   traceback information into an HTML comment at the foot of the page 
 (which I
   don't want to have there). I set BOBO_DEBUG_MODE=0 and exported it in the
   "start" script, and also removed the "-D" from the command line that
   launches Z2.py. I thought that was all there was to it, but there must be
   something else that I've forgotten.
 
  Just removing the -D flag should do it. It may be that just having
  'BOBO_DEBUG_MODE' defined (whatever the value you set it to) triggers debug
  mode, so defining 'BOBO_DEBUG_MODE=0' may well set Debug Mode on :)

I think what David means is that, when not in debug mode, Zope appends
the error in HTML comments to the end of the HTML stream. There was a
thread on this not long ago and, IIRC, this was found to be hard coded
into Zope.

OK, looks like some Zope hacking to do...  :-(



My own view is that Zope shouldn't stick any error messages into or on
the end of error reports. At best, it's bad HTML, at worst it's a
security risk (the python traceback includes the full paths of the files
on the machine...) If you want an error report/traceback, you should
specifically include it in standard_error_message.

Agreed. It's just plain dumb (not to mention embarrassingly unprofessional) 
to put content after the /html tag. My main concern, though, is the 
security aspect. The less potential crackers know, the better. At the very 
least, a traceback like that says: "Hey, this is a Zope site." To which the 
wiley cracker replies, "Great. Now lets try all the known Zope 
vulnerabilities." Obviously, security by obscurity is not a good idea, but 
obscurity is not a bad idea, either :-)

Apart from all of that, there is the issue of content being added that 
wasn't requested. That's a bit impolite, I think.



Has anyone put this in the collector, or is it more suited to
dev.zope.org?

I'd classify it as a bug for the collector, myself...  I think there's also 
a related issue of a hard-coded error message page in the guts of Zope 
somewhere, because the user-defined error page is not used in every case...


cheers,

Chris


Sorry for the whinge, guys and gals! Zope is still great!


Bye for now.

David Trudgett



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

2000-08-14 Thread Nitin Borwankar

I haven't been able to connect for the last hour or so, either.

Nitin

 ___
 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] substring search on zcatalog textindex

2000-08-14 Thread pja

  So the question is, does anyone know of a simple way to get the zcatalog
 to
  also find substring matches on a textindex?
 
  --
  Peter Armstrong
 
 For Text Indexes you can use wildcards like * and ? in searches. So that
 searching for Foo* would find Foo, FooBar, fool, etc. I'm not sure if this
 works for Field or Keyword indexes though, I haven't tried it. My though is
 it only works for text indexes which should help you anyway.
 
 Good Luck,
 Casey Duncan
 
Well, this sounded like it would do just fine, however, it doesn't seem to 
work. :(

I'm using basically a zsearchinterface, and if I enter something like inter*, 
it comes up and says there was no matches, despite being able to find plenty 
of matches if I enter internet.  Also, the and and notand don't seem to work 
 either.  Also, entering internet* also turns up nothing.

I didn't setup Zope here, so I'm wondering if something could have been 
missed out then that could cause these things to not work?  Or perhaps a 
version too old?  Or could it be a problem with my dtml not talking to the 
Zcatalog in the correct manner?


TIA
Peter Armstrong

___
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] zeo and rdb backend

2000-08-14 Thread Bill Anderson

"bak @ kedai" wrote:
 
  I have to look further, but I think a good solution for local
  configuration
  issues would be a mountable database for specific sections (like
  products
  and some folders with database-connections and such)
  Imagine a situation where different instances of zope, connected via zeo
  have
  to use different database-connections (odbc for windows, any other for
  unix).
 
 i think mountable databse is still alpha, even with filestorage.  not sure
 whether it works if we use ZEO.

Only if and for the Zeoserver that sits on the same physical machine as the ZSS.


 
 one thing that still bothers me, how can we minimize conflict error?  we
 cannot restrict users from making changes, updates.  but users will complain
 for such errors.
 
 i'm looking at writing a howto use ZEO, and am looking for responses,notes
 from the gurus, what's good, what to avoid, good design methods, multiple
 storage points (still can't get to work), etc.  i need pointers, help
 because i am a user not a brilliant programmer/developer like most of you
 guys are, and do not fully understand ZEO.

I am working on a 'paper' that I may submit to LinuxWorld Expo for NY. I may be able 
topublish some stuff on it early.


--
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] Re: Xron seems to not work

2000-08-14 Thread Bill Anderson

Loren Stafford wrote:
 
 From: "Bill Anderson" [EMAIL PROTECTED]
   Bill,
  
   After the scheduled time, is there anything in the STUPID_LOG_FILE?
 What?
 
  --
  2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr
  Trigger event: http://telescop:8100/MakeDailyOrder
  Trigger time: 2000/08/14 13:15:00 US/Mountain
  Failed to trigger event.
  Type=bci.NotAvailable
  Val=argument 1: expected read-only character buffer, tuple found (File:
  http://telescop:8100/MakeDailyOrder/trigger Line: [])
  None None for None
  --
  2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr Failed to disarm
  event
 
 
 That's the Client.py bug (there's a proper patch here:
 http://classic.zope.org:8080/Collector/1480/view).

Applied. No Change. :(


--
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] substring search on zcatalog textindex

2000-08-14 Thread pja


 
 I didn't setup Zope here, so I'm wondering if something could have been 
 missed out then that could cause these things to not work?  Or perhaps a 
 version too old?  Or could it be a problem with my dtml not talking to the 
 Zcatalog in the correct manner?
 
 

Ok, I typed to soon.  Seems it was the version of Zope that didn't like using 
wild cards.  A newer version is being prepared and wild cards work fine with 
it.
Sorry for the trouble

Peter Armstrong

___
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 -- returning context of hits on fulltext

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, Jimmie Houchin wrote:
 I may be clueless and out of my league here and I haven't read the
 sources so I don't know... Well enough of a disclaimer. :)

I *have* read the ZCatalog/SearchIndex sources, but I don't understand
this part of it yet (or really that much of it at all!).  I think
we're getting into zope-dev terratory here...

 Is there anything in there which can provide the seek or byte position
 of the hit within text object? If so, it shouldn't be too difficult to
 read X bytes before and after the position and thereby provide what your
 looking for.

The standard TextIndex implementation records a notion of "position" for
each occurence of each word indexed.  I *think* this position is a word
count position, but I'm not sure.  Part of the code references a
'row', but it isn't at all clear that that has any relationship to
a source record.  If it is a word count, the other thing you'd need to
check would be whether it is a word count before or after splitter
activity.  I think it's the latter, which makes things more complicated.
Or just means you have to use more fuzz in your context grin.

 This would be nice to have out of the box.

The TextIndex 'position' information is intended to be used for
the 'near' operator (...) (so you can search on multiple words
"close" to each other for some definition of close).  You could
also use it to enforce word order (Maybe the "" operator does
that?).  Currently I think the result of applying the near operator
is used to adjust the "weight" of the index match, which affects
the order of the results returned.  (I haven't tested to see if
any of this works!)

So, the basic information you are looking for is there in some sense
to establish the position, but you'd still have to retrieve the
original sentences from the object itself, or from a full-text
metadata field.  Both of these are going to be memory intensive
operations.  If you index based on, say, individual lines, you'd
loose some of the the benefits of the near operator, though.  So
I'd say indexing based on paragraphs would probably be your best
approach.  This would also help mask position errors introduced if
the word count is indeed post-splitter.  Of course, you'll have to
decend to python to get access to the methods that will return the
actual position information.  But at least the code to record it
is already there.

Take a look at lib/python/SearchIndex/TextIndex.py for source
enlightenment.

--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] Re: Xron seems to not work

2000-08-14 Thread Loren Stafford

From: "Bill Anderson" [EMAIL PROTECTED]


 Loren Stafford wrote:
 
  From: "Bill Anderson" [EMAIL PROTECTED]
Bill,
   
After the scheduled time, is there anything in the STUPID_LOG_FILE?
  What?
  
   --
   2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr
   Trigger event: http://telescop:8100/MakeDailyOrder
   Trigger time: 2000/08/14 13:15:00 US/Mountain
   Failed to trigger event.
   Type=bci.NotAvailable
   Val=argument 1: expected read-only character buffer, tuple found
(File:
   http://telescop:8100/MakeDailyOrder/trigger Line: [])
   None None for None
   --
   2000-08-14T21:15:04 PROBLEM(100) Products.Xron.Loggerr Failed to
disarm
   event
  
 
  That's the Client.py bug (there's a proper patch here:
  http://classic.zope.org:8080/Collector/1480/view).

 Applied. No Change. :(


Something fishy here. Probably you're not executing the module you patched,
or you patched the wrong line (there's two similar lines; only one gets
patched). I suggest you uncomment line 80 of Dispatcher.py ...

  #import pdb; pdb.set_trace()

... run in debug mode, and watch what happens in Client.py. I'm sure you'll
find the bug scurrying arond there, alive and well. You'll see an error
message similar to the one above from STUPID_LOG, but it'll show precisely
where it occurs.

-- Loren



___
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] speeding up dtml-tree

2000-08-14 Thread Clinton Roy

hello folks

i'm using the dtml-tree tag and generating it's contents via external
methods. Unfortunately child lookups are quite slow, as well as the
icon choosing machinery; is there any way to cache the tree node
objects that my external method creates?

thanks for any help.
-- 
Clinton Roy


___
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] Persistence.py does not define Persistent

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, Skip Montanaro wrote:
 I'm trying to publish my own module with ZServer (from Zope 2.2.0).  I get
 the following traceback:
 
   from Persistence import Persistent
 ImportError: cannot import name Persistent
 
 When I look at lib/python/Persistence.py, all I see is a copyright notice
 and the following short doc string:
 
 """Provide access to Persistent and PersistentMapping
 
 This avoids dependency on the database package name.
 """
 
 I can't find a definition of an object named Persistent (probably ought to
 be a class or ExtensionClass, based upon the usage I saw) anywhere in the
 Zope 2.2.0 tree.

The comment implies it should work.  There's a cPersistent in the
ZODB directory, which I think is the ExtensionClass you are looking
for.  from ZODB.cPersistence import Persistent seems to do
something...but PersistentMapping.py in the ZODB directory just
does an 'import Persistence', so I don't see why that doesn't work
when I try it from the python command line.

--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] substring search on zcatalog textindex

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, Casey Duncan wrote:
 Searching TextIndexes you can use "and", "or" or "andnot" as query criteria.
 I also see support in the source code for near searches using "..." in the
 query string. I have not been able to get this to work (although the first
 three work great for me), and would like to.

I haven't tried to get near searches to work yet; haven't had the need.
I'm just reading the code grin.

I think Dieter looked at this in 2.1.x and found some bugs, and I
don't know if his fixes got into 2.2; I don't think he's had
opportunity to test 2.2 yet.  If you scan the zope.nipltd.com
archives for '...' you'll probably find the relevant messages.  Or
'zcatalog and near' if '...' isn't a valid search string.

--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] Best way to subclass DTML Document and some other ZClassesquestions

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, Marcin Kasperski wrote:
 1) How can I set standard DTML Document properties (title!) from my
 constructor? I created constructor form and constructor method, I
 succesfully prompt for and set all my properties but I do not know how
 to set properties belonging to DTML Document.

Pass it as an argument to the call that creates the DTML Document.

 2) Can I do anything to have single property screen which would behave
 as original DTML Document property screen but present both original
 properties and properties belonging to my custom property sheet?

Yep.  You should be able to replicate everything the original
constructor code does in your own code.  Read The Source, Luke grin.

 3) Can I influence property editing screens (what I want is to increase
 some edit boxes)?

As far as I know (until Martjin finishes his skinnable support) you
can only do that by wholesale replacing the editing screen with
your own form.  Or by modifying the source.

 I created also some classes which do not inherit DTML Document or DTM
 method. I have questions about such a configuration:
 
 4) Can I do something to have ZCatalog PrincipiaSearch (i.e. full text
 search) to scan some property of my custom ZClass (say property body
 from propertysheet Basic)?

You can add that property name as an index, and construct your
search form so the search string is submitted to it (see the Advanced
ZCatalog Searching HowTo).  Or, you could define your own
PrincipiaSearchSource method and return whatever value is appropriate.
I *think* you should be able to define this as a method of your
ZClass, but I've never tried that.  I know it works from python grin.

 5) Can I write index_html method of my custom class so it interpret DTML
 tags (like dtml-var substitution)?

I'm sure you can, but I don't know how grin.  But if you are doing
that, why not just subclass DTML-Method (or document)? 

 6) What you, Zope gurus, would do if you were to find all the DTML
 Documents in some directory tree and remove them, creating instead 
 Documents (where  Document is some subclass of DTML Document) - and
 keeping the document id, title, contents and properties without change? 

Write an external method to do all the object creation, property
copying, and old object deletion.

 7) And what if you were to change something a little - say detect that
 some property belongs to custom propertysheet and put it there instead
 on putting on standard DTML Document propertysheet?

Easy to do in external method python code.

 Regards and thanks in advance for any hints and references

I think my answers are a little bit too cryptic to be immediately
useful.  Maybe someone else will give specifics, otherwise I
hope they serve as useful hints.

--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] Start-up log?

2000-08-14 Thread R. David Murray

On Mon, 14 Aug 2000, William BC Crandall wrote:
 Simple question: Does Zope generate a log file 
 noting each transaction, including start-up 
 complaints?
 
 (I get error messages that scroll out of sight
 when I run START.BAT.)

If you define the enviroment variable STUPID_LOG_FILE
to be the file where you want it to write the log, it
will.  Otherwise not.  Well, that applies to startup
and error messages.  Unified Log File log messages go
to z2.log, and there are transaction messages you
can get it to log by other means (search zope.org
for appropriate HowTos).

--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] Zope - long running process

2000-08-14 Thread R. David Murray

On Sat, 12 Aug 2000, bak @ kedai wrote:
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of J.
  Atwood
 
  There is a switch in z2.py that allows you to point to a PID file. It will
  automatically restart your Zope installation once it goes down (if).
 
 i've tried this, with 2.1.x and 2.2.0; but i'm not sure it works well.
 there are times when my zope hangs, and i need to stop and start manually.
 it may be my programming.  not too sure though.  what are others experience?

Under the unix source install, running with the monitor process active
is the default (if you remove the -D from the z2 startup command line).
I run this way with several sites, under both FreeBSD and Linux.  It
successfully restarts zope if it dies.  In certain unusual circumstances,
though, Zope will go into a spin where the python process consumes all
available CPU and Zope stops responding.  The monitor won't catch that.
(Someone wrote a script that will; search the archives).  In my experience
this happens, in 2.1.x, when certain conditions are met by the DTML
source code of referenced methods.  I'm not sure what the exact
conditions are, though I seem to recall they had to do with leading
whitespace and dtml code only at the start of the method.  I think
this bug was fixed in 2.2.

It *is* also possible to get Zope/python to spin through programming bugs.

--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] problem running Zope

2000-08-14 Thread R. David Murray

On Fri, 11 Aug 2000 [EMAIL PROTECTED] wrote:
 trying to run 'python z2.py" I get an error message saying the
 executable is incompatible with the hardware (obviously!!). So I tried
 to recompile the python source on the new machine and everything seemed

Note that you will also have to recompile the Zope source, since it
does contain some C code as well as a lot of Python code.

 to go through fine. However when trying to run the new executable here
 is the error message I get.
[...]
 File "/optZope-2.1.4-src/Zserver/HTTPServer.py, line 111, in ?
   import thread
 Import Error: No module named thread

Zope requires python to be compiled with thread support.  Rerun
the python configure with --with-threads, redo the make/install,
and see if things work better.

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