backstage-technical-services / hub

The starting place for anything related to the website.
0 stars 1 forks source link

Error in setting committee from election results #122

Closed Hypothawits closed 4 years ago

Hypothawits commented 4 years ago

Summary

Gives "unknown error" message when using saving after set committee button on election page. Work around is to set committee from membership list

Actual behaviour

image

Expected behaviour

give the members committee privileges

Steps to reproduce

open committee election, set committee, select members to set as committee, hit save.

When did it happen?

12:05AM 31 July 2020

Urgency

Low

Hypothawits commented 4 years ago

I think also that setting the committee also sets it as the result for that election? so that's also not working. I'm also not sure if setting committee gives privileges or not. Also I realise this doesn't need fixing at all because new website and I have work around, so this is just to log it I guess.

bnjns commented 4 years ago

The workaround will only work for setting permissions etc, not for saving the results of the election :confused:

Can you open the network tab, try again and post a screenshot of the error message you get back? I couldn't find any helpful logs.

Hypothawits commented 4 years ago

Is this the network tab? seems to say it's a 404 image

bnjns commented 4 years ago

Ah, I've spotted it - there's // in the URL. It should be https://www.bts-crew.com/elections/22/elect. I suspect this is the same bug that we noticed before.

From a quick glance, I think this is the problematic line: https://github.com/backstage-technical-services/laravel-site/blob/master/resources/views/elections/modals/elect.blade.php#L34. I think it should be

                data-form-action="{{ route('election.elect', ['id' => $election->id]) }}"
Hypothawits commented 4 years ago

ah nice find! yes I remember that from the manifesto issue!