[Zope-CMF] Re: Serious problem with type actions

Tres Seaver tseaver@zope.com
29 Apr 2003 10:50:08 -0400


On Tue, 2003-04-29 at 10:32, Yuppie wrote:

> Ronan Amicel wrote:
> > The problem means you cannot get *both* the <base> tag right
> > and have type actions work, which is too bad...
> > 
> > The work on ti_apb branch may be an opportunity to push the
> > integration of type actions with the general actions mechanism
> > further? I hope this can be fixed for CMF 1.4 anyway, so if
> > someone sees how to solve this... :-/

> I think all actions should be absolute URLs by default. Are there any 
> use cases that need relative URLs / method names?
> 
> current:   string:document_view
> proposed:  string:${object_url}/document_view
> 
> As you mentioned on the collector, this breaks the usage of _getViewFor 
> and getActionById.
> 
> getActionById is (besides the 'mkdir' hack) used to build absolute URLs. 
> Resolved in the right context, returning an absolute URL would improve 
> this method.
> 
> _getViewFor is used to return the default view. I'm sure this could also 
> be done with an absolute URL.
> 
> 
> The difficult part seems to be the migration path:
> 
> If we allow absolute URLs and relative URLs / method names, what should 
> getActionById return? If it returns the absolute URL, the skins have to 
> be changed and old sites don't work with the new skins.
>
> If we just allow absolute URLs, we need to convert all type actions. We 
> have to know when and how to convert the actions. This breaks old skins 
> used by converted sites.
> 
> 
> Just my 2 cents.

I think that 'getActionById' should continue to return relative URLs,
and that we should update the skins which render the action to prepend
the object URL;  anything else is too painful.  In the next release
(once people have had a chance to adjust custom skins to take advantage
of the APB), we can reconsider.

I-knew-I-didn't-want-to-remove-the-base-tag'ly,

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com