Silva Issue Tracker Archive: Message9250

 This tracker has been migrated to Launchpad. Please post new messages at:
Author kitblake
Recipients aaltepet, daniel, faassen, jasper, kitblake, wim
Date 2007-03-10.08:12:04
This isn't fixed. The checkin message said "Be extra careful about base href and
the form's action." We need to be more careful. :-) There are two problems. 

1. When you set an access restriction, a second button appears called "acquire
restriction". This submits to "@@acquire_minimum_role_submit:method", which via
zcml shunts to '/browser/'. So you'd have add the "base =
self.context.absolute_url() + '/edit'" code to that method too.

2. But once the access restriction has been applied and the access screen has a
base tag, the other forms 404. This is in fact the original problem that Andy
posted. There are three other forms. I started to make their actions
constructed, pointing to /edit/, and then realized this all may not be necessary.

I don't get Zope's base tagging behavior. It puts in a base tag if there isn't
one. But, if you're in API space, thus in the Silva backend, it doesn't do that.
But when you leave API space (by triggerring #1 and going into Five folders) it
*does* add one, messing everything up:
<base href="http://localhost:8081/silva/%40%40acquire_minimum_role_submit/" />

Maybe we need to be less careful. Can't we just set a base tag for all screens
in the backend, meaning all those that are in /edit API space? I tried adding
this to macro_index:
<base tal:attributes="href string:${model/absolute_url}/edit/" />

And it seems to work. When editing, you always want to be in API space, even
when calling Five code from forms, which need an action of .. to get you up a
level so the Five folders can be found. 

I've tested the access screen and the others, so I'm checking in the template
changes to the head. But we should test whether having a base tag in all the
Silva backend screens has any other effects. Daniel, I haven't reverted
/browser/ (in case we need to be more careful :-)).
Date User Action Args
2007-03-10 08:12:05kitblakesetmessageid: <>
2007-03-10 08:12:05kitblakesetrecipients: + kitblake, jasper, daniel, wim, aaltepet, faassen
2007-03-10 08:12:05kitblakelinkissue1588 messages
2007-03-10 08:12:05kitblakecreate