Support » Plugin: The Events Calendar » Update 4.9.0.3 – Error 500 –

  • Resolved pansenschim

    (@pansenschim)


    Hello there!
    I recently tried to update Tribe Events to version 4.9.0.3. As a result the events and events details pages give me an error 500. This does not come as a surprise to me ans I did a lot of changes to the /list/single.php and /single.php templates.
    I think there might be one or two deprecated methods causing that error which might be easy to fix. My problem now: I have no clue which of those methods could cause the error.
    I was hoping to find someone who could check my template code and give me a hint?

    <?php
    /**
     * List View Single Event
     * This file contains one event in the list view
     *
     * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php
     *
     * @package TribeEventsCalendar
     *
     */
    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();
    	// Event Thumb
    	$event_thumbnail = tribe_event_featured_image(null, 'large');
    
    	//Time
    	//Globale Zeitgeschichten - Formate und so
    	$time_format = get_option( 'time_format', Tribe__Date_Utils::TIMEFORMAT );
    	$start_time = tribe_get_start_date( null, false, $time_format );
    
    	// custom fields 
    	$additional_fields = tribe_get_custom_fields();
    		//Preis an der Abendkasse 
    		$myabendkasse = $additional_fields['Abendkasse'];
    		$myermaessigt = $additional_fields['Reduziert'];
    		// PREISE	
    		// VVK Gebuehr inklusive bool
    		$myvvkbool = $additional_fields['VVK'];
    		$myVVK = $additional_fields['VVKpreis'];
    		$myKartenvorverkauf = $additional_fields['Vorverkauf'];
    		// Veranstaltungstyp
    		$mytyp = $additional_fields['Veranstaltungstyp'];
    		//Status und doors
    		$mystatus = $additional_fields['Status'];
    		$myeinlass = $additional_fields['Einlass'];
    	// strings zum Abgleich der Vernastaltungstypvaiablen 
    		$myKonzert = 'Konzert';
    		$myParty = 'Party';
    		$post_id = get_the_ID(); 
    		$venue = tribe_get_venue_id( $post_id );
    		$v1 = '8995'; //DOCKS
    		$v2 = '1444'; //Prinzenbar
    
    ?>
    
    <!-- Event Title -->
    <?php do_action( 'tribe_events_before_the_event_title' ) ?>
    <!--Datum -->
    <h2 class="tribe-events-list-event-title wb-event-col">
        <?php echo tribe_events_event_schedule_details() ?>
    	<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' ) ?>
    
    <div class="clearfix">
    
    	<!-- Event Image -->
    	<?php if (!empty($event_thumbnail)) { printf('<div class="fourth first-fourth my-tribe-events-event-image">%s</div>', wp_kses_post($event_thumbnail)); } ?>
    	
    
    	<div class="fourth wb-remoed my-event-list-details">
    		
    		<div class="tribe-event-schedule-details">
    		<!-- Event Status -->
    			<?php if (!empty ($mystatus) ) : ?>
    			<div class="tribe-events-event-cost my-status">
    			<h4 class="tribe-events-list-meta-title">Status:</h4>
    				<p><?php echo $mystatus ?></p>
    			</div>
    		<?php endif; ?>
    		
    		</div>
    
    		<div class="tribe-event-schedule-details">
    	
    		<div class="tribe-events-event-cost my-event-costs">
    		<h4 class="tribe-events-list-meta-title">Preis:</h4>
    		<!-- Event Cost -->
    		<ul>
    			<?php if ( $myVVK ) : ?>
    			<li>VVK: <?php echo $myVVK ?> &euro;
    			<!-- $myvvkbool $myVVK -->
    			<?php if ($myvvkbool == true) : ?>
    			inkl. VVK Geb.
    			<?php else : ?>
    			exkl. VVK Geb.
    			<?php endif; ?>
    			</li>
    			<?php endif; ?>		
    			<!-- $myvvkbool $myVVK -->
    		
    		<?php if ( $myabendkasse ) : ?>
    			<li>Abendkasse: <?php echo $myabendkasse ?> &euro;</li>
    			<?php endif; ?>
    			<?php if ( $myermaessigt ) : ?>
    			<li>Erm&auml;&szlig;igt: <?php echo $myermaessigt ?> &euro;</li>
    			<?php endif; ?>
    			</div>
    			</ul>
    		</div>
    		<div class="tribe-event-schedule-details">
    		<!-- Link zum Kartnevorverkauf -->
    			<?php if ( $myKartenvorverkauf ) : ?>	
    			
    			<div class="my-event-tickets">
    			<h4 class="tribe-events-list-meta-title my-price">
    			<a class="myVerkaufslink" target="_blank" title="Vorverkaufsstelle" rel="nofollow" href="<?php echo $myKartenvorverkauf ?>"> Tickets</a></h4>
    			</div>
    			<?php endif; ?>		
    		</div>
    		
    		<?php 
            // Einlass
            if (! empty ( $myeinlass ) )  : ?>
    		<?php if ($start_time != $myeinlass) :?>
    		<div class="tribe-event-schedule-details">
    			<h4 class="tribe-events-list-meta-title my-einlass">Einlass:</h4>
    		<!-- Event Einlass additional field -->
    			<div class="tribe-events-event-cost">
    			<p><?php echo $myeinlass ?> Uhr</p>
    		</div>
    			</div>
    		<?php endif; ?>
    		<?php endif; ?>
    		
    		<?php 
            if (! empty ( $start_time ) )  : ?>
    		<div class="tribe-event-schedule-details">
    			<h4 class="tribe-events-list-meta my-beginn">Beginn:</h4>
    		<!-- Event Einlass additional field -->
    			<div class="tribe-events-event-cost">
    			<p><?php echo $start_time ?> Uhr</p>
    		</div>
    			</div>
    		<?php endif; ?>
    
    		
    		<!-- DETAILS -->
    		<h4 class="tribe-events-list-meta-title tri-details"><?php esc_html_e('Details', 'loc_canon_venuex'); ?></h4>
    		
    		<!-- Schedule & Recurrence Details -->
    		<!-- Event Meta -->
    		<?php do_action( 'tribe_events_before_the_meta' ) ?>
    		<div class="tribe-events-event-meta clearfix">
    			<div class="author <?php echo esc_attr( $has_venue_address ); ?>">
    		
    				<!-- VENUE -->
    				<h4 class="tribe-events-list-meta-title tri-venue"><?php esc_html_e('Venue', 'loc_canon_venuex'); ?>:</h4>
    				<?php if ( $venue_details ) : ?>
    					<!-- Venue Display Info -->
    					<div class="tribe-events-venue-details">
    						<p><?php echo tribe_get_venue_link();?></p>
    					</div> <!-- .tribe-events-venue-details -->
    				<?php endif; ?>
    			</div>
    		</div><!-- .tribe-events-event-meta -->
            
           <!-- added by wb: categories -->
            <?php
    		echo tribe_get_event_categories(
    			get_the_id(), array(
    				'before'       => '',
    				'sep'          => ', ',
    				'after'        => '',
    				'label'        => 'Kategorie', // An appropriate plural/singular label will be provided
    				'label_before' => '<h4 class="tribe-events-list-meta-title tri-venue">',
    				'label_after'  => '</h4>',
    				'wrap_before'  => '<p><class="tribe-events-event-categories">',
    				'wrap_after'   => '</p>',
    			)
    		);
    		?>
            <!-- added by wb: categories -->
            <!-- added by wb: type -->
            <!-- Typangabe und Symbole-->
            <!-- Wenn typ Konzert und venue Prinzenbar oder wenn party und venue docks dann Icons-->
           	
    		<?php 
            // wenn Veranstaltungstyp nicht leer
            if (! empty ( $mytyp ) )  : ?>
                <h4 class="tribe-events-list-meta-title tri-venue my-typ">Veranstaltungstyp:</h4>
    			<!-- Wenn Konzert -->
                <?php if ( $mytyp == $myKonzert ) : ?> 
    				<?php if ( $venue == $v1 ) : ?> <!-- Wenn Konzert und Veranstaltungsort 1 -->
    					<p class="myTyp"><?php echo $mytyp ?>&nbsp;<img src="/wp-content/uploads/img/stern-white.png"/></p>
    		 		<?php endif?> <!--if v1 -->
    			
    				<?php if ( $venue == $v2 ) : ?> <!-- Wenn Konzert und Veranstaltungsort 2 -->
    					<p class="myTyp"><?php echo $mytyp ?>&nbsp;<img src="/wp-content/uploads/img/krone-white.png"/></p>
    		 		<?php endif?> <!--if v2 -->
            	<?php endif?> <!--if konzert -->
    				<?php if ( $mytyp != $myKonzert ) : ?> 
    					<p class="myTyp"><?php echo $mytyp ?>&nbsp;</p> <!-- Wenn kein Konzert -->
    				<?php endif?> <!--if field not empty-->
            <?php endif?> <!--if field not empty-->
    		
    				        
           	<?php do_action( 'tribe_events_after_the_meta' ) ?>
    	</div>
    	
    	
    	<div class="<?php if (empty($event_thumbnail)) { echo "three-fourths"; } else { echo "half my-event-list-description"; } ?> last">
    		<!-- DESCRIPTION -->
            
          <?php	
    		// $my_excerpt = get_the_excerpt();
    		$my_excerpt = excerpt(150);
    		if ( '' != $my_excerpt ) {
        	// Some string manipulation performed
    		}
    		echo $my_excerpt; // Outputs the processed value to the page
    		?>
    		
    		<!--Collapse-O-Matic PLUGIN-->
    		<?php
    		$content = apply_filters( 'the_content', get_the_content() );
    		$content = str_replace( ']]>', ']]>', $content );
            echo do_shortcode('[expand title="➜ DETAILS" trigclass="tribe-events-read-more centered" targclass="maptastic"]'.$content.'[/expand]');
           	?>
            <!--ENDE Collapse-O-Matic PLUGIN-->
    		<br />
    
    		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="my-eventlink" rel="bookmark"><?php esc_html_e( 'Noch mehr Details ➜ ➜', 'loc_canon_venuex' ) ?></a><br />
    		<?php do_action( 'tribe_events_after_the_content' ) ?>
            </div>
    
    </div>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Zach Tirrell

    (@zbtirrell)

    The line I see here that looks incorrect is this one:

    $my_excerpt = excerpt(150);

    Unless you are defining a custom function called “excerpt” somewhere else, as this is not a typical PHP or WordPress function.

    Hope that helps!

    -Zach

    Thread Starter pansenschim

    (@pansenschim)

    Hey Zach, thanks for your reply.
    Yes, there is actually a function that gives me back the excerpt. I’ve the same issue in events details pages where I did not implement the excerpt function. So, this does not seem to be the prob.

    Thread Starter pansenschim

    (@pansenschim)

    Hey Zach! You got another idea what could cause my prob? Everything would help me 🙂
    @zbtirrell

    The Newsteader

    (@thenewsteader)

    Mine is still broken. I have updated and even tried a brand new computer in case it was on my end. Still getting 505 error any time I activate PRO. I am running the “NewsMag Theme”

    Thread Starter pansenschim

    (@pansenschim)

    No idea @zbtirrell?
    Sorry to bother you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Update 4.9.0.3 – Error 500 –’ is closed to new replies.