[Zope-dev] catalog upgrade - what about products which subclass zcatalog

2001-03-15 Thread Ross Lazarus

I just upgraded my site explicit ZCatalog objects using Chris's very
helpful http://www.zope.org/Members/mcdonc/HowTos/UpgradeToNewCatalog
instructions - but I have a bunch of catalog aware zclasses and some
zclasses which (eg zdiscussions things, based on ZDBase) use
Products.ZCatalog - given that the base class has changed, do they need
any tweaking to take advantage of the new b+tree code?

___
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] 2.30 help system authentication problem?

2001-01-30 Thread Ross Lazarus

I never allow anonymous to have any permissions in my zope root and I
have just noticed that I have to grant the view right to anonymous or
the help button gives me an authentication error - even when I'm logged
in as manager/owner.

Is it just me? New 2.30 source install on solaris 2.6 using an old
Data.fs (which has been through many upgrades...)

I'll put this in the collector if anyone can confirm it please.

___
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: ANNOUNCE: Zope 2.2.1 released - breaks my zclass instances too.

2000-08-29 Thread Dr. Ross Lazarus

I'm a little confused - which is not unusual, so please bear with me.

I'm absolutely sure that NONE of the things which were broken in the
original Data.fs had the slightest/faintest connection with any of the
products I expunged. It was removing the cruft alone which fixed the
problem. 

Doesn't this (and the other episode reported by Andy) raise the issue of
what we can do to ensure that a broken product or piece of a product
doesn't stop a healthy product and its instances (completely independent
in the sense of not using any of the broken product's base classes or
classes) from working? 

The instances which were broken were multi-level zclasses which included
ObjectManager and CatalogAware in their base classes. The relevant
products were entirely healthy. The things I got rid of included two
broken things which I never tried to fix (ZDConfera, ZDiscussions) plus
some left over stuff (ZopePTK, PTKBase, PTKDemo, Wizard, Membership,
LoginManager and a few other bits and pieces which I didn't need
although they didn't appear broken..) - none of which had any connection
to the broken zclasses in terms that I can understand - other than
sharing/breaking an otherwise healthy ZODB.


Brian Lloyd wrote:

> >
> > Lesson may be that a Data.fs which works with an earlier zope version
> > may fail when upgrading to 2.2.1 - if so, try
> 
> No - thats not the lesson (at least not the right one)... It looks
> like something in the "cruft" didn't want to be unpickled in the
> new installation (most likely due to a missing piece - a required
> product or base class needed by a piece of cruft didn't get moved
> to the new install). A Data.fs from an earlier version should
> always work with a later version so long as all add-ons are
> replicated in the new installation.
> 
> Brian Lloyd[EMAIL PROTECTED]
> Software Engineer  540.371.6909
> Digital Creations  http://www.digicool.com

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 114, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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 )




Re: [Zope-dev] Re: ANNOUNCE: Zope 2.2.1 released - breaks my zclass instances too.

2000-08-28 Thread Dr. Ross Lazarus

Brian, the tranalyser reported a clean (old) data.fs and I don't use any
python base classes for any of my zclasses - however, in the interests
of my own sanity, I'm pleased to report success with an old recipe - I
started with a fresh Data.fs and cleaned out some cruft from my Products
folder. After removing all the stuff I'm not using now (ZopePTK and
ZDConfera/ZDiscussions products in particular), I was able to import my
zclasses and then the major application folder - everything looks fine
now and seems to work.

Lesson may be that a Data.fs which works with an earlier zope version
may fail when upgrading to 2.2.1 - if so, try 

1. Export everything you need (zclasses and data) from your current
working zope into the target zope /import directory
2. clear out all that old cruft which you don't use anymore from your
zinstancehome or other Products folder, 
3. start 2.2.1 with a copy of the distribution Data.fs (cp Data.fs.in
Data.fs)
4. import all your zclasses
5. import all your folders

worked for me.


Brian Lloyd wrote:
> 
> > 2000-08-26T06:03:27 ERROR(200) ZODB Couldn't load state for
> > '\000\000\000\000\000\000\016\204'
> > Traceback (innermost last):
> >   File /usr/local/zope/zope221/lib/python/ZODB/Connection.py,
> > line 447,
> > in setstate
> >   File /usr/local/zope/zope221/lib/python/ZODB/Connection.py,
> > line 213,
> > in _persistent_load
> > (Info:
> >   File /usr/local/zope/zope221/lib/python/ZODB/Connection.py,
> > line 154,
> > in __getitem__
> > (Info: ('\000\000\000\000\000\000*\252',
> > '(cExtensionClass\012ExtensionClass\012q\001(U\006ZDItemq\002(
> > cZClasses.ZClass\012PersistentCl$
> > Could not load oid
> >
> >
> > --- In [EMAIL PROTECTED], Andy Dustman <[EMAIL PROTECTED]> wrote:
> > > Sadly, 2.2.1 seems to break all my ZClass objects. The
> > Products themselves
> > > look fine, but any object made with them comes up as
> > broken. The Class ID
> > > (in the HTML source) looked like it had a * in front of it.
> > I retrograded
> > > to 2.2.0 and the problems went away.
> 
> Hi Ross -
> 
> I'm having trouble reproducing this here, so I wanted to see
> if I could try to rule out a few things:
> 
>   - Does this happen with _all_ of your custom ZClasses, or
> just certain ones?
> 
>   - They dont depend on a Python-level base class or something
> that maybe didn't get moved into the new installation do
> they?
> 
>   - Does tranalyzer.py give your database a clean bill of health?
> 
> If none of the above apply, would it be possible for you to
> send me an export file of one of the products so I can look
> into this further?
> 
> Thanks!
> 
> Brian Lloyd[EMAIL PROTECTED]
> Software Engineer  540.371.6909
> Digital Creations  http://www.digicool.com

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 114, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] Re: ANNOUNCE: Zope 2.2.1 released - breaks my zclass instances too.

2000-08-25 Thread Dr. Ross Lazarus

Same here - same as 2.2.0b1 - at least my event.log now shows an error
message although the time/date stamp is STILL wrong 0-:

--
2000-08-26T06:03:20 INFO(0) ZServer Monitor Server (V1.8.4.1) started on
port 8099
--
2000-08-26T06:03:27 ERROR(200) ZODB Couldn't load state for
'\000\000\000\000\000\000\016\204'
Traceback (innermost last):
  File /usr/local/zope/zope221/lib/python/ZODB/Connection.py, line 447,
in setstate
  File /usr/local/zope/zope221/lib/python/ZODB/Connection.py, line 213,
in _persistent_load
(Info:
  File /usr/local/zope/zope221/lib/python/ZODB/Connection.py, line 154,
in __getitem__
(Info: ('\000\000\000\000\000\000*\252',
'(cExtensionClass\012ExtensionClass\012q\001(U\006ZDItemq\002(cZClasses.ZClass\012PersistentCl$
Could not load oid


--- In [EMAIL PROTECTED], Andy Dustman <[EMAIL PROTECTED]> wrote:
> Sadly, 2.2.1 seems to break all my ZClass objects. The Products themselves
> look fine, but any object made with them comes up as broken. The Class ID
> (in the HTML source) looked like it had a * in front of it. I retrograded
> to 2.2.0 and the problems went away.

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] zope221b1 - zclass zexp import into clean database error

2000-08-12 Thread Dr. Ross Lazarus

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/PermissionMapping.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 mapping error: (see above)

___
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] cut/paste catalogue aware zclass instances still broken in 2.20?

2000-07-22 Thread Dr. Ross Lazarus

Thanks for the comment - it may be the nature of the zclass - some
combination of base classes and nesting.

The things I'm unable to paste are instances of a zclass (they're
pointers to document objects) derived from catalogaware, defined within
a zclass (objectmanager/catalogaware) defined within a top level
container zclass (also objectmanager/catalogaware). 

This rather baroque structure suits the application well and works fine
in 2.1.6


Terry Kerr wrote:
> 
> I had this problem with 2.1.6, but it seems to fix itself with 2.2.0.  I
> think you must be having a different problem.  The problem with 2.1.6 was
> to do with the copying of objects to the clipboard.  You were not able to
> call absolute_url() on an object in the clipboard, and that cause problems
> when cutting and pasting catalog aware classes since the index in the
> catalog is done by the absolute url and so when unindexing, absolute_url()
> is called.  However, the clipboard stuff has changed in 2.2.0 and the
> problem seems to have been fixed as far as I can tell.
> 
> terry
> 
> "Dr. Ross Lazarus" wrote:
> 
> > Has anyone else noticed a problem with pasting cut or copied
> > catalogue-aware zclass instances?
> >
> > The collector item #1371 I submitted on June 27 seems still to be
> > present in 2.20 final - sorry, I don't have a patch...
> >
> > It's a function I need and duplicating it without using
> > manage_pasteObject after a manage_cutObject is going to be painful.
> >
> > The manage_cutObject and manage_copyObject functions seem happy enough,
> > but when I do a manage_pasteObject, I get "the object foobar does not
> > support this operation" - no traceback.
> >
> > Zope-2.2.0 source on Redhat linux 6.1
> >
> > ___
> > 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 )
> 
> --
> Terry Kerr ([EMAIL PROTECTED])
> Adroit Internet Solutions Pty Ltd (www.adroit.net)
> Phone:   +613 9563 4461
> Fax: +613 9563 3856
> Mobile:  +61 414 938 124
> ICQ: 79303381

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] cut/paste catalogue aware zclass instances still broken in 2.20?

2000-07-22 Thread Dr. Ross Lazarus

Has anyone else noticed a problem with pasting cut or copied
catalogue-aware zclass instances?

The collector item #1371 I submitted on June 27 seems still to be
present in 2.20 final - sorry, I don't have a patch...

It's a function I need and duplicating it without using
manage_pasteObject after a manage_cutObject is going to be painful.

The manage_cutObject and manage_copyObject functions seem happy enough,
but when I do a manage_pasteObject, I get "the object foobar does not
support this operation" - no traceback.

Zope-2.2.0 source on Redhat linux 6.1

___
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] Calendar tag 0.9.6 breaks with 2.2.0b3??

2000-06-28 Thread Dr. Ross Lazarus

Shane - it's a shocking thing to post untested patches - particularly
when they work 
I just tested this quickly on 2.1.6 and 22b3 and it seems fine. Thank
you!.

Ok, what's the way forward here - how do we make sure that a 2.2 clean
CalendarTag product appears in the Products download area on zope.org???

How do we make sure every product available for download on zope.org is
clearly marked as either untested for 2.2; broken in 2.2; 2.2 clean -
otherwise many new zope users are going to be tearing their hair out
patching stuff or giving up in disgust??? Who's going to go through each
one and patch it as needed?

The calendar tag is a good example - probably lots of folks out there
using it - all are going to be bitten by this when they upgrade to 2.2x?





> I haven't tried this, but I think if you change the "self" argument in
> the namespace() call from CalendarTag to "md", the problem will be
> resolved.  I think that's what Ty meant to do, but the old mechanism
> didn't care; it didn't even look at the first argument.  In other words:
> 
> > >  > ns = namespace(md,
> > >  > date = date,
> > >  > mode = self.mode,
> > >  > firstday = firstday,
> > >  > setCalendar = self.setCalendar_,
> > >  > getCalendar = self.getCalendar_,
> > >  > linkDate = self.linkDate_
> > >  > )[0]
> 
> Of course, it's kinda crazy for me to be sending out untested patches to
> other people's work.  :-)  But if this works, it will also be
> backwards-compatible.
> 
> Shane

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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 )




Re: [Zope-dev] Calendar tag 0.9.6 breaks with 2.2.0b3??

2000-06-28 Thread Dr. Ross Lazarus

Thanks for the help.

Summary:
CalendarTag works fine in 2.1.6 but is broken in 2.20b3.
__call__ is mapped to render(self,md) - this is the same for all dtml
tags AFAIK.

The point that I find hard to understand is that namespace in DT_Util
has changed from 2.1.6 as follows

===2.1.6==
class namespace_: 
pass

def namespace(self, **kw):
"""Create a tuple consisting of a single instance whos attributes
are
provided as keyword arguments."""
r=namespace_()
d=r.__dict__
for k, v in kw.items(): d[k]=v
return r,

2.2.0b3
class namespace_:
__allow_access_to_unprotected_subobjects__=1

def namespace(self, **kw):
"""Create a tuple consisting of a single instance whos attributes
are
provided as keyword arguments."""
return apply(self, (), kw)

Now, I can easily put the old definition back and it might work - but
I'm not in a position to understand why the method has changed from what
looks like a simple dictionary construction to the apply function -
which doesn't seem to have anything to do with the namespace_ class !!

Brian??

Dieter Maurer wrote:
> The "self", more precisely, its "__call__" gets the keyword
> "linkDate" which it does not (no longer) likes to have.


> 
> Dr. Ross Lazarus writes:
>  > Trying the new 2.2.0b3 zope.
>  > One zclass using ty's calendar tag now breaks with an error message I
>  > just cannot figure out -
>  >
>  > Error Type: TypeError
>  > Error Value: unexpected keyword argument: linkDate
>  >
>  >   File /usr/local/zope/zope22b3/lib/python/DocumentTemplate/DT_Util.py,
>  > line 262, in namespace
>  > TypeError: (see above)
>  >
>  > I added  __allow_access_to_unprotected_subobjects__=1 to the CalendarTag
>  > class just in case.
>  >
>  > The offending line in CalendarTag.py is
>  >
>  > ns = namespace(self,
>  > date = date,
>  > mode = self.mode,
>  > firstday = firstday,
>  > setCalendar = self.setCalendar_,
>  > getCalendar = self.getCalendar_,
>  > linkDate = self.linkDate_
>  > )[0]
>  >
>  >
>  > namespace in DT_Util seems harmless enough -
>  >
>  > def namespace(self, **kw):
>  >  """Create a tuple consisting of a single instance whos attributes are
>  > provided as keyword arguments."""
>  >  return apply(self, (), kw)
> The "self", more precisely, its "__call__" gets the keyword
> "linkDate" which it does not (no longer) likes to have.
> 
> Dieter

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




[Zope-dev] cut and paste zclass instances broken in 2.2.0b3?

2000-06-28 Thread Dr. Ross Lazarus

Another gremlin has just bitten hard.

I have a nested zclass - zclass (link object) within a zclass ('problem'
object) within a zclass ('problem container' object).

In 2.1.6, no problems using manage_cutObject and manage_pasteObject to
move the link objects around between problems. In 2.2.0b3, I'm told that
the link object instance "doesn't support this operation" - manual cut
and paste from the management interface also fails.

hmmmm...

something broken?
 
-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] Calendar tag 0.9.6 breaks with 2.2.0b3??

2000-06-27 Thread Dr. Ross Lazarus

Trying the new 2.2.0b3 zope. 
One zclass using ty's calendar tag now breaks with an error message I
just cannot figure out - 

Error Type: TypeError
Error Value: unexpected keyword argument: linkDate
  
Traceback (innermost last):
  File /usr/local/zope/zope22b3/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /usr/local/zope/zope22b3/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/zope/zope22b3/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: CatalogAware)
  File /usr/local/zope/zope22b3/lib/python/ZPublisher/Publish.py, line
171, in publish
  File /usr/local/zope/zope22b3/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: updatePBLdates_calendar)
  File /usr/local/zope/zope22b3/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: updatePBLdates_calendar)
  File /usr/local/zope/zope22b3/lib/python/OFS/DTMLMethod.py, line 167,
in __call__
(Object: updatePBLdates_calendar)
  File
/usr/local/zope/zope22b3/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
(Object: updatePBLdates_calendar)
  File
/usr/local/zope/zopeinstancehome/Products/Calendar/CalendarTag.py, line
277, in render
  File
/usr/local/zope/zopeinstancehome/Products/Calendar/CalendarTag.py, line
313, in render_wm
  File
/usr/local/zope/zopeinstancehome/Products/Calendar/CalendarTag.py, line
339, in render_day_
  File /usr/local/zope/zope22b3/lib/python/DocumentTemplate/DT_Util.py,
line 262, in namespace
TypeError: (see above)

I added  __allow_access_to_unprotected_subobjects__=1 to the CalendarTag
class just in case.

The offending line in CalendarTag.py is

ns = namespace(self,
date = date,
mode = self.mode,
firstday = firstday,
setCalendar = self.setCalendar_,
getCalendar = self.getCalendar_,
linkDate = self.linkDate_
)[0]


namespace in DT_Util seems harmless enough - 

def namespace(self, **kw):
"""Create a tuple consisting of a single instance whos attributes are
provided as keyword arguments."""
return apply(self, (), kw)

Anyone ??

___
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] 2.2.0b3 - try/except changed?

2000-06-26 Thread Dr. Ross Lazarus

This new beta has fixed some problems for me and the documentation on
the new security model for products has really helped...

However, I seem to be getting errors in previously (2.1.6) dtml
try/except structures.
1.  now seems to die unless there's an error_type parameter
(I usually don't need them...) - presumably a new buglet?

2.  doesn't catch exceptions in
SybaseDA connected ZSQL method fooZSQL anymore?? I'm pretty sure this is
a change from 2.1.6 behaviour - and a change for the worse IMHO - it's
very useful to be able to expect a try/except structure to trap ALL
errorsgracefully

Could some kind soul confirm that it's not just me so I can pop this
into the collector please?
-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] change in product permissions/behaviour in 2.20b1

2000-06-20 Thread Dr. Ross Lazarus

The (heavily modified) Survey product from Piers Lauder is in heavy use
here.

In 2.1.x and in 2.20b1, the links in a folder view point to
[objectname]/manage_workspace

In 2.1.x, this does the right thing - if you have appropriate
permissions on the survey object, you get a management screen. Without
'View management screens' permission, you see a rendered survey form to
fill in. Fine.

In 2.20b1, this is now broken. No matter what permissions you have, the
[objectname]/manage_workspace link turns into a link to [objectname] and
you see the survey.

I've futzed with  __ac_permissions__ =  and added that little tip about
Globals.default__class_init__(Survey) without any joy.

Is this a bug, a deliberate change in behaviour or is it just me?



-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] zope photo product 0-4-3 bug and fix.

2000-06-19 Thread Dr. Ross Lazarus

I think I just squished a subtle and extremely annoying bug in 0.4.3 of
the photo product at http://yyy.zope.org/Members/Drew/Photo

Making a copy of display_defaults by a dictionary copy in the __init__
method is a Bad Thing because (shallow) copy doesn't copy substructures
- it makes them all point to the same place. 

Fix = import the copy module and use copy.deepcopy(display_defaults) at
initialisation: ie replace 

self.displays=display_defaults.copy()

with

self.displays=copy.deepcopy(display_defaults) # was
display_defaults.copy()

___
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] Calling rendered objects from a product

2000-06-15 Thread Dr. Ross Lazarus

More than one way to skin that particular cat I'll warrant.

here's one cut from a heavily used external method to render a zope
dynamic page to a disk file.

import Globals
...
o = getattr(self,thingtorender)
rendered_doc = o(client=o,REQUEST=REQUEST,globals=globals())
...

Incidentally, why bother making a cache inside of zope? There are
perfectly good ones already available out there like squid. Wouldn't it
be easier to just dump the result from every query you encounter into a
disk file. 

Serve with apache but run a squid cache front end to zope. This would be
relatively easy to develop and could probably run very fast.

Refresh the static files as often as needed. How often do things change
in the data? 

If slowly, hourly re-rendering of queries as they arrive might work ok.

Given that there are tools to do this, it just might be easier with
static html than with live zope 


Carlos Neves wrote
> 
>  I need to call a rendered url, passed the REQUEST and wanted to do 
>it directly
>  to the self var. Not being able to do it, I have come with the 
>solution of
>  calling urllib with URL1, the called object and '?' + the query 
>string... Not
>   that fancy, but it works... slowly but smoothly.

___
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: Strange ZClass permissions problem with 2.2a1

2000-05-18 Thread Dr. Ross Lazarus

Yep, trying to access a newly instantiated empty zclass instance
produces the same error. 

Looks like a bug. Email me if you want an exported version of my zclass
to poke and prod at...


Tres Seaver wrote:

> Does the problem repeat in the "vanilla" version if you just create a
> new instance of your ZClass, instead of importing the old pickle?  If
> so, it is definitely a "bug";  if not, it may be a "migration problem,"
> with a fix like the one Brian posted for recursively "re-ownering"
> Zope.org.


> > If I take out manage_tabs from the offending ZClass index_html
> > method, I can view index_html (but of course, I can't use the
> > management stuff built in! making it rather useless), so that's
> > where we're getting into trouble for sure.
> > 
> > I've tried starting out with a vanilla 2.2a1 Data.fs and importing all
> > the zclasses and the relevent folders - no difference.
> > 
> > Anyone else seeing this?
> > Is this worthy of the collector?
> 

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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] Strange ZClass permissions problem with 2.2a1

2000-05-17 Thread Dr. Ross Lazarus

I'm testing 2.2a1.
I have some ZClasses which work fine in 2.1.6. I copied my Data.fs to
the new 2.2a1 install.
As a non-superuser I have taken ownership of the top level of the site.
When I try to access a zclass instance which uses manage_tabs in it's
index_html method, I get the traceback shown below.

The relevant code is checking that the containerbase is not the
accessedbase whatever they are!

If I take out manage_tabs from the offending ZClass index_html method, I
can view index_html (but of course, I can't use the management stuff
built in! making it rather useless), so that's where we're getting into
trouble for sure.

I've tried starting out with a vanilla 2.2a1 Data.fs and importing all
the zclasses and the relevent folders - no difference.

Anyone else seeing this?
Is this worthy of the collector?

Traceback (innermost last):
  File /usr/local/zope/zope22a1/lib/python/ZPublisher/Publish.py, line
224, in publish_module
  File /usr/local/zope/zope22a1/lib/python/ZPublisher/Publish.py, line
189, in publish
  File /usr/local/zope/zope22a1/lib/python/ZPublisher/Publish.py, line
175, in publish
  File /usr/local/zope/zope22a1/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: index_html)
  File /usr/local/zope/zope22a1/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: index_html)
  File /usr/local/zope/zope22a1/lib/python/OFS/DTMLMethod.py, line 160,
in __call__
(Object: index_html)
  File
/usr/local/zope/zope22a1/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: index_html)
  File /usr/local/zope/zope22a1/lib/python/App/special_dtml.py, line
121, in __call__
(Object: manage_tabs)
(Info: /usr/local/zope/zope22a1/lib/python/App/manage_tabs.dtml)
  File
/usr/local/zope/zope22a1/lib/python/DocumentTemplate/DT_String.py, line
500, in __call__
(Object: manage_tabs)
  File /usr/local/zope/zope22a1/lib/python/DocumentTemplate/DT_With.py,
line 146, in render
(Object: _(manage_options=filtered_manage_options()))
  File /usr/local/zope/zope22a1/lib/python/OFS/DTMLMethod.py, line 180,
in validate
(Object: index_html)
  File
/usr/local/zope/zope22a1/lib/python/AccessControl/SecurityManager.py,
line 139, in validate
  File
/usr/local/zope/zope22a1/lib/python/AccessControl/ZopeSecurityPolicy.py,
line 160, in validate
Unauthorized: manage_options

-- 

Dr Ross Lazarus
Associate Professor and Sub-Dean for Information Technology
Faculty of Medicine, Room 126A, A27, University of Sydney,
Camperdown, NSW 2006, Australia
Tel: (+61 2) 93514429   Mobile: +61414872482  
Fax: (+61 2) 93516646   Email: [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 )