osem icon indicating copy to clipboard operation
osem copied to clipboard

Link to nonexistent schedule

Open AndrewKvalheim opened this issue 1 year ago • 4 comments

I'm submitting a…

  • [x] Bug Report
  • [ ] Feature Request

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:

  • No link is displayed.
  • Visiting the expected address of the schedule returns 404 Not Found, not an error message.

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.

AndrewKvalheim avatar Mar 10 '23 01:03 AndrewKvalheim

i am interested in solving this issues.

enterbrianup avatar Jul 18 '23 15:07 enterbrianup

i am interested in solving this issues.

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

hennevogel avatar Jul 18 '23 16:07 hennevogel

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 ?

Yash-Singh-Pathania avatar Jul 16 '24 06:07 Yash-Singh-Pathania

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

hennevogel avatar Jul 16 '24 13:07 hennevogel