[#1480] workaround for adding page to wiki via WebDAV

[email protected] (coolestuk) Sun, 13 Mar 2011 05:23:17 -0700
Newsgroups gmane.comp.web.zope.zwiki
Message-ID <20110313052313-0700__1056.38564932651$1300019010$gmane$org@zwiki.org>
Before the pages are added to a ZWiki using WebDAV, preface the text of the pages with "Type: rst\n\n" or "Type: plaintext\n\n".  The page then appears in the ZWiki.  There then appears a subsequent problem.

When searching for the text that is in some of those pages now added to the wiki, the number of pages which are "hits" will be returned by searchwiki, indicating that the sought text is found in the page.  In order to get (e.g.) an excerpt of the page containing the text to be returned from the search, I have to run /SomePage/upgradeAll before the search functionality works properly.

I tried to add the "Type: plaintext" lines in the PUT_factory, but found that did not work (but then I'm not so clear about how what is returned by the PUT_factory then interfaces with the rest of the ZWiki insertion process).  I run a external process on the text files before adding them via WebDAV which adds the required lines.  

I think the right place for this workaround with inserting "Type: ..." should perhaps be in the PUT_factory.  Perhaps that is also where the actions leading to the search working properly would also need to be placed (i.e. while the text of the page is added to the catalog, some other step is missing and only supplied by running /upgradeAll).

--
forwarded from http://zwiki.org/1480FilesContainingTextColonsAppearAsEmptyFilesWhenAddedToWikiViaWebDAV#[email protected]