ushahidi / crowdmap-issues

A centralized repository for filing, tracking and discussing bugs and features in Crowdmap.com and Crowdmap's API.
0 stars 2 forks source link

Registration Shows Conflicting Notifications #376

Closed brianherbert closed 10 years ago

brianherbert commented 10 years ago

Registration UI broken. Signing up a new account with an email that hasn't been used before shows:

screen shot 2014-04-15 at 1 31 50 pm

Then, it stays on the registration page instead of moving on.

zhalloran commented 10 years ago

I tried to reproduce this bug on the dev server. The request to http://api.crdmp3.com/v1/session/register/ returned this error: XMLHttpRequest cannot load http://api.crdmp3.com/v1/session/register/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://crdmp3.com' is therefore not allowed access. This prevented the client from updating. I did, however, receive two activation emails from the one request.

zhalloran commented 10 years ago

I've confirmed the request to the registration endpoint is being submitted twice by the UI, but it is failing both times. My best guess at this point is that there is an error somewhere along the registration chain on the API server that is causing a hard fail and preventing the response from being constructed and passed back.

brianherbert commented 10 years ago

Figured it out and fixed.

The registration was being executed once all of the notification had faded out. The find() query function made this loop through for each element it was searching for. ie: $(this).find('p.success, p.errors').

Closing.

brianherbert commented 10 years ago

Real funny, GitHub. My comment appears to have posted twice ;)

screen shot 2014-04-18 at 10 26 00 pm