[silva-dev] Problem with preview_open_now (www/preview_buttons.zpt)

kit BLAKE kitblake at infrae.com
Sun Sep 10 10:39:39 CEST 2006


2006/8/31, Luthiger Stoll  Benno <benno.luthiger at id.ethz.ch>:
 > Dear developers
 >
 > Silva 1.5 offers the possibility to publish documents from the
 > public preview. Unfortunately this doesn't work in our
 > installation.
 > The situation is as follows:
 > I've created a document 'myDoc' in our ETH root (ETH is a special
 > object extending Silva Publication). In public preview, therefore,
 > the URL is 'http://localhost:8084/silva/ETH/myDoc/preview_html'. If
 > I click the 'publish now' button, I get the error message 'The
 > object at http://localhost:8084/silva/ETH/edit/preview_open_now has
 > an empty or missing docstring.' Obviously, the system doesn't find
 > the script 'views/edit/VersionedContent/preview_open_now.py'.
 > Looking at the url displayed in the error message, I see no 'myDoc'
 > appearing there. In fact, if I call
 > http://localhost:8084/silva/ETH/myDoc/edit/preview_open_now, the
 > document is published as expected.
 >
 > I can solve this problem by patching the page template
 > 'www/preview_buttons.zpt'. If I replace in '<input class="executor
 > publish" ...' the attribute 'name="edit/preview_open_now:method"'
 > by 'tal:attributes="name
 > string:${here/id}/edit/preview_open_now:method"' all works fine.

In 'normal' Silva I presume this also works? However it's going to a 
nested myDoc, as in 
http://localhost:8084/silva/ETH/myDoc/myDoc/edit/preview_open_now
But it still works.

 > However, I don't like to patch Silva. And in fact, if I publish
 > Silva Documents in plain Silva, there's no problem. It seems that
 > our layout infrastructure interferes in a problematic way with the
 > Silva framework.
 >
 > Any ideas why calling 'edit/preview_open_now' works when the
 > document is in plain Silva and leads to failure when the document
 > is in our layout?

Might the fact that it's a form submission have something to do with it? 
Somehow, when the form submits, you're not 'in' your doc, but the 
container above.
kit


-- 
kit BLAKE · Infrae · http://infrae.com + 31 10 243 7051
Hoevestraat 10 · 3033 GC · Rotterdam + The Netherlands
Contact = http://2idi.com/contact/=kitblake



More information about the silva-dev mailing list