[Zope-CMF] bug in CMFCore/PortalFolder.py or content/folder_edit.py

Florent Guillaume fg@nuxeo.com
Tue, 24 Jun 2003 16:14:31 +0200


[From last February]
In article <JHEOKEOOLIGLDHCMAHMOAEMOGMAA.mark@mceahern.com> you write:
> Version:  1.3.1 beta 1
> 
> When you edit a portal folder, clicking Change and View causes
> folder_edit.py to set this as the target action:
> 
>   target_action = context.getTypeInfo().getActionById('view')
>   context.REQUEST.RESPONSE.redirect(%s/%s?%s' % (context.absolute_url(),
>                                                  target_action,
>                                                  qst))
> 
> This means the resulting url is:
> 
>   folder_name/?portal_status_message=message
> 
> Instead of:
> 
>   folder_name/folder_contents?portal_status_message=message
> 
> Is that intended?

In part, yes. Folders have a view mode and a contents mode that are
different. Change and View here is rightly named, even if most of the
time you'd like to go to folder_contents.

The problem is that PortalFolder doesn't have a "folderContents" action that
would give us "folder_contents". The link to folder_contents in the
actions box is provided by the global Actions Tool (urgh).

A way to clean this up would be to have the Actions Tool provide a
"folderContents" action only if folder is not object, and in the case of
folder is object let the folder's Type actions provide that action.

The problem, again, would be backward compat... Not a big problem here I
guess.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com