Attendee Lists missing after upgrade

Home Forums Calendar Products Events Calendar PRO Attendee Lists missing after upgrade

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1516324
    Craig
    Participant

    Hi,

    I’ve just upgraded to the newest version of all TEC plugins. When I did, the “Attendees” list shows up blank. The “Orders” list still works. The attendee list I’m talking about uses these parameters: post_type=tribe_events&page=tickets-attendees&event_id=XXXX

    You’ll notice in my system config that I don’t have the latest version of Woocommerce. I’ve actually rolled back the site to a backup before I upgraded both TEC products and Woocommerce. I then upgraded only the TEC products, and that’s when the Attendee list issue becomes apparent.

    I’d rather not roll back to a previous version if a hotfix is coming soon…

    Thanks,
    Craig

    #1517320
    Victor
    Keymaster

    Hi Craig!

    Thanks for getting in touch with us. I’m sorry to hear you are having that error.

    We are not aware of any issues that would cause the attendees list to show up blank. Let me help you with the troubleshooting to see if we can find the source of the problem.

    First, could you please enable WP_DEBUG and WP_DEBUG_LOG ? This will create a debug.log file inside the /wp-content directory.

    After that, try reproducing the issue a few times, so that in case there is an error, it will be saved into the debug.log file. Please share that log file with us so we can see if any problem from there.

    We always suggest to setup a dev/staging site where you can test things out and make all plugins, theme and WordPress core updates without disrupting the live site.

    Please let me know how that goes.

    Thanks,
    Victor

    #1517374
    Craig
    Participant

    Hi Victor,

    I have a staging site setup for this with all debug information recording. Just now I…
    1. Reverted to an earlier version of the site.
    2. Changed the theme to 2017.
    3. Disabled all plugins except for TEC, TEC Plus, Event Tickets, Event Tickets Pro, and Woocommerce.
    4. Upgraded TEC. Everything was fine after this.
    5. Upgraded Event Tickets (the free version). This is when I lose the information for attendees.

    The version I’m upgrading from for Event Tickets is 4.6.2. The upgrade version is 4.7.2.

    There are no PHP errors reporting for this (or anything else).

    I will send you 2 images privately in order to show the difference after upgrading Event Tickets.

    It also makes no difference to continue the upgrade process to include TEC Plus and Event Tickets Pro.

    Thanks,
    Craig

    #1517377
    Craig
    Participant

    This reply is private.

    • This reply was modified 6 years ago by Craig.
    #1517760
    Victor
    Keymaster

    Hi Craig!

    Thanks so much for performing those tests and for the detailed explanation.

    I tried to reproduce the same issue on my own local installation (creating events with Event Tickets 4.6.2 then upgrading to latest version), but I’m not able to.

    If you make some test purchases for that event now using Event Tickets 4.7.2, does it show up in the attendees list?

    Does having Event Tickets and Event Tickets Plus both to version 4.7.2 make any difference?

    Also, what happens if you create a new test event with a ticket in it using Event Tickets 4.7.2 and make some

    Please let me know about that.

    Thanks,
    Victor

    #1517807
    Craig
    Participant

    Hi Victor,

    Before I run those tests, could you point me to a variable I can var_dump out of the template on the page so I can see what’s being printed to the screen? I think it will make this go faster. I could likely go in and find it myself, but if you give me a head start, it would help save me a couple hours of digging.

    Once I have that, I can run it before and after the update.

    Ideally, I’m looking for the place to output the following:

    <?php
    echo '<pre>';
    var_dump($someVariable);
    echo '</pre>';
    ?>

    Thanks,
    Craig

    #1518275
    Victor
    Keymaster

    Hi Craig!

    The attendees.php template file is located at /wp-content/plugins/event-tickets/src/admin-views/ You can debug tribe( ‘tickets.attendees’ )->attendees_table

    I noticed that you are using WP Engine. Before doing the tests I mentioned, could you please see if you have Object cache activated on WP Engine? If so, please try deactivating it and see if any difference.

    Thanks,
    Victor

    #1518927
    Craig
    Participant

    Hi Victor,

    Thanks for this. I’ll be taking a look through it this morning. I have disabled the WP Object Cache. That was a conversation about another bug we had that Attendee details weren’t saving with it turned on.

    I’ll let you know how the debugging goes. Can you please leave this open for a bit until we can figure it out?

    Thanks,
    Craig

    #1519054
    Craig
    Participant

    Hi Victor,

    I found the offending function this morning. Within /event-tickets/src/Tribe/Tickets.php, the function get_event_attendees has changed.

    When I replaced the new function with the one from version 4.6.2, the Attendees show up again.

    Here’s the old one for reference:

    public static function get_event_attendees( $post_id ) {
    			$attendees_from_cache = false;
    			$attendees            = array();
    
    			if ( ! is_admin() ) {
    				$post_transient = Tribe__Post_Transient::instance();
    
    				$attendees_from_cache = $post_transient->get( $post_id, self::ATTENDEES_CACHE );
    
    				// if there is a valid transient, we'll use the value from that and note
    				// that we have fetched from cache
    				if ( false !== $attendees_from_cache ) {
    					$attendees            = empty( $attendees_from_cache ) ? array() : $attendees_from_cache;
    					$attendees_from_cache = true;
    				}
    			}
    
    			// if we haven't grabbed attendees from cache, then attempt to fetch attendees
    			if ( false === $attendees_from_cache && empty( $attendees ) ) {
    				foreach ( self::modules() as $class => $module ) {
    					$obj       = call_user_func( array( $class, 'get_instance' ) );
    					$attendees = array_merge( $attendees, $obj->get_attendees_by_post_id( $post_id ) );
    				}
    
    				// Set the <code>ticket_exists</code> flag on attendees if the ticket they are associated with
    				// does not exist.
    				foreach ( $attendees as &$attendee ) {
    					$attendee['ticket_exists'] = ! empty( $attendee['product_id'] ) && get_post( $attendee['product_id'] );
    				}
    
    				if ( ! is_admin() ) {
    					$expire = apply_filters( 'tribe_tickets_attendees_expire', HOUR_IN_SECONDS );
    					$post_transient->set( $post_id, self::ATTENDEES_CACHE, $attendees, $expire );
    				}
    			}
    
    			/**
    			 * Filters the return data for event attendees.
    			 *
    			 * @since 4.4
    			 *
    			 * @param array $attendees Array of event attendees.
    			 * @param int $post_id ID of parent "event" post
    			 */
    			return apply_filters( 'tribe_tickets_event_attendees', $attendees, $post_id );
    		}

    I can’t tell for sure what is happening that it won’t work on WPEngine, so maybe you can take it from here?

    #1519660
    Victor
    Keymaster

    Hi Craig!

    Thanks for testing that out and for coming back with your findings.

    Could you please let me know if switching back to Event Tickets version 4.7.2 shows the attendees list?

    If it doesn’t, please try pasting the following snippet into your theme’s functions.php file and see if any changes:

    add_filter( 'tribe_tickets_attendees_admin_expire', 'custom_tickets_attendees_expire' );
    add_filter( 'tribe_tickets_attendees_expire', 'custom_tickets_attendees_expire' );
    
    function custom_tickets_attendees_expire () {
        return 0;
    }

    Please let me know about it.

    Thanks,
    Victor

    #1520123
    Craig
    Participant

    Hi Victor,

    I’m not sure what you mean by switching back to 4.7.2. The only way I was able to get that version working was by replacing the get_event_attendees function with the old one from 4.6.2. As soon as I revert to the original tickets.php file, the attendees go missing again.

    I did add the code you provided to the 4.7.2 version (with the original tickets.php file) and the attendees do show up again. Of course, I’d rather not have that workaround lurking around when things are updated.

    Can you please advise on how this will be handled by your team? Will it be a reported bug for instance?

    Thanks for your help.

    Thanks,
    Craig

    #1520779
    Victor
    Keymaster

    Hi Craig!

    Thanks for your help and patience so far!

    The tests you made are exactly what I needed you to test to confirm this is related to how the attendees are being cached somehow, as I’m not able to reproduce the issue on my end.

    I reached out to the team and we’ve had some other users reporting similar issues so we have logged a bug report for this so it can be addressed in one of our next maintenance releases of our plugins.

    I will set this thread’s status as pending fix and link it to the report. This way, we will notify you once a fix is released.

    In the meantime, you can use the code snippet I provided as a workaround.

    We apologize for the inconvenience and we appreciate your patience while we work on this.

    Best,
    Victor

    #1603511
    Victor
    Keymaster

    Hi Craig!

    Just wanted to share with you that a new release of our plugins is out, in which we are no longer able to reproduce the issue described here. This means that it may have been fixed before while working on other fixes/improvements.

    You can find out more about this release → https://theeventscalendar.com/release-event-tickets-4-8-event-tickets-plus-4-8/

    Please update the plugins and let us know if it works for you.

    Best,
    Victor

    #1620975
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Attendee Lists missing after upgrade’ is closed to new replies.