Submitted by : simon at: 2003-10-26T21:32:15+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Note: ZWiki newbie warning below

I add a new ZWiki web.
In the ZMI, I add a title to the FrontPage of the ZWiki web.
I open the new ZWiki web in my browser (Netsecape 7)
I use edit at the bottom of FrontPage and modify the source then save it.
In the ZMI, I now see FrontPage (A Title) and a new ZWiki page ATitle (A Title).

Nothing is changed in FrontPage (A Title) but a new page was created using the title of the FrontPage which contains the original text from FrontPage and the modified text.

This happens using ZWiki 0.19 or 0.20 with Zope 2.6.1 on a win32 (XP) machine.


...later that week...

I now have a better understanding of how ZWiki works.

You can add a ZWiki page with a title using the ZMI. For example – MainPage with the title ‘This Is The Main Page”. However, when the page is edited, it will be saved with a name made up of the title stripped of invalid characters.

Using the above example – ThisIsTheMainPage. The original page (MainPage) remains untouched.

My difficulty came in because I had a link to MainPage, which had the undesirable effect of returning the unedited page. I don’t know if this action is explained in any documentation. I have not looked very deeply. If not It would be nice if it was.


So, a ZWiki newbie warning...

When adding a ZWiki page using the ZMI, the page name and title can be entered separately and you may make them different. Other pages on your site may contain links that refer to this page and ZWiki will display it properly.

If the page is edited, ZWiki will save the page using a name derived from the title with invalid characters (spaces, apostrophes, etc.) removed. If your page name and title were different, your link will no longer be referring to the page you have just edited.

When a page is created using ZWiki, this will not be a problem because ZWiki creates pages with the name and title the same.

So I suppose this issue is closed due to lack of understanding on part of a ZWiki newbie.



comments:

... -- 2003/07/10 15:14 GMT reply
I really don't think so and I believe this is the same issue as 0550. When a new WikiWord? is used to create a new page in Plone, selecting a question mark behind the new WikiWord? should open the edit page, put the new WikiWord? in the title box and clear the text box below it for the new message. The current system is hard to understand and does not follow wiki conventions.


... -- 2003/07/10 19:48 GMT reply
I did a bit of testing before I came to my conclusion above. Here is a little of what I tested.

I would edit an existing page and put in it ‘!MyTest’ (a proper WikiWord), save it, then select the question mark. A new Wiki page in edit mode would come up. After saving this new page, I looked in the ZMI and both the page and the title are the same.

If I edited a page and put in ‘[My Other Test]’, saved it, then select the question mark which would also bring up a new Wiki page in edit mode. After saving it, I looked in the ZMI and see a new Wiki page with the title exactly as it is between the square brackets but the page name has all invalid characters removed.

I also found out that if I edited a page and put in ‘[This is a second test]’ (only first word has a starting upper case character), the resulting page would end up with an upper case character at the start of every word and all invalid characters removed (ie: ThisIsASecondTest).

I even tried ‘[this time’s a_lot of second’s]’ and had a page named ‘!ThisTimesALotOfSeconds’ with a title of ‘this time’s a_lot of second’s’.

yes --SimonMichael, 2003/07/29 17:20 GMT reply
Yes, this is how it works currently:

Zwiki depends on this invariant relationship between page name and page id for fast free-form linking. If you use the ZMI, you need to preserve this invariant, otherwise free-form links to that page won't work. It's usually easier to use the page management form (only available in the default skin at present) to rename a page, so that Zwiki will keep the page name and id in sync.

I agree, this should go in the FAQ.

property change --SimonMichael, 2003/08/03 01:08 GMT reply
Title: IssueNo0551 Edit Creates a New Page from a non-empty Title (ver 0.19 & 0.20) => IssueNo0551 changing title in ZMI causes confusion Category: general => documentation

This is almost show-stopping for me -- Thu, 05 Aug 2004 06:08:35 -0700 reply
URLs? should in general stay the same, imho. There aren't many things so irritating as broken links. In my case a few links from google to my wiki pages were broken because zwiki renamed pages.

A few months ago in an older version of zwiki I used the ZMI to make some page titles a bit more readable, also to score some points (succesfully) in google's pagerank. Now I'm busy reparenting pages and getting bitten by this bug. I can't really reparent to a page when the title and the id differ...

I've stopped reparenting for the moment as I don't trust zwiki to handle it correctly. Renaming URLs? is not-done in my book.

This is almost show-stopping for me --Simon Michael, Thu, 05 Aug 2004 09:27:29 -0700 reply
I think you're misreading the situation.. want to chat on #zwiki ?

When you decide to rename a page, Zwiki no longer leaves a placeholder page by default (the clutter problem outweighed the broken url problem). You can change this default in Defaults.py. But, I don't think you're talking about that kind of rename - or are you ?

Because ids and urls can only contain certain characters, titles and ids must differ (if and only if you choose to use freeform page names). There is a correspondence between the two which is preserved when you use Zwiki's rename forms. Don't use the ZMI to change zwiki page titles or ids, or your freeform wiki links will stop working (unless you take care to preserve the title = canonicalIdFrom(title) invariant yourself).

If you're not in CMF/Plone, do install the standard_error_message which will route almost any spelling of the page id or title to the right place.

Reparenting should have zero effect on names or urls.

PS --simon, Thu, 05 Aug 2004 09:32:36 -0700 reply
Feel free to correct me, but as I see it this issue is open for the last year only to get the "don't change wiki page titles in ZMI" advice into the documentation where newcomers will see it, FAQ for a start. I have been busy with other things, anyone who cares could go ahead and do this.

show-stopping fixed (at least documented) -- Thu, 12 Aug 2004 03:24:35 -0700 reply
After a chat on #zwiki with SimonMichael I got it fixed. The solution:

show-stopping fixed (at least documented) --Simon Michael, Thu, 12 Aug 2004 08:53:00 -0700 reply

* All the pages with a title different from the WikiName: re-title them to the wiki name using the zope management interface.

Good. FYI, another way to repair out-of-sync titles & ids is to run SomePage?/upgradeAll .

property change --simon, Thu, 30 Sep 2004 16:56:05 -0700 reply
Name: IssueNo0551 changing title in ZMI causes confusion => 'IssueNo0551? Zwiki's title-id linkage can be surprising, causes confusion' Category: documentation => general

what else can we do ? --simon, Thu, 30 Sep 2004 16:59:55 -0700 reply
This has surfaced again (#921 rename via plone UI + edit creates duplicate page). I've recategorized it as it is unexpected, and perhaps we can do something more than just document it. Note dropping the id/title relationship is not appealing since it has been a huge win for simplicity and performance.

what else can we do ? --simon, Thu, 30 Sep 2004 17:15:20 -0700 reply
We could hook into the ZMI and Plone renames so they use Zwiki's rename function. Might cause some confusion. (There are other ways to rename things - ftp, webdav ?)

We could assume that non-zwiki renames are going to happen, and add code to check for that situation where it seems to cause problems. Without causing a performance hit, preferably. Might make this a little less troublesome. Doesn't make the confusion go away. Complicates the code.

maybe a helpful hack for zope 2.8... -- Thu, 14 Apr 2005 08:09:43 -0700 reply
... would be to make zwiki a new-style class and have the "title" attribute be a property (in the pythonic sense of the word, not the zopeish sense of the word). Not sure how many of the above problems this would fix. Something like:

def _settitle(self, value): self._title = value self.handleRename(value, 0, 1, 1)

def _gettitle(self): return self._title

title = property(_gettitle, _settitle, _deltitle)

It's not as clean and general as, say, using an event service where renaming things is an event, but zope doesn't provide one of those. The above hack should work transparently with all code that treats "title" as an attribute. This of course is backward incompatible with zope previous to 2.8, and all previous zwiki releases. (I don't remember if Zope's old ComputedAttributes? can be set as well as queried.) More code for upgrade(), whee.

... --simon, Wed, 03 May 2006 13:51:12 -0700 reply
Name: #551 fredrick => '#551 Zwiki's title-id linkage can be surprising, causes confusion' Category: user-editing-stx => general