• Resolved MasonN

    (@masonn)


    Something changed on my server that is leading to Event->Attendees returning the same results regardless of query for 60 seconds, and I’ve been unable to track it down, but I think it might have exposed a bug.

    In /src/Tribe/Attendess_Table.php starting at line 1049, it reads:

        $args = [
    'page' => $current_page,
    'per_page' => $per_page,
    'return_total_found' => true,
    'order' => 'DESC',
    ];

    $event_id = Event::filter_event_id( filter_var( tribe_get_request_var( 'event_id' ), FILTER_VALIDATE_INT ), 'attendees-table' );
    $search = sanitize_text_field( tribe_get_request_var( $this->search_box_input_name ) );

    if ( empty( $event_id ) ) {
    $event_id = 0;
    }

    /** @var Tribe__Cache $cache */
    $cache = tribe( 'cache' );
    $cache_key = __METHOD__ . '-' . md5( wp_json_encode( $args ) . $event_id );
    $cached = $cache->get( $cache_key );

    if ( $cached ) {
    $this->items = $cached;
    return $cached;
    }

    Shouldn’t $cache_key include $search? I’m not sure why this only just started happening for me at the end of August (I’m suspecting something changed on the host), but shouldn’t:
    $cache_key = __METHOD__ . ‘-‘ . md5( wp_json_encode( $args ) . $event_id );
    read something like:
    $cache_key = __METHOD__ . ‘-‘ . md5( wp_json_encode( $args ) . $event_id . $search );
    ?

    Sorry if I’m wrong here.

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

    (@d0153)

    Hi @masonn

    Thanks for reaching out. Let me help you with this one.

    Could you please check if you recently enabled an Object Cache on your server or plugins? If so, this might be causing the issue. Please try to disable them temporarily and see if that makes a difference.

    Let me know how it goes.

    Thread Starter MasonN

    (@masonn)

    The change in behavior was in my head, this issue isn’t new after all, sorry for that. I was confusing one part of the dashboard with another.

    While trying to understand why the attendees list wasn’t refreshing when searching I did disable every cache I had access to but the behavior persisted. I can see in your code that a 60 second cache is created using $args as the key, as of 5.8.4 ( $cache->set( $cache_key, $items, 60 ); ). But the only thing that changes in $args might be the $current_page since $search is not included in $args.

    It looks to me that either $search should be appended to $cache_key, or the cache should be either non-persistent or much shorter than 60 seconds, but if you are able to go to:

    /wp-admin/edit.php?post_type=tribe_events&page=tickets-attendees&event_id={event_id}

    and search by Purchaser Name, or any other option, in less than 60 seconds, then I guess you can close this issue, but it looks like a bug to me. I also notice that sorting on the Ticket column doesn’t work, but that seems unrelated to this issue.

    Plugin Support Darian

    (@d0153)

    Hi @masonn

    Upon further checking, it seems we have an existing internal ticket [ET-2218] that will address this issue and I’ve included your specific use case in it to communicate it to our team.

    We prioritize bugs by taking into consideration the number of users impacted as well as how the bug impacts one’s ability to run an event/sell tickets. I don’t have a specific timeline as to when this issue will be resolved, but trust that our team is aware. Our team communicates updates and bug fixes in our newsletter and via our changelog.

    I’m happy to help if any other questions are coming up around this topic, otherwise I’ll go ahead and close this ticket.

    Thanks again for reporting this issue and for using The Events Calendar! Have a great day.

    Internal Bug Ticket Reference: [ET-2218]

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.