Problem with preview_open_now (www/preview_buttons.zpt)

"Luthiger Stoll Benno" <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
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.

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?

Regards,
Benno Luthiger
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.