Forum Replies Created
-
AuthorPosts
-
popuppaintingParticipant
Hi Bradley,
I haven’t got any help from Modern Tribe with this for a month now, so I have looked into the code and found a workaround.
See https://theeventscalendar.com/support/forums/topic/event-ticket-iframe-often-doesnt-appear/
I hope it works for you!
All the best
Pete
popuppaintingParticipantSorry, that last bit didn’t format correctly – hopefully this will?!?
<!-- Temporary button to link to Eventbrite event --> <?php $website = tribe_get_event_website_url(); error_log("website=".$website); if ( ! empty( $website ) ): ?> <div id="launch-button" style="text-align:center"> <a href="<?php echo esc_url( $website ).'#tickets'; ?>" style="background-color:#ff0066; color:#fff; display:block; font-weight:600; box-sizing:border-box; padding:11px 20px; border-radius:3px; margin-bottom:40px;"> <?php _e( 'Buy tickets on Eventbrite', 'tokopress' ); ?> </a> </div> <?php endif ?>
<!– End of temporary button to link to Eventbrite event –>
popuppaintingParticipantHaving gone for a month without any help from Modern Tribe on this issue, I have just spent several hours wading through code to find at least a temporary fix.
For others with this problem, the simple fix is to remove a line of code.
1) find /wp-content/plugins/the-events-calendar-eventbrite-tickets/src/Tribe/Template.php
2) remove the line “$api->is_live( $post_id ) &&” (about line 89), save and upload
3) the start of the “if” statement should now look like this;if (
! empty( $event_id ) &&
( isset( $event->listed ) && $event->listed ) &&
tribe_event_show_tickets( $post_id, $event )
) {It looks like the error is caused by a check to see whether the event is live on Eventbrite in /wp-content/plugins/the-events-calendar-eventbrite-tickets/src/Tribe/Event.php (the guilty function starts on line 108). I haven’t bothered to spend time looking at it in any other detail, because if the event isn’t live on Eventbrite, it won’t appear on the website anyway.
A proper fix would be helpful, obviously.
If that doesn’t work for anyone, then another workaround is to include a button that links to the event ticket sales on Eventbrite. This will obviously vary depending on your theme, but I added this in /wp-content/themes/my-theme/tribe-events/single-event.php just after <?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?> and just before <!– Event footer –>. The code I used was (obviously change the styling to suit!);
<!– Temporary button to link to Eventbrite event –>
<?php $website = tribe_get_event_website_url();
error_log(“website=”.$website);
if ( ! empty( $website ) ):
?>
<div id=”temp-event-button” style=”text-align:center”>
” style=”background-color:#ff0066; color:#fff; display:block; font-weight:600; box-sizing:border-box; padding:11px 20px; border-radius:3px; margin-bottom:40px;”><?php _e( ‘Buy tickets on Eventbrite’, ‘tokopress’ ); ?>
</div>
<?php endif ?>
<!– End of temporary button to link to Eventbrite event –>popuppaintingParticipantJust had another look – out of 10 refreshes, the iframe appeared twice. Nothing of note in the debug.log. This really is a critical problem – our customers cannot buy. When will we see if a fix?
popuppaintingParticipantHi, is there any update on this please? It has been over a month now, and we are suffering long periods where the iframe doesn’t show, so we are missing out on sales because our customers cannot see any way to buy.
Is there a fix, or a temporary work around we can use?
popuppaintingParticipantNo Rich, no further progress at the moment – like you we have customers unable to purchase.
popuppaintingParticipantI have just deleted the transients again, but the problem is still intermittent.
popuppaintingParticipantThis reply is private.
popuppaintingParticipantThanks. I have done that and I will keep an eye on it over the next couple of days. Would the situation you describe be likely if, within a 2 minute period, you get the ticket iframe displaying every other time? If it is that, what will stop the problem happening again?
popuppaintingParticipantThis reply is private.
-
AuthorPosts