At what stage do you see just a blank screen? Before or after you have selected tickets on the ticket selector within the admin?
A blank page usually means a fatal error is being thrown, if you check within your server error logs you should see the error there, or if you enable WP_Debug and retest you should see the error. If you post that here we can investigate further.
It looks like a fatal error is being thrown while the ticket selector table is being generated. Does the condition still happen when all other WordPress plugins are deactivated and the site is switched to use a default WP theme?
This is Fatal error I am getting: Fatal error: Method EventEspresso\modules\ticket_selector\TicketSelectorStandard::__toString() must not throw an exception, caught Error: Call to undefined function espresso_venue_name() in /home/wpkurse4/public_html/wp/wp-content/plugins/event-espresso-core-reg/modules/ticket_selector/DisplayTicketSelector.php on line 0
It does not throw this error with default wordpress theme.. Where do I look for error?
Does your WordPress theme include some modifications that hook into the ticket selector? The reason I ask is because the espresso_venue_name() function shouldn’t be loading from the DisplayTicketSelector.php file.
If you do have some modifications that call the espresso_venue_name() function you can wrap those in ! is_admin() checks so the code doesn’t attempt to load while in the admin.
Hmm.. I have modified “standard_ticket_selector.template.php” in my theme.
I use espresso_venue_name() there.. I have wrapped it ! is_admin() but still same issue
standard_ticket_selector.template.php contents:
<?php
/** @var boolean $event_is_expired */
/** @var boolean $taxable_tickets */
/** @var boolean $prices_displayed_including_taxes */
/** @var int $row */
/** @var int $EVT_ID */
/** @var int $max_atndz */
/** @var int $ticket_count */
/** @var string $event_status */
/** @var string $date_format */
/** @var string $time_format */
/** @var string $ticket_row_html */
/** @var string $anchor_id */
/** @var string $datetime_selector */
/** @var EE_Ticket[] $tickets */
/** @var EE_Event $event */
/** @var EE_Tax_Config $tax_settings */
/** @var EE_Ticket_Selector_Config $template_settings */
/** @var \EventEspresso\modules\ticket_selector\TicketDetails $ticket_details */
?>
<div id="tkt-slctr-tbl-wrap-dv-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl-wrap-dv">
<?php do_action( 'AHEE__ticket_selector_chart__template__before_ticket_selector', $event ); ?>
<?php echo $datetime_selector; ?>
<table id="tkt-slctr-tbl-<?php echo $EVT_ID; ?>" class="tkt-slctr-tbl">
<thead>
<tr>
<th scope="col" class="ee-ticket-selector-ticket-details-th">
<?php
echo apply_filters(
'FHEE__ticket_selector_chart_template__table_header_available_tickets',
esc_html('Ticket', 'event_espresso'),
$EVT_ID
);
?>
</th>
<th scope="col" class="ee-ticket-selector-ticket-status-th">
<?php echo esc_html('Status', 'event_espresso'); ?>
</th>
<?php if ( apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', TRUE ) ) { ?>
<th scope="col" class="ee-ticket-selector-ticket-price-th">
<?php
/**
* Filters the text printed for the header of the price column in the ticket selector table
*
* @since 4.7.2
*
* @param string 'Price' The translatable text to display in the table header for price
* @param int $EVT_ID The Event ID
*/
echo apply_filters(
'FHEE__ticket_selector_chart_template__table_header_price',
esc_html__( 'Price', 'event_espresso' ),
$EVT_ID
);
?>
</th>
<?php } ?>
<th scope="col" class="ee-ticket-selector-ticket-qty-th">
<?php
/**
* Filters the text printed for the header of the quantity column in the ticket selector table
*
* @since 4.7.2
*
* @param string 'Qty' The translatable text to display in the table header for the Quantity of tickets
* @param int $EVT_ID The Event ID
*/
echo apply_filters(
'FHEE__ticket_selector_chart_template__table_header_qty',
esc_html__( 'Qty', 'event_espresso' ),
$EVT_ID
);
?>
</th>
</tr>
</thead>
<tbody>
<?php
global $post;
if (!is_admin() ) {
$venue_name = espresso_venue_name( 0, '', FALSE );
}
// Get remaining spaces for event
$spaces = $post->EE_Event->spaces_remaining_for_sale();
if ((int) $spaces > 3) {
$spaces_available = __(' and more than 3 seats available', 'walter_lernt');
} elseif ((int) $spaces == 3) {
$spaces_available = __(' and 3 seats available', 'walter_lernt');
} elseif ((int) $spaces == 2) {
$spaces_available = __(' and 2 seats available', 'walter_lernt');
} elseif ((int) $spaces == 1) {
$spaces_available = __(' and 1 seat available', 'walter_lernt');
}
$newstr = explode('<td class="tckt-slctr-tbl-td-name">', $ticket_row_html);
$newstr[0] .= '<td class="tckt-slctr-tbl-td-name">'. $post->post_title .' ('. $venue_name .')';
$newstr[1] = str_replace("<strong >Ticket</strong>", "", $newstr[1]);
$newstr2 = explode('<td class="tckt-slctr-tbl-td-price jst-rght">', $newstr[1]);
$newstr2[0] .= '</td><td class="tckt-slctr-tbl-td-status">'. $spaces_available .'</td><td class="tckt-slctr-tbl-td-price jst-rght">';
$newstr[1] = $newstr2[0].$newstr2[1];
echo $newstr[0].$newstr[1];
//echo esc_html(nl2br($ticket_row_html));
?>
</tbody>
</table>
<?php
if ( $taxable_tickets && apply_filters( 'FHEE__ticket_selector_chart_template__display_ticket_price_details', true ) ) {
if ( $prices_displayed_including_taxes ) {
$ticket_price_includes_taxes = esc_html__( '* price includes taxes', 'event_espresso' );
} else {
$ticket_price_includes_taxes = esc_html__( '* price does not include taxes', 'event_espresso' );
}
echo '<p class="small-text lt-grey-text" style="text-align:right; margin: -1em 0 1em;">' . $ticket_price_includes_taxes . '</p>';
}
?>
<input type="hidden" name="noheader" value="true" />
<input type="hidden" name="tkt-slctr-return-url-<?php echo $EVT_ID ?>" value="<?php echo EEH_URL::current_url() . $anchor_id; ?>" />
<input type="hidden" name="tkt-slctr-rows-<?php echo $EVT_ID; ?>" value="<?php echo $row - 1; ?>" />
<input type="hidden" name="tkt-slctr-max-atndz-<?php echo $EVT_ID; ?>" value="<?php echo $max_atndz; ?>" />
<input type="hidden" name="tkt-slctr-event-id" value="<?php echo $EVT_ID; ?>" />
<?php
if ( $max_atndz > 0 ) {
echo apply_filters(
'FHEE__ticket_selector_chart_template__maximum_tickets_purchased_footnote',
esc_html('')
);
}
if ( ! apply_filters( 'FHEE__EE_Ticket_Selector__display_ticket_selector_submit', false ) ) {
add_filter( 'FHEE__EE_Ticket_Selector__no_ticket_selector_submit', '__return_true' );
}
do_action( 'AHEE__ticket_selector_chart__template__after_ticket_selector', $EVT_ID, $event );
You’ll need to wrap all of your customizations in conditional checks, not just the one for espresso_venue_name().
Viewing 8 reply threads
The support post ‘Can't manually add attendees’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.