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




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

2000-08-26 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] 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] 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. dtml-except now seems to die unless there's an error_type parameter
(I usually don't need them...) - presumably a new buglet?

2. dtml-trydtml-var "fooZSQL"/dtml-try 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-21 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 )




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 )