Events+ plugin bug happening since recent update : capacity

Hello

I've seen reference to these bugs on the forums, but I'd like to report them and find out when a fix is due.

- Despite setting the attendees limit to infinite, people trying to book on an event see the message "Sorry, the event has reached it's max capacity!!"

- Update button on edit event page does not become active after text or settings changes (doing a preview is a workaround though...)

...and a small typo
"Sorry, the event has reached it's max capacity!!"

should be

"Sorry, the event has reached its max capacity!!"

(I'd remove the abbreviation and the exclamation marks, but that's stylistic...)

Thanks
Pete

  • Jack Kitterhing

    Hi there Pete @Earlyarts,

    Hope you're well today and thanks for your question.

    - Despite setting the attendees limit to infinite, people trying to book on an event see the message "Sorry, the event has reached it's max capacity!!"

    This bug should have been fixed with 1.7.4, but I see you have that installed, are you requiring payment for the events? Could you grant me support access please via the WPMU DEV dashboard > support > support access and click "Grant Access".

    - Update button on edit event page does not become active after text or settings changes (doing a preview is a workaround though...)

    This came from a change in the plugin, if you have your times in the event like 20:00 and 22:00 remove the : and just have 2000 and 2200 the update button then becomes active. We made the same change to our events system here as well. :slight_smile:

    - Update button on edit event page does not become active after text or settings changes (doing a preview is a workaround though...)

    ...and a small typo
    "Sorry, the event has reached it's max capacity!!"

    should be

    "Sorry, the event has reached its max capacity!!"

    (I'd remove the abbreviation and the exclamation marks, but that's stylistic...)

    I'm afraid we don't currently have a ETA on that, though I could advise you how to change that in the mean time, if you'd like? :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • Earlyarts

    This bug should have been fixed with 1.7.4, but I see you have that installed, are you requiring payment for the events? Could you grant me support access please via the WPMU DEV dashboard > support > support access and click "Grant Access".

    I've granted you access.

    It's a live site and I couldn't afford for users to see the max capacity message, so I've disabled the Limited capacity Events plugin.

    Yes, the events require payments and also members can book for free.

    This came from a change in the plugin, if you have your times in the event like 20:00 and 22:00 remove the : and just have 2000 and 2200 the update button then becomes active. We made the same change to our events system here as well. :slight_smile:

    I did that and the separating colon reappears after updating the page.

    Pete

  • Saurabh

    Hi Pete,

    Hope you are well today!

    I have checked this and it is definitely a bug. While we fix the plugin and update it, please locate this code plugins/events-and-bookings/lib/plugins/eab-events-limit_capacity.php, at about line 323:

    function validate_attending_submission( $event_id, $user_id, $booking_action ) {
    	if ( isset( $_POST['action_yes'] ) ) {
    		$capacity = (int) get_post_meta( $event_id, 'eab_capacity', true );
    		$total    = $this->_get_event_total_attendance( $event_id );
    
    		if ( $total >= $capacity ) {
    			//reach the limit
    
    			wp_redirect( '?eab_error_msg=' . urlencode( __( 'Sorry, the event has reached it\'s max capacity!!', Eab_EventsHub::TEXT_DOMAIN ) ) );
    			exit;
    		}
    	}
    }

    Change it as follows:

    function validate_attending_submission( $event_id, $user_id, $booking_action ) {
    	if ( isset( $_POST['action_yes'] ) ) {
    		$capacity = (int) get_post_meta( $event_id, 'eab_capacity', true );
    		$total    = $this->_get_event_total_attendance( $event_id );
    
    		if ( $total >= $capacity && $capacity>0 ) {
    			//reach the limit
    
    			wp_redirect( '?eab_error_msg=' . urlencode( __( 'Sorry, the event has reached it\'s max capacity!!', Eab_EventsHub::TEXT_DOMAIN ) ) );
    			exit;
    		}
    	}
    }

    I have tested it and after this fix, the unlimited setting will work just fine. Unless you are changing the error message, you are covered even after the next update. (I can't guarantee the removal of the extra exclamation, but the it's is definitely changing to its!)

    Other than that, the Update button getting disabled is a bug that I could replicate, as well. We'll be looking into that, as well.

    Do let me know how the fix works for you.

    Best

    Saurabh