Issues with The Events Calendar Tickets Plus

Hello,

We use TheEventsCalendar.com plugin along with their paid plugin Events Tickets Plus.

Their plugin has a conflict with X Theme that causes the checkout process to break. They built in a workaround which has worked fine for the past couple of years and now no longer works. Their support sent me a lengthy response. While I think they should contact you directly to sort out the bug, I am not the middle man…

Please look through their response and sample code from another theme that resolved the issue. Hopefully this will make sense and could possibly be an easy fix in the functions file.

Thanks,

Micah

From: support@theeventscalendar.com support@theeventscalendar.com
Sent: Tuesday, February 4, 2020 9:57 AM
To: ************
Subject: Re: Ticket Checkout Process is broken again - [DVZ-FMGQI-575]

Hi there,

Thanks for reaching out. I’d be happy to help with your question.

I believe what you are experiencing is related to an open bug ticket that we have. For some reason, when assigning a custom page for the attendee registration, things are not working properly. While it uses the “slug” for the page you created, it is still loading as if the default attendee registration.

The X theme is amongst the themes that don’t play nice with our default attendee registration template, due to how they handle archives and excerpts. The custom page option was added to give people using themes like this a workaround. Unfortunately, due to the current bug, the workaround is not functioning.

Another theme that behaves this way is Genesis. We have some information and a snippet for Genesis based themes, and the basic information might also apply with X-theme. https://theeventscalendar.com/knowledgebase/k/genesis-framework-and-attendee-registration/

I would look to see if your theme provides similar settings, or has similar hooks/filters available. If so, you should be able to get the template to display correctly using the default attendee registration page.

In any case, I am attaching this support thread to the bug ticket, and we will follow up with you here as soon as we have news about this.

Regards,
Sky

// Fix for the attendee registration page glitch with Genesis
add_action( 'genesis_before_loop', 'tribe_tickets_fix_etp_attendee_registration_page_for_genesis' );
function tribe_tickets_fix_etp_attendee_registration_page_for_genesis() {
if ( ! function_exists( 'tribe' ) ) {
return;
}
try {
if ( tribe( 'tickets.attendee_registration' )->is_on_page() ) {
remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
add_action( 'genesis_entry_content', 'do_post_content' );
}
} catch ( Exception $e ) {}
}
function do_post_content() {
the_content();
}

The Events Calendar fix for Genesis Framework

Hey Micah,

Thanks for the plugin support beforehand in order to provide us with some context. However, the plugin developer needs to investigate this issue on your site (preferably a staging copy of your site) as this is a problem with their plugin and not with themes.

We’re also not familiar with the Genesis Framework so not sure if we have the same hooks as them. This again is why the plugin developer must look at our theme’s structure because they’re the only ones who are familiar with their plugin and where to insert certain codes.

Thank you for understanding.

Thanks for the reply Christian.

I do concur with you that it’s on them to address the bug. Now that I’ve done my due diligence to contact X Theme, I will put the ball back in their court.

Micah

I got a message back from Events Calendar which is pasted below. I am checking to see if you had any additional input.

Thanks,

Micah

Sky
today 10:26 (1 hour ago)

Hi again,

The general theme compatibility issue happens because the theme is using excerpts instead of “the_content” in the loop for all archive pages. If the theme doesn’t have a setting for this, or a filter to allow changing this, there’s not much we can do about it from our end. Hence why we added the alternate method to work around this.

Plugins cannot easily override theme templates. If the issue is baked into the theme’s archive template, you would need to create an alternate archive template specific to the “tribe_events” post type.

If the theme is doing this with a filter, you would need to override the filter and check the post type before returning the result. We don’t know how each theme filters this, the filter name and priority, etc.

Likely, somewhere they are using logic that checks for “is_archive” to determine whether to output “the_content” vs “the_excerpt”.

I would ask the X theme folks in more simple terms, “how to control whether archive pages show content vs excerpts”. If you can change it to show the full content, the default attendee registration page should work correctly.

Let me know if that helps.

Best,
Sky

Hello Micah,

If you want to display the full post contents on the archive pages so that other plugin can display custom post type contents as well, assuming you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// VIEWS/GLOBAL/_CONTENT.PHP
// -----------------------------------------------------------------------------
// Display of the_excerpt() or the_content() for various entries.
// =============================================================================

$stack                     = x_get_stack();
$is_full_post_content_blog = is_home() && x_get_option( 'x_blog_enable_full_post_content' ) == '1';

?>

<?php

if ( is_archive() || is_singular() || $is_full_post_content_blog ) :
  x_get_view( 'global', '_content', 'the-content' );
  if ( $stack == 'renew' ) :
    x_get_view( 'renew', '_content', 'post-footer' );
  endif;
else :
  x_get_view( 'global', '_content', 'the-excerpt' );
endif;

?>

3] Save the file named as _content.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/views/global/

You will have to create the folder path because it does not exist in the child theme yet.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.