Debugging is a hard job, and not the most fun there is. Especially when working on Open-CI , Mediamatic's system which let different websites interact with each other. This interaction of websites is very nice and works quite intuitive, however, because there are multiple sites involved, it can be a pain to debug.
Take the Migrate module. When enabled in your website, it allows you to physically move your account from the site you're currently at, to another site in the Open-CI network. Very nice functionality, but quite complex. After some bug reports from our users, we had to turn off the module a month ago because it contained a bug which in a few cases caused a failure: In the middle of the migration process, a message showed up: "Account creation failed", after which the migration process was abruptly ended, leaving a confused user behind.
To see what was exactly going on, I decided to draw a little schematic about the different situations that can happen when user X moves his account from site A to site B, or possibly merges it into his account Y at site B. The "browser" rectangles around the X'es indicate at which website the user initiates the migrate action.
a) The user X moves his account from site A to site B.
b) Mr. X moves his account to site B, but he had already logged in into site B with his account from A.
c) Mr. X is logged in at site B with his account from site A, and decides that his account should move from A to B.
d) Mr. X moves his account from A to B, but on B there is a user which is "similar" to Mr. X (e.g. the same name or phone nr.). Mr. X gets the option to merge the accounts, and chooses that option, since it is his account. The X account gets merged into the Y account on B.
e) Similar to d; Mr. X gets the option to merge the similar accounts, but he decides not to merge; (it might be a user with the same name). His account from X moves to B.
f) Similar to d; but in this case X had already logged in once at site B. He still merges.
g) Similar to e; but in this case X had already logged in once at site B. He moves his account.
e) Similar to d; but he is logged in at site B and decides he wants to keep his account on B, but merge his account from A into B.
That's quite some different cases for a single feature!
So now for the "Account creation failed" message. Account creation can fail under one of the following conditions. For each of the cases above, we have to rule out each of these conditions.
I'll leave the results of my debugging out of this article, but will update this text when I have squashed it :-)
This article has been imported into this site. The original can be found here: http://www.mediamatic.nl/id/9602.