[Tb] Weird bug when duplicating prototypes

From: Marc-Antoine Parent <maparent__AT__acm.org>
Date: Tue Aug 10 2004 - 18:43:51 EDT

> I have a bunch of notes with prototype A. I want to make a
> different but similar prototype, called B, so I do an
> Edit->Duplicate on A and rename the copy "B", then make a
> few changes to B. I set a few notes to have prototype B. After
> exporting my site, everything is wrong. All the notes that
> had prototype A have been changed to have prototype B. What
> a mess. Actually I went through this procedure with two prototypes,
> and over 200 notes got messed up.

Wow! I could not believe it and I tried.
Here is the story: When you duplicate a node, all links from it are
duplicated to apply to the copy. (Links to it are not duplicated.)
As the prototype is duplicated, since prototype is coded as a link from
the prototype to the node (which I was never comfortable with...), the
nodes belonging to that prototypes are now pointed to by both
prototypes (and the second link holds for some reason.) (This is before
you even rename the prototype.)
Note that, if you set the prototype back to A on such a node X, there
will still be two prototype links from A to X! Ugh.

> The bottom line for users, I guess, is a warning: do not duplicate
> prototypes; make fresh ones.

Yes, indeed.

MAP
Received on Tue Aug 10 22:43:51 2004

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2005 - 10:45:20 EST