DoSomething / legacy-website

:moyai: The DoSomething.org legacy website.
https://www.dosomething.org/
MIT License
50 stars 22 forks source link

[SMS game] - no texts sent + error message received #2406

Closed mikefantini closed 10 years ago

mikefantini commented 10 years ago

Got this error message when testing out the SMS Game http://staging.beta.dosomething.org/campaigns/bully-text-0. Also no messages were sent to either alpha or beta.

image

cc: @aaronschachter @angaither @weerd

mikefantini commented 10 years ago

also the opt-in path is set up on staging:

image

aaronschachter commented 10 years ago

@mikefantini @jonuy Do these opt-in paths actually exist in Mobilecommons? And can we confirm they have been inputted correctly?

I've just tried testing the dev node, http://staging.beta.dosomething.org/node/1199, and got sent a text.

My suspicion is that the paths are not set in Mobilecommons or have been entered incorrectly. If this is the issue, we can keep this issue open to add code to catch the errors that are happening with a cleaner "Whoops someone entered the wrong thing" message. ]

mikefantini commented 10 years ago

@aaronschachter it appears to be correct:

aaronschachter commented 10 years ago

I've tested http://staging.beta.dosomething.org/campaigns/bully-text-0 and it works for me, @barryclark confirmed he received a text. Can we get some more people testing this to see if we can replicate.

jonuy commented 10 years ago

Works for me. Both alpha and beta received texts.

mikefantini commented 10 years ago

Just got the error again when testing as "authuser" on http://staging.beta.dosomething.org/campaigns/bully-text-0

image

angaither commented 10 years ago

I agree with @mikefantini I was able to submit when I was logged out, but with my user account I got the same error.

mikefantini commented 10 years ago

yeah worked for me logged out but tried on multiple accounts logged in with no luck:

aaronschachter commented 10 years ago

@uy were you logged in when you tested? i've just tested as logged in and it works.

mikefantini commented 10 years ago

@aaronschachter what uid did you test with?

The two I tested with above don't have a mobile number attached to the user account, does the one that worked for you have a cell number saved to the profile?

aaronschachter commented 10 years ago

yes, i used my stage uid 5 and it has a #. this woudl explain it though, i think this is the offending code, which we should just remove.

  // Check if an account exists for the given alpha mobile.
  // An anonymous user is able to submit the form, but they may still have an account.
  if ($account = dosomething_user_get_user_by_mobile($values['alpha_mobile'])) {
    // Create a signup for the account.
    // If $account happens to be the logged in user, it's okay.
    // dosomething_signup_create will check if a signup exists before creating.
    dosomething_signup_create($nid, $account->uid);
  }
mikefantini commented 10 years ago

ok cool. @aaronschachter want to take that out for now and we can revisit after we get this out to usertesting.com?

aaronschachter commented 10 years ago

sure i can take this one, assigning to myself.

jonuy commented 10 years ago

Sounds like you guys got it... but just for the sake of responding, I tested while logged out.

aaronschachter commented 10 years ago

Still looking into this, removing code I thought would fix is not fixing. I've been able to replicate: Only seems to happen if a logged in user submits the form and does NOT have a mobile set on their user profile.