• j.hoffmann

    (@jhoffmann)


    This problem occurs with EM 5.9.10, but older versions are affected too.

    When Single ticket mode is active the rsvp cutoff date for an event is taken from the ticket end date if set. The problem is, that when saving an event this date is read from the ticket as of previous save, not using the currently submitted data. So if I change the ticket end date from a date in the past to a future date, the event_rsvp_date still gets set to the past date. Only when saving the event again, the date gets corrected.

    This is a problem for me since I use the {bookings_open} placeholder which then evaulates as false even though bookings are possible.

    I think I was able to pin the bug to ′classes/em-event.php′ lines 742 and on:

    if( get_option('dbem_bookings_tickets_single') && count($this->get_tickets()->tickets) == 1 ){
    	//single ticket mode will use the ticket end date/time as cut-off date/time
    	$EM_Ticket = $this->get_tickets()->get_first();
    	$this->event_rsvp_date = null;
    	if( !empty($EM_Ticket->ticket_end) ){
    		$this->event_rsvp_date = $EM_Ticket->end()->getDate();
    		$this->event_rsvp_time = $EM_Ticket->end()->getTime();
    	}else{
    		//no default ticket end time, so make it default to event start date/time
    		$this->event_rsvp_date = $this->event_start_date;
    		$this->event_rsvp_time = $this->event_start_time;
    		if( $this->event_all_day && empty($_POST['event_rsvp_date']) ){ $this->event_rsvp_time = '00:00:00'; } //all-day events start at 0 hour
    	}
    }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bug: rsvp cutoff date is not stored correctly in single ticket mode’ is closed to new replies.