fix renaming errors that leave blank keys

Ticket

+commit
 

If you rename a simple card (eg Fish) that acts as the right part of plus card (eg Ethan McCutchen+Fish), then in the process the plus card will end up with a temporary key (formerly a blank key), which breaks the card.

 

  1. We should fixing the kludge in tracked_attributes#set_name: √- we made it use UUID
  2. we should figure out why the renaming in question is causing the problem.
  3. we should make it impossible for a blank key to get created in the first place (validations). we may also revisit the merit of the temporary key design.

 

See http://sandbox.wagn.org/wagn/new_name_same_key_bug

 

I renamed "image" to "Image" on wagn.org, and that broke all the cards ending in +image -- they all were left with universal keys.  (It was a nuisance to fix.)  Same thing with other lower-case card types that I renamed.

 

 

Also see renaming to key variant breaks


Lew made some changes in 0.13 that may address most cases here, though I'd still like to add validations. Let's test once we get pinz fully deployed to 0.13.

  --Ethan McCutchen.....Sun Apr 26 16:46:45 -0700 2009


commit bf85b88ccf6f2d0803b52a68516eeeab4c0e7a14
Author: Lewis Hoffman
Date: Wed May 6 18:41:06 2009 -0500

refactor renaming code, tighter, faster, fixes at least one bug

  --Lewis Hoffman.....Wed May 06 16:44:19 -0700 2009


I tested the right-name example given above and there was no problem. Would close, but i see bits in the solution that i want to make sure have either been handled, or get tracked somewhere else if that's wanted.

  --John Abbe.....Wed May 20 11:31:50 -0700 2009


OK, I think we're a check on 1 and 2. We can test #3 by trying to create a card with a name that would resolve to a blank key, like '@@@@'. That shouldn't be possible. (Though it shouldn't cause as much trouble any more).

I don't know what #4 translates to in interface, nor how it addresses the issue, which I thought only occurred if cards were somehow cached.

  --Ethan McCutchen.....Wed May 20 11:46:55 -0700 2009


It is still possible alas, see http://dwagn.org/wagn/@@@@

  --John Abbe.....Wed May 20 12:20:45 -0700 2009


 

Reopened. There are two unresolved issues. John, can you record an ticket to validate the presence of a key. Lew, can you explain item #4 above?

 

  --Ethan McCutchen.....Wed May 20 14:47:35 -0700 2009


 

validate the presence of a key

 

  --John Abbe.....Wed May 20 20:24:06 -0700 2009