openSUSE / osem

Open Source Event Manager. An event management tool tailored to Free and Open Source Software conferences.
http://osem.io
MIT License
878 stars 493 forks source link

Link to nonexistent schedule #3136

Open AndrewKvalheim opened 1 year ago

AndrewKvalheim commented 1 year ago

I'm submitting a…

Current behavior

The home page can display a link to the schedule when there is no schedule yet:

screenshot

Following the link triggers a server error:

Started GET "/conferences/example/schedule"
Processing by SchedulesController#show as HTML
  Parameters: {"conference_id"=>"example"}
  Rendering layout layouts/application.html.haml
  Rendering schedules/show.html.haml within layouts/application
  Rendered schedules/_schedule_tabs.html.haml
  Rendered schedules/_carousel.html.haml
  Rendered schedules/show.html.haml within layouts/application
  Rendered layout layouts/application.html.haml
Completed 500 Internal Server Error

ActionView::Template::Error (undefined method `each' for nil:NilClass):
    22:                   = (td_start_time).strftime("%M")
    23:               - td_start_time += @step_minutes
    24:           - start_room_time = start_time
    25:           - @rooms.each do |room|
    26:             - start_room_time = start_time
    27:             - span = 1
    28:             %tr

app/views/schedules/_carousel.html.haml:25
app/views/schedules/_carousel.html.haml:11
app/views/schedules/show.html.haml:22
app/views/schedules/show.html.haml:18

Expected correct behavior

When no selected schedule exists:

i.e. the setting Show Schedule on the home and splash page functions as an allowance, not as an unchecked manual control.

Steps to reproduce

  1. As an admin:
    1. Create a conference.
    2. At ManageProgramEdit, enable Show Schedule on the home and splash page.
  2. As an unauthenticated viewer:
    1. Visit the home page.
    2. Click Schedule.

Other information

Other functionality such as notify_on_schedule_public? may be similarly affected; needs review.

enterbrianup commented 1 year ago

i am interested in solving this issues.

hennevogel commented 1 year ago

i am interested in solving this issues.

We are interested to see your pull request. If you need anything from us, let us know 😃

Yash-Singh-Pathania commented 3 months ago

Working on this @enterbrianup did you finish up this cant see anything as such let me pick this up . @hennevogel when can i expect the pull request to be reviewed ?

hennevogel commented 3 months ago

@Yash-Git-Hub whenever I find time in my personal schedule :)