cohen990 / VoxPop

The voice of the people in pictures!
0 stars 0 forks source link

New Stories' Voting buttons causing crash #15

Closed AJizzleBizzle closed 9 years ago

AJizzleBizzle commented 9 years ago

Voting is causing a crash.

This is only apparent in newly created stories.

I think this is due to the following code in BlogService.cs:

Line 43: var key = Line 44: blogPost.Poll.Keys.Single(x => x.Trim().Equals(model.PollItemKey, >StringComparison.OrdinalIgnoreCase));

I think the above is what makes sure the options users pick for their stories aren't garbled? Not sure though and couldn't fix it anyway... Thought maybe by ignoring this line for the first click of each button??

                                          __________        

Also I have added vote buttons GenericStory pages however clicking them redirects to Index - pretty sure this is due to;

Line 65: return RedirectToAction("Index");

in the Vote action in the HomeController. I tried creating a new action 'Vote2' with RedirectToAction("GenericStory") instead just for the vote buttons on those pages but that just caused more crashing...

cohen990 commented 9 years ago

fixed in #17