Help Desk

Featured Event In Calendar List View Formatting Off

  • Posts: 36 Topics: 8
    | Permalink

    For whatever reason, the default featured event formatting in the calendar list view is no longer being produced — please see screenshot.

    The strange thing is that featured events are being correctly output on my dev site (https://dev.cfany.org/events/category/cfa-society-ny-event/)—which is a static copy of the production site minus about a week—so with the exception of a few plugin updates, everything else should be identical. Still, I have tried disabling plugins and still haven’t been able to identify the culprit.

    There don’t seem to be any console errors according to the Chrome inspector tool, and I can’t pinpoint what it is causing the calendar not to apply the correct formatting for a featured event.

    Any ideas? Please let me know if there is any additional information I can provide in assistance.

    Posts: 36 Topics: 8
    | Permalink

    Sorry, just to be clear, the dev site is not static. It is a fully functional snapshot -— no more than about a week old — of the live production site.

    Posts: 144
    | Permalink

    Hey Steven!

    Thanks for reaching out, I take a look at both sites and seems like some styling are missing on the production site, would you mind disable the cache plugins on your dev site as it seems is caching the CSS as an inline style and is hard to debug if styles are coming correctly so we can take another look.

    We also have a conflict guide that might be helpful for you as well to try few things to see what’s going on in the meantime.

    Let me know once you disabled the cache plugin so I can take another look to your dev site.

    Thanks.
    Crisoforo

    Posts: 36 Topics: 8
    | Permalink

    Thanks Crisoforo!

    I have disabled the caching plugins on both the dev site and the production site.

    In terms of site performance sans caching plugin, hopefully this is something we can diagnose fairly quickly, though I certainly understand you likely have a ton of other matters to attend to as well. Please let me know if there’s anything I can do to help.

    Posts: 144
    | Permalink

    Thanks for this.

    I reviewed both sites and seems the production is producing the output of the featured events as a regular events. I suggest to follow the conflict guide, as it seems to be a problem with some of the hooks or templates being used on the production theme.

    Jus another set of questions:

    1. Both environments has same configurations on themes?
    2. Both environments are using same hooks?
    3. Can you sync your dev environment from your production environment to see if we can replicate this on dev site as well.

    Keep me posted about this so we can find the root cause of this issue.

    Thanks
    Crisoforo.

    Posts: 36 Topics: 8
    | Permalink

    Very much appreciated, Crisoforo.

    I was able to identify what triggered the styling issue, but I am not sure how to address the issue and/or resolve it.

    I turns out that I had not yet applied the Avada Theme patches on the dev site (see screenshots).

    Once I went ahead and applied Avada Patch #416070, I was able to reproduce the problem on the dev site as well. The patch description is the following:

    Avada Patch #416070
    Dec. 22, 2017
    Avada
    Fixes styling issues with featured events when using The Events Calendar plugin.

    My first instinct would be to seek the help of the Avada support team, but unfortunately our current license was purchased by a developer whom we no longer have any sort of working relationship with. For that reason, my account does not have Support access, but maybe since this patch was specifically designed for The Events Calendar you can continue to assist?

    Any ideas? To your knowledge, is there any way to remove a patch? Perhaps there’s a better option?

    Posts: 36 Topics: 8
    | Permalink
    This reply has been marked as private.
    Posts: 36 Topics: 8
    | Permalink

    Sorry, forgot the file / file path screenshot (if it’s any help) in my private reply. Here it is.

    Posts: 144
    | Permalink

    Hey!

    That’s fantastic to know that you found the problem for this one however I’m not familiar with that theme but seems like you can download the manual patches from here, (I’m not really sure if that’s the correct theme), but all premium themes has a similar behavior, what you can do in this case is basically download a version before the patch 416070 was applied and use that instead.

    You can communicate of this issue to the theme developers as well as I’m sure they should be able to fix this problem on next release of the theme, in the meantime you can just rollback and download the patch 416063, from Dec 19.

    Please let me know if you have any other questions or if there is anything else I can do for you.

    Best
    Crisoforo

    Posts: 36 Topics: 8
    | Permalink

    Thanks, but unfortunately I do not have access to their support because the license was purchased by a developer, under his email address, and we know longer have a working relationship with that developer.

    Can anybody identify the problem code within the patch files I sent so that I may address it that way? I imagine the fix is very simple if we can identify the hook causing the events list to treat featured events like non-featured events.

    Posts: 144
    | Permalink

    I understand the problem you are facing however those files are not enough to find a cause to your problem, would you mind sending over your full theme in a zip instead so we can see if there is anything related with the plugin.

    As this seems to be a problem with the theme itself it might be a good idea to open a ticket there as well as even if we fix it you are going to lose any changes with following updates as the problem is on the theme as well.

    But for now we can take a look at the theme to see if we can find the root cause.

    Thanks a lot and let me know if you have any other questions.

    Thanks,
    Crisoforo

    Posts: 36 Topics: 8
    | Permalink

    Hi Crisoforo, thank you very much for the quick response!

    I am unable to submit a support ticket, because I do not have access to their support. Since this patch was designed specifically for The Events Calendar, couldn’t you bring it to their attention as a team?

    I will follow up with a private message that includes the theme zip files.

    Posts: 36 Topics: 8
    | Permalink
    This reply has been marked as private.
    Posts: 144
    | Permalink
    Correct Answer

    Hey thanks for the file I did a debug on the theme and there is hook that changes the appearance of the events. there were a couple of things:

    1. The patch is now using the same layout as single-events for featured events.
    2. Seems like new styles were applied on this new patch.

    However as we don’t have access either to the theme we can’t download previous version of the theme to compare the changes between versions.

    But in order to give you a solution, we suggest that yo remove the content from the file:

    single-featured.php
    

    And replace it with this one:

    <?php
    /**
    * List View Single Featured Event
    * This file contains one featured event in the list view
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-featured.php
    *
    * @version 4.6.3
    *
    */
    if ( ! defined( 'ABSPATH' ) ) {
    die( '-1' );
    }
    
    // Setup an array of venue details for use later in the template
    $venue_details = tribe_get_venue_details();
    
    // Venue
    $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
    
    // Organizer
    $organizer = tribe_get_organizer();
    
    echo tribe_event_featured_image( null, 'large' );
    ?>
    
    <!-- Event Title -->
    <?php do_action( 'tribe_events_before_the_event_title' ) ?>
    <h2 class="tribe-events-list-event-title">
    <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark">
    <?php the_title() ?>
    </a>
    </h2>
    <?php do_action( 'tribe_events_after_the_event_title' ) ?>
    
    <!-- Event Meta -->
    <?php do_action( 'tribe_events_before_the_meta' ) ?>
    <div class="tribe-events-event-meta">
    <div class="author <?php echo esc_attr( $has_venue_address ); ?>">
    
    <!-- Schedule & Recurrence Details -->
    <div class="tribe-event-schedule-details">
    <?php echo tribe_events_event_schedule_details() ?>
    </div>
    
    <?php if ( $venue_details ) : ?>
    <!-- Venue Display Info -->
    <div class="tribe-events-venue-details">
    <?php echo implode( ', ', $venue_details ); ?>
    <?php
    if ( tribe_show_google_map_link() ) {
    echo tribe_get_map_link_html();
    }
    ?>
    </div> <!-- .tribe-events-venue-details -->
    <?php endif; ?>
    
    </div>
    </div><!-- .tribe-events-event-meta -->
    <?php do_action( 'tribe_events_after_the_meta' ) ?>
    
    <!-- Event Cost -->
    <?php if ( tribe_get_cost() ) : ?>
    <div class="tribe-events-event-cost featured-event">
    <span class="ticket-cost"><?php echo esc_html( tribe_get_cost( null, true ) ); ?></span>
    <?php
    /** This action is documented in the-events-calendar/src/views/list/single-event.php */
    do_action( 'tribe_events_inside_cost' )
    ?>
    </div>
    <?php endif; ?>
    
    <!-- Event Content -->
    <?php do_action( 'tribe_events_before_the_content' ) ?>
    <div class="tribe-events-list-event-description tribe-events-content">
    <?php echo tribe_events_get_the_excerpt( null, wp_kses_allowed_html( 'post' ) ); ?>
    <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?> &raquo;</a>
    </div><!-- .tribe-events-list-event-description -->
    <?php
    do_action( 'tribe_events_after_the_content' );
    

    From there you can edit this file and change styles accordingly in this way next patches are not going to affect this.

    We have a Themer’s guide that provides more details about how this process works but if you have additional questions just let me know.

    Thanks,
    Crisoforo

    Posts: 36 Topics: 8
    | Permalink

    I can’t thank you enough for the help. All fixed!

    Posts: 144
    | Permalink

    I’m really happy that we finally find a solution for your problem and please feel free to reach out again in the future if you face any other problem as always we are here to help you.

    Have good evening and a great weekend.

    Thanks,
    Crisoforo

    | Permalink

The topic ‘Featured Event In Calendar List View Formatting Off’ is closed to new replies.