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




[Zope] Make a Python Products Add list show only certain meta types?

2000-08-12 Thread Kevin Howe

I have a custom Python class (Container)  which uses Folder as it's base
class. I also have a custom Python class (AnObject). I want it so that when
you view a Container object, "AnObject" will be the only meta_type available
to be added in the Add List. The problem is that since Container inherits
from Folder, the Add List makes all object types available to be added. Is
there any way to tell a class to show only certain meta_types?

Kevin




___
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] Make a Python Products Add list show only certain meta types?

2000-08-12 Thread Kapil Thangavelu

Kevin Howe wrote:
 
 I have a custom Python class (Container)  which uses Folder as it's base
 class. I also have a custom Python class (AnObject). I want it so that when
 you view a Container object, "AnObject" will be the only meta_type available
 to be added in the Add List. The problem is that since Container inherits
 from Folder, the Add List makes all object types available to be added. Is
 there any way to tell a class to show only certain meta_types?
 
 Kevin
 

There is more than one way. The proper way would probably to be adjust
the security settings on your class in python (filtered_metatypes?). The
easier way is to just to just write an HTMLFile dtml page to overide
manage_main which is what gets called for contents. You can use the
original as inspiration its at /OFS/main.dtml. An advantage of this is
you can add custom stuff to your contents page based on the context of
your product.

Kapil

___
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] Make a Python Products Add list show only certain meta types?

2000-08-12 Thread Andrew Kenneth Milton

+[ Kapil Thangavelu ]-
| Kevin Howe wrote:
|  
|  I have a custom Python class (Container)  which uses Folder as it's base
|  class. I also have a custom Python class (AnObject). I want it so that when
|  you view a Container object, "AnObject" will be the only meta_type available
|  to be added in the Add List. The problem is that since Container inherits
|  from Folder, the Add List makes all object types available to be added. Is
|  there any way to tell a class to show only certain meta_types?
|  
|  Kevin
|  
| 
| There is more than one way. The proper way would probably to be adjust
| the security settings on your class in python (filtered_metatypes?). 

The simplest way is to;

all_meta_types=meta_types=({'name':'Sub Object1',
'action':'manage_addSubObject1Form',},
   {'name':'Sub Object2',
'action':'manage_addObject2Form',},)

In your 'base' product.

If you don't register your sub objects in __init__.py you will also
need to import their 'constructors' into your base class, and explictly
declare the icon under misc_


-- 
Totally Holistic Enterprises Internet|  P:+61 7 3870 0066   | Andrew Milton
The Internet (Aust) Pty Ltd  |  F:+61 7 3870 4477   | 
ACN: 082 081 472 ABN: 83 082 081 472 |  M:+61 416 022 411   | Carpe Daemon
PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| 

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




[Zope] Broken product instances when using SiteAccess

2000-08-12 Thread Helge Tesdal

We have set up a site using SiteAccess. The site itself works just fine,
but when moving Data.fs to other machines the instances of our products
appear broken. There is no problem adding new instances. 

Currently we're running Zope 2.1.6, and will probably continue to do so
unless this is fixed...

We have copied the whole zope directory from our main site, including all
installed Products, Extensions and so on.

Could it be that Zope is looking for the product in the wrong places? We
had SiteAccess running when the instances were added, and but have to turn
it off when used on other machines. The rewriterule is included below.

Any suggestions on how to make this work again? Is it possible to get some
more debug info from Zope on where the instance wants the product to
reside?

Our rewriterule:
==
dtml-call expr="REQUEST.setURL(base='http://toplevel.domain')"
dtml-let path="REQUEST.path"
dtml-if path
dtml-comment  There is a path /dtml-comment
  dtml-if expr="path[-1]=='Z'"
dtml-comment'/Z/...' explicitly forbids redirection to 'artists'
/dtml-comment
dtml-call expr="path.pop()"
dtml-call expr="REQUEST.setURL(path='Z')"
  dtml-elif expr="path[-1] in objectIds()"
dtml-commentDon't redirect existing objects /dtml-comment
  dtml-else
dtml-commentEverything else goes to 'artists' /dtml-comment
dtml-call expr="path.append('artists')"
dtml-call expr="REQUEST.set('SiteRootPATH', '/')"
  /dtml-if
/dtml-if
/dtml-let
==


Thanks in advance

--
Helge Tesdal
[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 Newsletter?

2000-08-12 Thread Luis Cortes



Hi!

Does anyone of a simple newsletter product. 
What I mean by simple is no extra features, just the news.

Thanks ahead of time for any help,
Luis.



[Zope] RESPONSE.write() slow

2000-08-12 Thread Philipp Auersperg

I want to be able to download dynamic content (coming from a relational database) via 
Zope as a file.
I do this by calling RESPONSE.write() which works fine but it is very slow

When I download a greater package with an External method (on the bottom of the mail),
I just get downloads of 3 to 12 KB/s in my LAN and even locally on the same machine.
Also the thread sending the data uses 90% CPU.
Can anybody tell me why it is so slow or how I can speed that up?
I am using a standalone Zope 2.2.0 with standard ZServer

Thanks in advance
Philipp Auersperg



def streamTest(self,RESPONSE):
   RESPONSE.setHeader('Content-Type','text/richtext') 
   i=0
   while i 10:
  RESPONSE.write('hallo')
  i=i+1

   RESPONSE.close()


___
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 on Linux, Oracle on another machine (Solaris) what to do?

2000-08-12 Thread Chris Beaumont

Hello,

Newbie question here...  Thank you for any and all help...

The subject line says it all..

What's the best way to connect an instance of Zope running on a Linux 
box to an instance of Oracle 7.3 running on a Solaris box in the same 
subnet...

As far as I can tell, the OracleDA seems designed to connect an 
instance of Zope and an instance of Oracle running on the same 
machine.. We don't want to do that because then we would effectively 
have to buy Oracle twice..  (we already have the 7.3 server up and 
running..) Am I wrong? I am willing to go through the whole Oracle 
install on this machine, to get the libraries, but I need to know 
that I'm not barking up the wrong tree..

Also, are there any other decent alternatives? ODBC?  

Thank you!

Chris

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