Re: [Zope-dev] ZPatterns bug: Customizers don't rename well

2000-08-30 Thread Phillip J. Eby

At 07:32 PM 8/29/00 +0100, Steve Alexander wrote:
>
>To reproduce the error, do this:
>
>  Create a Folder with Customizer support
>  Give it a Customizer
>  Rename that Customizer
>  Press the "Customizers" tab in the folder
>
>Zope Error
>
>Error Type: AttributeError
>Error Value: __customizerRegistry__

What's happening is that the new manage_renameObjects (plural) function
doesn't have a masking method in PlugInGroup.  These masking methods serve
to alter the URL base used for the management tabs, so that a PlugInGroup's
management tabs will point to the parent PlugInContainer's methods, and not
to nonexistent methods of itself.  The resulting error is a harmless side
effect of this URL confusion; you can simply click your way back into the
right place and everything will work fine.

Meanwhile, I'm adding the following method to the PlugInGroup class for the
next release of ZPatterns:

def manage_renameObjects(self, ids, new_ids, REQUEST=None):
"""Rename several sub-objects"""
self.aq_inner.aq_parent.manage_renameObjects(id,new_ids)
if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1,
URL=REQUEST.URL1+'/manage_workspace')

This should fix the problem, although I have not yet tested that it in fact
does so.


___
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 bug: Customizers don't rename well

2000-08-29 Thread Steve Alexander

ZPatterns 0-4-1snap1
Zope 2.2.1

To reproduce the error, do this:

  Create a Folder with Customizer support

  Give it a Customizer

  Rename that Customizer

  Press the "Customizers" tab in the folder


Zope Error

Error Type: AttributeError
Error Value: __customizerRegistry__

Traceback (innermost last):
  File /lib/python/ZPublisher/Publish.py, line 222, in publish_module
  File /lib/python/ZPublisher/Publish.py, line 187, in publish
  File /lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
  File /lib/python/ZPublisher/Publish.py, line 171, in publish
  File /lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: manage_main)
  File /lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: manage_main)
  File /lib/python/App/special_dtml.py, line 120, in __call__
(Object: manage_main)
(Info: /lib/python/Products/ZPatterns/www/PlugInGroup.dtml)
  File /lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
(Object: manage_main)
  File /lib/python/App/special_dtml.py, line 120, in __call__
(Object: manage_below)
(Info: /lib/python/Products/ZPatterns/www/showCustomizers.dtml)
  File /lib/python/DocumentTemplate/DT_String.py, line 528, in __call__
(Object: manage_below)
  File /lib/python/DocumentTemplate/DT_In.py, line 630, in renderwob
(Object: manage_registry)
  File /lib/python/Products/ZPatterns/Customizers.py, line 63, in
manage_registry
AttributeError: (see above)


The error occurs because the rename method redirects to:

http://puffin.cat-box.net:7080/test/Customizers_

Pressing the "customizers" tab yields the url:

http://puffin.cat-box.net:7080/test/Customizers_/Customizers_/manage_workspace

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