unitedworldwrestling / arena-public

14 stars 5 forks source link

Printing from main menu throws an exception #99

Closed theswix closed 1 year ago

theswix commented 1 year ago

Arena 1.5.83.1

Describe the bug Attempting to print Team List, Participants List and Team Ranking from Arena main Print menu for one weight class only - 57 kg (http://localhost:8080/bracket/print/929ae787-6646-11ed-ab80-08002745f808) results in Arena exception with nginx errors 500, 500 and 404 respectively in case the checkbox "Freestyle (Seniors)" is empty. Attempting to print the same info from weight category itself works as expected - pdf is generated.

To Reproduce Steps to reproduce the behavior:

  1. Import athletes (or take my db)
  2. Make a draw in one weight class
  3. Create matches
  4. Go to print menu
  5. Select only one weight class where you had a draw, and leave all the other checkboxes on the page unset
  6. Try to print Team List, Participants List and Team Ranking
  7. See errors on respective pages

If I check BOTH "Freestyle (Seniors)" and FS - 57 kg (Seniors) or "Select All", everything working as expected.

Expected behavior Normal printing of requested items.

If user should set the checkbox and ommited it by mistake, there should be a tip like "press the appropriate checkbox first" and NOT exception throwed since it is frustrating for most users and they start to panic :)

Screenshots

print_menu bracket_problem entry_list_problem ranking_problem

Desktop (please complete the following information):

Additional context dbdump_printing.sql.zip

csabavirag commented 1 year ago

Hi @theswix you are completely right, this page has a slightly weak UI experience, it should have notified you when you made a wrong selection. This will be fixed, no question :). The reason why you received the error just because you chose a wrong selection. The action buttons you highlighted belong to the style selection (anything above the horizontal line). So if you chose "Freestyle (Seniors)" and then click on any of Participants table, Team List/Ranking, you should receive the PDF files according to your choice.

theswix commented 1 year ago

Fixed properly in beta