• Resolved mo1985

    (@mo1985)


    Hi,

    I cannot delete RSVP attendees in the free version of Event Tickets. This worked before. It also fails for a brand-new test RSVP, so it is not related to old data.

    What happens:

    • Tickets > Attendees: I click “Delete” on an attendee (or use the bulk action “Delete” > Apply).
    • A confirmation appears, the page reloads, the attendee is still listed, and the available-spots counter is unchanged.
    • Request: GET /wp-admin/admin.php?page=tec-tickets-attendees&action=delete_attendee&nonce=...&attendee=<ID>|Tribe__Tickets__RSVP
    • Response: HTTP 200, no redirect. The body is the normal attendee list including the attendee, and no admin notice.

    What I checked:

    • Troubleshooting mode (Health Check) with Twenty Twenty-One and only The Events Calendar + Event Tickets active: same result.
    • Child theme disabled: no difference.
    • Cache plugins (WP Fastest Cache, Autoptimize) disabled: no difference.
    • Firewall log (NinjaFirewall) shows no blocked request.
    • debug.log (WP_DEBUG_LOG on): only PHP Deprecated: Implicitly marking parameter ... as nullable notices from event-tickets/common/vendor (PHP 8.4, same as the topic “PHP 8.4 issue”). No warnings or fatal errors.
    • Bulk delete behaves the same as the single link.
    • All plugins are up to date.
    • I searched the forum and found no matching topic.

    Environment:

    • WordPress 7.1.3, PHP 8.4.24-nmm1
    • The Events Calendar 6.18.0, Event Tickets 5.30.0.2
    • Site is a staging/dev site, not live.

    Is there a known issue, capability check or filter that could stop the deletion silently? Happy to test further or provide more logs.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Darian

    (@d0153)

    Hi @mo1985

    Thank you for the detailed report. It made this quick to reproduce.

    This is a bug in Event Tickets 5.30.0, still present in 5.30.0.2, and nothing on your site is causing it. I set up a clean install with WordPress 7.1.3, PHP 8.4, The Events Calendar 6.18.0 and Event Tickets 5.30.0.2, and nothing else, and got the same result: the same request, a 200 response, the attendee still listed, and the capacity unchanged. On 5.29.5.2 the same steps delete the attendee as expected.

    Two things you can rule out

    • The 200 response with no redirect is normal on Tickets → Attendees, including on 5.29. The page has already begun sending output by the time the delete runs. The only real symptom is the attendee remaining.
    • The PHP 8.4 “Implicitly marking parameter … as nullable” notices are unrelated to this.

    Workaround until a fix is released

    Add this with the Code Snippets plugin, where “Only run in administration area” is sufficient, or as a small mu-plugin. It deletes the RSVP attendee the way 5.29 did, and the spot returns to the RSVP’s capacity:

    add_action(
    	'event_tickets_attendee_ticket_deleted',
    	static function ( $event_id, $attendee_id ) {
    		$attendee_id = (int) $attendee_id;
    
    		if ( ! $attendee_id || ! class_exists( 'Tribe__Tickets__RSVP' ) ) {
    			return;
    		}
    
    		if ( Tribe__Tickets__RSVP::ATTENDEE_OBJECT !== get_post_type( $attendee_id ) ) {
    			return;
    		}
    
    		if ( empty( $event_id ) ) {
    			$event_id = get_post_meta( $attendee_id, Tribe__Tickets__RSVP::ATTENDEE_EVENT_KEY, true );
    		}
    
    		$event_id = (int) $event_id;
    
    		if ( ! $event_id || ! tribe( 'tickets.attendees' )->user_can_manage_attendees( 0, $event_id ) ) {
    			return;
    		}
    
    		$product_id = get_post_meta( $attendee_id, Tribe__Tickets__RSVP::ATTENDEE_PRODUCT_KEY, true );
    
    		if ( ! wp_delete_post( $attendee_id, true ) ) {
    			return;
    		}
    
    		Tribe__Tickets__Attendance::instance( $event_id )->increment_deleted_attendees_count();
    		Tribe__Post_Transient::instance()->delete( $event_id, Tribe__Tickets__Tickets::ATTENDEES_CACHE );
    
    		do_action( 'tickets_rsvp_ticket_deleted', $attendee_id, $event_id, $product_id );
    	},
    	10,
    	2
    );

    It runs only for RSVP attendees and keeps the same permission check, so it doesn’t affect Tickets Commerce attendees or deleting the RSVP itself. I tested it on 5.30.0.2 using the row link and the bulk action, on both the event’s attendee list and Tickets → Attendees, and with RSVPs created before and after the update.

    Since it permanently deletes attendee records, please take a backup before running it on live data.

    On rolling back

    Reverting to 5.29.5.2 also resolves it, but I’d suggest staying on 5.30.0.2 with the snippet instead, as 5.30.0.2 contains security fixes.

    As always, please test this first on a staging site.

    Please let me know how it goes.

    —
    Internal Bug Ticket Reference: SMTNC-3050

    Thread Starter mo1985

    (@mo1985)

    @d0153

    Hey Darian,

    Hi,

    thank you so much for the quick reproduction and for the workaround. It’s a relief to know the problem wasn’t caused by my site.

    I tested the snippet on my staging site (WordPress 7.1.3, PHP 8.4, The Events Calendar 6.18.0, Event Tickets 5.30.0.2), added to the functions.php of my child theme. It worked as described: the RSVP attendees were deleted and [the available spots went back to the RSVP’s capacity / the attendee counter updated correctly]. I tested [the row link and the bulk action / the row link] on [the event’s attendee list and on Tickets → Attendees].

    Thanks also for the advice to stay on 5.30.0.2 because of the security fixes and to back up before running it on live data. I’ll keep the snippet in my documentation and remove it as soon as a fixed version is released.

    One honest note: I’m a web designer, not a developer, and an AI assistant helped me with my first tests and with checking the code before I used it. It’s wonderful how much that has sped up finding a solution, and your clear reproduction steps and the ready-made workaround made it possible.

    Thanks again for your help!

    Monique

    Plugin Support Darian

    (@d0153)

    Hi @mo1985,

    Good to hear the workaround is holding for now. I’ll post here once the permanent fix is released.

    If you have a minute in the meantime, we’d really appreciate a review. It helps other users find the plugin and know what to expect:
    https://wordpress.org/support/plugin/event-tickets/reviews/

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.