Add method that export the contents of Zwiki in plone to MYSQL --Win Myint Aung, Mon, 02 Apr 2007 02:26:10 +0000 reply

Dear Everyone,

I have appended methods directly in of Zwiki (0-55) in plone 2.5.1. The use case is to compare the versions of the zwiki pages to show output of differences between versions in another application in PHP, Apache.

My new methods export contents of a zwiki page to mysql. I want to make a buttons in plone interface to call this method. Then I modified to call a new method named "exportmysql". See my changes.

<input tal:condition="python:revA > 1"
name="nextDiff:method" value=" &gt;&gt; " type="submit" i18n:attributes="value" accesskey="n" />
<input tal:condition="not:python:revA > 1"
disabled="1" value=" &gt;&gt; " type="submit" i18n:attributes="value" accesskey="n" />
<input tal:condition="python:user.has_permission('View History',here)"
value="Manage" name="manage_change_history_page:method" type="submit" i18n:attributes="value" />
<input tal:condition="python:user.has_permission('View History',here)"
value="Export" name="exportmysql:method" type="submit" i18n:attributes="value" />
<input tal:condition="python:user.has_permission('Zwiki: Edit pages', here)"
tal:attributes="disabled python:(revA==numrevs) and 1 or nothing;" value="Revert this and later edits" type="submit" name="revert:method" i18n:attributes="value" />

When I click on the "Export" button in history of zwiki The plone replied the following errors.

Our apologies... The item you requested does not exist on this server or cannot be served. Please double check the web address or use the search function on this page to find what you are looking for. If you know you have the correct web address but are encountering an error, please contact the Site Administration. Thank you. 404 Not Found

I did not see any errors in error_log. But my method can work if it is called from another method. Other method such as prevDiff, nextDiff are also called in template.

Please give me any idea.

Zwiki 0.59 released --Simon Michael, Mon, 02 Apr 2007 19:31:26 +0000 reply

I'm happy to announce Zwiki 0.59, after a four-month release hiatus - see release notes below.

I plan to do quarterly releases instead of monthly from this point on, so the next will be July 1. Of course, pull the latest code from at any time, it is usually stable.

I'm also happy to announce Joyful Systems is once again open for business! After a wild seven months in PHP (boo!) and Rails (yay!) territory, I'm once again available for consulting and contract work. Contact me for help with your zwiki/zope/plone/rails projects.

Best, -Simon

sm on irc:// simonkwmichael on AIM

Zwiki is an easy-to-use, robust, and powerful wiki engine based on the Zope 2 web application server. It works either with vanilla Zope or inside Plone. In addition to the core wiki features, Zwiki offers smooth email-integrated discussion; a simple, effective issue tracker; strong internationalization support; precise access control; and many more optional features. See for more.

Zwiki 0.59.0 2007/04/02

Catchup since the last release in november: a truckload of bugfixes from Sascha Welter, Frank Laurijssens and many others (YAY!), support for conditional http get, skins code cleanup, translation updates and more.

Upgrade notes

  • The standard issuetracker and filterissues pages now support sorting on issue name and reverse sorting (#14). To enable sorting by name, visit SOMEPAGE/setupTracker (as manager) to add a required catalog field.
  • If you have customized IssueTracker and/or FilterIssues pages, you might want to replace them with the latest code. To do this, review and back up the changes you made. Then delete both pages, reinstall them with SOMEPAGE/setupTracker?pages=1 (as manager), and re-apply your customizations.


  • show accurate page hierarchy after adding a new wiki
  • #1313, updated FrontPage links in basic wiki template (Frank Laurijssens)


  • reparent now obeys the edits_need_username option, so reparenting will require a username when that property is true
  • #1077 implement Conditional HTTP Get handling (aka If-modified-since / 304) for pages, stylesheet and RSS feeds. This feature makes zwiki pages more browser- and spider-cache friendly, which can potentially greatly reduce page rendering time and load on your zope server. It is off by default as it doesn't yet work with Firefox's default settings (requiring a reload after each edit). See (Sascha Welter)
  • #974 Property to ignore certain WikiNames Credits to Matt Kunze from DataSplice?. Patch logic is from him, I just simplified it a bit and tested it. This has yet to be documented somewhere. (Sascha Welter)
  • #1227 comment form vulnerability (Sascha Welter)


  • make default site logo work with zope 2.10 (zope bug 2302)
  • recent changes default period is now a week, not a day
  • #976 cosmetics on "last edited xx ago" link credits to "Andreas", we check if lastlog contains anything and omit the parentheses if not. (Sascha Welter)
  • format comment header for HTML pages #1085 (Sascha Welter)
  • #1304 last-edited-by is not shown when user ID is numerical (Sascha Welter)
  • #1303 Illegal utf-8 handling in summary - Credits go to Hideo at Yokohama! This patch had us worried about performance, since taking a summary of a long wiki page might be slow. Some preliminary testing showed that the performance price is rather low, but for sites with non-ascii content the patch is really worth it. Not only will it stop producing illegal utf-8, but without the patch the length of the summary will never be right. (Sascha Welter)
  • #1298 non-ascii characters in page names are breaking search functionality (Sascha Welter)
  • don't let a non-wiki page break interwiki link rendering


  • #1157 after reverting changes, reset last edit time make test passes, tested on my zwiki and plone-zwiki instance. (Sascha Welter)
  • #1314 use UTC for creation_time too (Sascha Welter)
  • #1186 fix for last_edited_date losing time zone information - converting to UTC This might be only relevant at hosts that do not have locale support on their operating system (e.g. *BSD, Mac OS X). Further tests in that direction might be necessary. It definitely fixes the problem on Mac OS X. (Sascha Welter)


  • #1299 - mail out in plone works, could use more error handling though (Sascha Welter)


  • #1083 feed validation: encode & and < (Sascha Welter)

  • #1083 escape html in rss feeds (Sascha Welter)

  • #1294 - changes to get rss feeds to validate pages_rss and changes_rss made to validate with

    • Date formats in head section had to be adjusted
    • wanted a guid element (even though specs say it's optional)

    (Sascha Welter)

Issue tracking

  • #14 make the zwikitracker list allow filtering & sorting (Frank Laurijssens)
  • Revert allow_dtml change (#1281) (Frank Laurijssens)
  • self-document the IssueTracker pages for missing allow_dtml (Sascha Welter)
  • #1281 Frank's patch to set up dtml for IssueTracker pages with extra check (Sascha Welter)
  • #1043 Frank's patch to color issue links in "backlinks" (Sascha Welter)
  • #1008 show issue form on plaintext issues, patch from Bill Page (Sascha Welter)


  • make skin/template/macro handling more general, add support for alternate filesystem skins, rewrite skin system developer docs
  • clean up stylesheet lookup: look for a template named "stylesheet.css" or "stylesheet" in that order
  • siblingsAsList can include current page + sorting optional This is useful mainly for "nautica" style In those one often wants to make a list of pages "on the same level" as the current page. That list usually includes the current page and is not sorted alphabetically, but instead left in the order defined in the /backlinks page. (Sascha Welter)
  • many fixes to make Zwiki's exception handling more precise. This may reveal some new failure scenarios which were previously hidden (Sascha Welter)
  • fix a syntax error in tests
  • fix a missing doublequote in standard_error_message
  • clarify relicensing clause
  • bumped year in copyright statement (Sascha Welter)
  • signed (Sascha Welter)
  • Signed CONTRIBUTORS (Frank Laurijssens)


  • de (Stefan Kose)
  • es (Francisco Mañas)
  • fr (Nicolas Velin)
  • zh_CN, zh_TW (nwind)
  • nl (Frank Laurijssens)

Re: Zwiki 0.59 released --Simon Michael, Mon, 02 Apr 2007 19:48:16 +0000 reply

And finally, I have added python-announce. Enjoy! Don't break it! :)

On Mon, 2007-04-02 at 12:45 -0700, Simon Michael wrote:

> Pythonistas, > > Somehow I never got around to announcing Zwiki - the "other" python wiki > engine - here on python-announce. I was waiting for 1.0 I guess. I'm happy > to fix that starting now, with the release of Zwiki 0.59. A project intro > and release notes follow. Drop by and take a look!

Add method that export the contents of Zwiki in plone to MYSQL --Simon Michael, Mon, 02 Apr 2007 20:02:43 +0000 reply

Hi Win!

It sounds a tad complicated, but perhaps there is a good reason for this approach which I don't understand.

To debug that error, I would have a look in Z2.log to see what urls are being requested, and find out why.

Zwiki 0.59 released --EmmaLaurijssens, Mon, 02 Apr 2007 20:13:38 +0000 reply


Now, which issues do we require to be closed to get to a 1.00 release? There is ZwikiOneReleaseDiscussion but it is very outdated.

Zwiki 0.59 released --Simon Michael, Mon, 02 Apr 2007 22:09:26 +0000 reply

Great work all.

By the way, you'll notice my note about quarterly releases.. I've been thinking about it for a while, I think it may work better now. Comments ?

EmmaLaurijssens wrote: > Now, which issues do we require to be closed to get to a 1.00 release?

Good question! Thoughts ?

Add method that export the contents of Zwiki in plone to MYSQL --UN PEP, Tue, 03 Apr 2007 02:35:26 +0000 reply

Yes, I found it in Z2.log. I am still confused about error.

The red colored "exportmysql:method=Export" in the below message is my new method in PageDiffSupport? class in After I clicked on "Export" button in history view of a Zwiki page, the plone goes to the below url. - admin [02/Apr/2007:08:59:49 +0700]? "GET /wiki/group-a-assignment/TextFormatting??currentRevision=1&exportmysql:method=Export HTTP/1.1" 404 15779 "http://localhost:8080/wiki/group-a-assignment/TextFormatting/diff" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"

I tried to do the same ZPT input like others input buttons "prevDiff" but I got errors for my new method. please see my in attachment.

Simon Michael <> wrote: Hi Win!

It sounds a tad complicated, but perhaps there is a good reason for this approach which I don't understand.

To debug that error, I would have a look in Z2.log to see what urls are being requested, and find out why.

Yay 0.59 release! --betabug, Tue, 03 Apr 2007 07:07:47 +0000 reply

Congratulations Simon, congratulations everybody!

I think quarterly releases are fine. It will put a less hectic upgrade schedule on site admins (I guess they didn't upgrade with every release anyway till now) and I think Zwiki is stable enough that we don't need a frantic schedule.

Speaking about "stable": Personally I would just go on counting up from 0.59, 060, 0.61... the whole "1.0 release" thing is so 1990s :-). Zwiki is as stable now as it would be with a 1.0 release someday. Also if the release is 1.0 people will think: "Oh, a point-zero release, let's wait till they have some more bugfix releases going."

Yay 0.59 release! --Frank Laurijssens, Tue, 03 Apr 2007 08:16:07 +0000 reply

In that case, shouldn't we just drop the "0."? A 0.x release makes people think the software is still experimental and not production ready. If people waiting for the next bugfix is a reason not to go to 1.0, then IMHO there are even more reasons to stop using the 0. prefix.

Yay 0.59 release! --betabug, Tue, 03 Apr 2007 08:21:51 +0000 reply

> In that case, shouldn't we just drop the "0."?

+1 for me. Or replace it with Z.60 or so :-)

error on a fresh install of 0.59 when saving wiki page... --pgoldweic, Wed, 04 Apr 2007 19:23:08 +0000 reply

Hi, I apologize if you see this message more than once (I tried posting to the newsgroup before). I am new to ZWiki and have just installed version 0.59 under Plone 2.5.2 and Zope 2.9.6. Unfortunately I get an error when I try to save a wiki page (or view it, after this), as follows:Traceback (innermost last):

Module ZPublisher?.Publish, line 115, in publish Module ZPublisher?.mapply, line 88, in mapply Module ZPublisher?.Publish, line 41, in call_object Module Products.ZWiki.ZWikiPage, line 253, in __call__ Module Products.ZWiki.ZWikiPage, line 265, in render Module Products.ZWiki.ZWikiPage, line 282, in preRender Module Products.ZWiki.pagetypes.rst, line 45, in preRender Module Products.ZWiki.pagetypes.rst, line 36, in format Module reStructuredText, line 137, in HTML Module reStructuredText, line 90, in render Module docutils.core, line 431, in publish_parts Module docutils.core, line 612, in publish_programmatically Module docutils.core, line 206, in publish Module docutils.writers, line 78, in write Module docutils.writers.html4css1, line 136, in translate Module docutils.writers.html4css1, line 230, in __init__ Module docutils.utils, line 435, in get_stylesheet_reference

AssertionError?: stylesheet and stylesheet_path are mutually exclusive.

What am I missing? Is this a configuration issue in my plone/Zope environment? I'd appreciate any comments. Thanks in advance, -Patricia

error on a fresh install of 0.59 when saving wiki page... --Simon Michael, Wed, 04 Apr 2007 19:36:13 +0000 reply

That's an odd one. Is it content-related ? Eg do you get the error if you save a blank page ?

**error on a fresh install of 0.59 =?utf-8?b?d2hlbglzYXZpbmc=?= wiki
page...** --Patricia Goldweic, Wed, 04 Apr 2007 22:02:15 +0000 reply

Simon Michael <zwiki <at>> writes:

> > That's an odd one. Is it content-related ? Eg do you get the error if > you save a blank page ? > > -- > forwarded from <at> > >

Yes, I get the same error if I try to save a blank wiki page. -Patricia

Next BugDay on 2007/05/04? --betabug, Fri, 06 Apr 2007 10:07:58 +0000 reply

Since today is easter holiday, and since we've switched to a 3-month release schedule, I'd like to suggest the first Friday in May for our next BugDay. There are still a lot of "open" issues in the IssueTracker, so another big go at closing as many of them as possible would be nice. As with the last one I'd suggest the main target to be reproducing and closing as many old issues as possible. In the process we can identify the issues that really need work to fix.

If everybody is happy with that, please mark in your calendar!

UnicodeDecodeError? --wlang, Tue, 10 Apr 2007 08:36:04 +0000 reply

There is a problem with patch #1303 (Illegal utf-8 handling in It assumes that the wikipage is utf-8 encoded. But at least at our site it is latin-1. After the upgrade to 0.59 we get an UnicodeDecodeError? at almost every page (I've filed a bug report: #1328).

What could be the right fix for this? How do we know the right encoding of a wikipage? Any ideas?

Zwiki entry deleted from (English) Wikipedia --JózsefJároli, Thu, 12 Apr 2007 13:03:17 +0000 reply

Have you noticed that the English entry about Zwiki has been deleted from Wikipedia? (Reason: G11 - advertising/ A7 - does not assert notability)

Zwiki entry deleted from (English) Wikipedia --betabug, Mon, 16 Apr 2007 14:25:31 +0000 reply

I have restored the Wikipedia entry. I've edited the first sentence that could have been reason for the label "advertising", then added more information and especially references. In the process I've found two articles written about Zwiki, added links to them. If there are any more articles you know of, please add links at or just mention them here. Frank left a comment at the admin who deleted the page, so we hope we're not entering an edit war with her or something silly like that.

Zwiki entry deleted from (English) Wikipedia --Simon Michael, Mon, 16 Apr 2007 17:06:59 +0000 reply

Great work guys, thank you. I see their point, the page does even now read more like a product blurb than a timeless encyclopaedia article, so I think it can evolve more. I think Zwiki is notable enough, but why exactly ? We just have to figure that out and put more focus on that. Probably it's better if I don't edit the article too much myself, I will probably post on the talk page as soon as I revive my wp login.

Newbie Question --lhengist, Wed, 18 Apr 2007 04:12:51 +0000 reply

Can zWiki be installed on two machines and have them be in a redundant setup? Such that if one fails the other can continue, then when the failed one is brought back up it can be re-synced. I'm using the builtin zope database. Currently we have a zope/zwiki server, and have just gotten a 2nd one to have as a backup in another city. I've created some scripts to copy the zope database to the 2ndary server every night. In my setup the users have to notice the first server is down, then start using the 2ndary server. They would know not to make changes to the wiki on the 2ndary server because the database on it will get blown out whenever the first one is brought back into service (assuming the database on it is not lost). Our zWiki is mainly a repository of information, it is not static, but there are many more viewings of than changes to the information. I've looked at the zope site and searched here some but except for some info on Zeo (which is a bit over my head) I can't seem to find any hints. Thanks.

Newbie Question --EmmaLaurijssens, Wed, 18 Apr 2007 04:28:27 +0000 reply

Well, it is Zeo what you need, given your problem description. Good Zeo documentation is a bit scarce though. Zwiki fully depends on Zope, so the only mthod currently available is Zeo. I could think of ways to create Zwiki-level redundancy but it doesn't exist as of yet.

Newbie Question --betabug, Wed, 18 Apr 2007 07:05:13 +0000 reply

You might want to look at ZopeWiki:ZSyncer too. It allows to "sync" folders between two Zope databases. It would even allow you to sync changes back to the 1st server after it comes back online.

Another option would be to use the script (which is meant for incremental backup / restore), so you can move only deltas to the 2nd server.

Strictly speaking this is a Zope problem and not a Zwiki problem. As Frank mentioned, there is no built-in mechanism for doing something like that in Zwiki - we leave that job to the underlying application server. code search engine & statistics --betabug, Wed, 18 Apr 2007 07:14:32 +0000 reply

While digging the web upside down to find articles for our wikipedia entry I found a reference to having stats about the Zwiki project. I went there: and noticed that the information is outdated, because it still points to sourceforge. I've sent them a mail and received a friendly reply: "We can delete the old project location and add the new one no problem. We'll let you know when we've got it switched over. Probably in a couple weeks when we do our regular index push."

away from keyboard --Simon Michael, Fri, 20 Apr 2007 17:10:43 +0000 reply

Heading to the mountains for the weekend - and rain has started - yippee! Happy hacking all.

Time Zone issues --michael, Sat, 21 Apr 2007 12:48:23 +0000 reply

I have remove all occurrence of ".toZone('UTC')" in, and This solved my "last_edit_time" issues as my servers are all set in GMT zone. I believe the "toZone('UTC')" is not needed as time zone is already handle by zope itself.

Time Zone issues --betabug, Mon, 23 Apr 2007 09:25:30 +0000 reply

Hi Michael, what timezone issues? Did you post a problem report somewhere and I missed it?

Sorry, but I must doubt your claim that "time zone is already handle by zope itself". It isn't. Zope doesn't handle any time zone information, not in the so called "ISO" format Zwiki uses. If indeed your machine is set to GMT, then the toZone('UTC') shouldn't change a thing. If there is a bug with it, then I'd like to hear about it with a detailed error description.

Time Zone issues --Michael Ang, Mon, 23 Apr 2007 10:05:33 +0000 reply

I have similar problem with

Zwiki pages do not appear in Plone's navigation portlet --sfoster, Mon, 23 Apr 2007 12:55:36 +0000 reply


We are using:

Plone 2.5.2 Zwiki 0.58.0

but the Zwiki pages are not visible in the Navigation portlet UNLESS you navigate directly to them (for example, via the "contents" tab). The page will disappear from the portlet as soon as you navigate away.

"Wiki page" is checked in the navigators "Displayed content types" configuration. Disabling/enabling filter on workflow state makes no difference.

Any ideas?


Steven Foster

Zwiki pages do not appear in Plone's navigation portlet --EmmaLaurijssens, Mon, 23 Apr 2007 13:01:57 +0000 reply

Hmmm. On a vanilla Plone 2.5 instalation, they should show up in the navigation portlet. I always have to turn it off when I set up a new portal.

Do you filter the portlet's contents according to workflow status? Zwiki pages don't support Plone workflow, so to Plone, they're all "draft". So they won't show if you have set the filter to show published pages only.

BTW, are you sure you want Zwiki pages to show up in your navigation portlet? They'll always show up on the same level, because the portlet does not support page hierarchy. If you have more than 5-10 wiki pages, the navigation portlet will look like a mess.

Zwiki pages do not appear in Plone's navigation portlet --sfoster, Mon, 23 Apr 2007 13:34:27 +0000 reply

Thanks Frank - very useful feedback!

Interesting first statement - how do you "turn it off" (use workflow state)?

We do indeed filter on workflow state, but enabling/disabling this makes no difference to the Zwiki pages appearing. Do you mean if I create Zwiki pages anywhere on the site, they all turn up at the top of the navigation portlet?

Zwiki pages do not appear in Plone's navigation portlet --EmmaLaurijssens, Mon, 23 Apr 2007 13:44:09 +0000 reply

Regarding "turn it off", I always turn off the option to show wiki pages in the navigation portlet. A wiki is a set of pages within a folder, which means that if it's turned on and I have a wiki with 100 pages, they will al show up at once when I select the folder or a page within the folder. That's ugly. Sso:

> Do you mean if I create Zwiki pages anywhere on the site, they all turn up at the top of the navigation portlet?

No, just the pages within one folder, within the folder in the porlet.

Zwiki pages do not appear in Plone's navigation portlet --sfoster, Mon, 23 Apr 2007 14:11:02 +0000 reply

> Regarding "turn it off", I always turn off the option to show wiki pages in the navigation portlet.

Sorry if I'm being a bit thick here Frank - where is this "magic" option (is it filter on workflow state)?

Thanks again for your help.

Zwiki pages do not appear in Plone's navigation portlet --sfoster, Mon, 23 Apr 2007 14:26:42 +0000 reply

..I think I've worked it out - is it the "Wiki page" option under "Displayed content types" on the Navigation options? Ours is checked, so it sems we've found another way to hide Wiki pages!

Zwiki pages do not appear in Plone's navigation portlet --EmmaLaurijssens, Mon, 23 Apr 2007 14:32:18 +0000 reply

That's the one. I always turn that one off, it is on by default.

Zwiki pages do not appear in Plone's navigation portlet --Simon Michael, Thu, 26 Apr 2007 19:39:46 +0000 reply

Hi Steven, did you find the answer to this issue ?

I haven't been using zwiki in plone for a while, so I've forgotten all the details, but I expect to look at it again in the next weeks. If you're stuck, contact me on #zwiki.


better history --simon, Fri, 27 Apr 2007 02:11:38 +0000 reply

FYI: needs testing..

store text as unicode ? --Simon Michael, Fri, 27 Apr 2007 21:32:15 +0000 reply

Currently we store text utf8-encoded; it would probably be better to store it as unicode, as other apps do. Unicode would be more accurate to work with internally (cf, and might be a good step towards being more bulletproof.

site should be working again --simon, Sat, 28 Apr 2007 01:37:55 +0000 reply

I've blocked "qihoobot" which was getting stupid urls like /AllPages/AllPages/AllPages/AllPages/AllPages/AllPages/ZwikiWebChanges1999 for ever. I think this was the cause of today and yesterday's site slowdown. I've also upgraded zope from 2.9.4 to 2.10.3 and removed all plone products for the moment, which makes restarts much faster. is out of action temporarily.

more encoding errors --simon, Sat, 28 Apr 2007 01:41:09 +0000 reply

But, the zope upgrade means #1330 is biting us on now; some views and pages will give unicode errors. I'm making progress on this.

site should be working again --simon, Sat, 28 Apr 2007 15:07:27 +0000 reply

Still slow - it's really puzzling, I see no specific slow requests, but every few minutes zope becomes really slow - requests taking up to 15 minutes each - and then recovers for another few minutes. I continue to study the logs.

site should be working again --simon, Sat, 28 Apr 2007 17:50:31 -0700 reply

Investigations continue at .