Plugin not showing the events pages
-
Hi guys,
Thank you for your wonderful plugin.
Unfortunately once I created the first event page and was trying to see it, I got “Fatal error: Can’t use function return value in write context in /htdocs/public/www/wp-content/plugins/wp-easy-events/layouts/single-emd-wpe-event.php on line 47”
As I just installed the plugin, it cannot be an error caused by any modifications of mine.
Please, may you help me?
Thanks
Francesca
-
This is the code I found on that file:
<?php $real_post = $post;
$ent_attrs = get_option(‘wp_easy_events_attr_list’);
?>
<div style=”position:relative” class=”emd-container”>
<div id=”wpee-content”>
<div id=”wpee-event-toolbar” class=”grid-100 padding-10″> ” data-start=”<?php echo mysql2date(‘l, F j, Y g:i a’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_startdate’], emd_mb_meta(’emd_event_startdate’))); ?>” data-end=”<?php echo mysql2date(‘l, F j, Y g:i a’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_enddate’], emd_mb_meta(’emd_event_enddate’))); ?>” href=”#” id=”ical-button-id”><?php _e(‘iCal Export’, ‘wp-easy-events’); ?> &details=<?php echo $post->post_content; ?>&location=LOCATION&dates=<?php echo mysql2date(‘Ymd’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_startdate’], emd_mb_meta(’emd_event_startdate’))); ?>T<?php echo mysql2date(‘his’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_startdate’], emd_mb_meta(’emd_event_startdate’))); ?>/<?php echo mysql2date(‘Ymd’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_enddate’], emd_mb_meta(’emd_event_enddate’))); ?>T<?php echo mysql2date(‘his’, emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_enddate’], emd_mb_meta(’emd_event_enddate’))); ?>&trp=false&sprop=&sprop=name:” id=”gcal-button-id” target=”_blank”><?php _e(‘Google Calendar Export’, ‘wp-easy-events’); ?> </div>
<div class=”grid-60 mobile-grid-100″>
<?php $images = emd_mb_meta(’emd_event_picture’, ‘type=plupload_image’);
if (!empty($images)) {
foreach ($images as $image) {
$full = wp_get_attachment_image_src($image[‘ID’], ‘full’); ?>
‘ title='<?php echo esc_attr($image[‘title’]); ?>’ rel=’thickbox’>‘ width='<?php echo esc_attr($full[1]); ?>’ height='<?php echo esc_attr($full[2]); ?>’ alt='<?php echo esc_attr($image[‘alt’]); ?>’ class=’emd-image’/>
<?php
}
}
?>
</div>
<div class=”single-event-section grid-40 mobile-grid-100 padding-10″>
<div class=”event-well”>
<div class=”section-row”> <span class=”section-title”><?php echo emd_human_readable_date_range(emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_startdate’], emd_mb_meta(’emd_event_startdate’)) , emd_translate_date_format($ent_attrs[’emd_wpe_event’][’emd_event_enddate’], emd_mb_meta(’emd_event_enddate’))); ?></span> </div>
<div class=”section-row”> <span class=”section-title”><?php _e(‘Website’, ‘wp-easy-events’); ?>:</span>
“><?php echo esc_html(emd_mb_meta(’emd_event_external_url’)); ?>
</div>
<?php echo ((emd_mb_meta(’emd_event_timezone’)) ? ”
<div class=\”section-row\”> <span class=\”section-title\”>” . __(‘Timezone’, ‘wp-easy-events’) . “:</span> <span class=\”section-value\”>” . emd_mb_meta(’emd_event_timezone’) . “</span> </div>
” : “”); ?>
<div class=”section-row”> <span class=”section-title”><?php _e(‘Cost’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_event_cost’)); ?>
</span> </div>
<?php if (emd_mb_meta(’emd_event_registration_type’) == ‘rsvp’) {
$modal_content = do_shortcode(“[event_attendee set=\”rel::event_attendee::is::” . get_the_ID() . “\”]”);
$modal_button = __(‘RSVP NOW’, ‘wp-easy-events’);
$modal_heading = __(‘RSVP’, ‘wp-easy-events’);
} elseif (emd_mb_meta(’emd_event_registration_type’) == ‘edd’) {
if (shortcode_exists(‘wpas_edd_product_edd_event_tickets’)) {
$modal_content = do_shortcode(“[wpas_edd_product_edd_event_tickets con_name=’edd_event_tickets’ app_name=’wp_easy_events’ type=’layout’ post= ” . get_the_ID() . “]”);
}
$modal_button = __(‘Tickets’, ‘wp-easy-events’);
$modal_heading = __(‘Buy’, ‘wp-easy-events’);
} elseif (emd_mb_meta(’emd_event_registration_type’) == ‘woo’) {
if (shortcode_exists(‘wpas_woo_product_woo_event_tickets’)) {
$modal_content = do_shortcode(“[wpas_woo_product_woo_event_tickets con_name=’woo_event_tickets’ app_name=’wp_easy_events’ type=’layout’ post= ” . get_the_ID() . “]”);
}
$modal_button = __(‘Tickets’, ‘wp-easy-events’);
$modal_heading = __(‘Buy’, ‘wp-easy-events’);
}
if (!empty(emd_mb_meta(’emd_event_registration_type’)) && emd_mb_meta(’emd_event_registration_type’) != ‘none’) {
echo ‘
<div class=”section-row” style=”margin:10px 0″> ‘;
echo $modal_button;
echo ‘ </div>
<!– Modal –>
<div id=”signup”>
<div id=”signup-ct”>
<div id=”signup-header”>’;
echo $modal_heading . ‘??‘ . get_the_title();
echo ‘</div>
<div style=”padding:15px”>’;
echo $modal_content;
echo ‘</div>
</div>
</div>
‘;
} ?>
</div>
</div>
</div>
<div class=”single-event-content-section grid-100 padding-30″ id=”event-content”> <?php echo $post->post_content; ?> </div>
<div class=”single-event-cat-section grid-100 padding-10″>
<div class=”tax-emd-event-cat”> <span class=”section-title”>Categories:</span> <?php echo emd_get_tax_vals(get_the_ID() , ’emd_event_cat’); ?> </div>
<div class=”tax-emd-event-tag”> <span class=”section-title”>Tags:</span> <?php echo emd_get_tax_vals(get_the_ID() , ’emd_event_tag’); ?> </div>
</div>
<div class=”single-event-venue-section grid-50 mobile-grid-100 padding-10″>
<div class=”single-event-venue-title font-bold padding-5″> <?php _e(‘Venue’, ‘wp-easy-events’); ?> </div><?php $post = get_post();
$rel_filter = “”;
$res = emd_get_p2p_connections(‘connected’, ‘event_venue’, ‘std’, $post, 0, 0, ”, ‘wp_easy_events’, $rel_filter);
if (!empty($res[‘rels’])) {
?>
<section class=”venue-section”><?php
echo $res[‘before_list’];
$real_post = $post;
$rel_count_id = 1;
foreach ($res[‘rels’] as $myrel) {
$post = $myrel;
echo $res[‘before_item’]; ?>
<div class=”section-row”>
ID); ?>” title=”<?php echo get_the_title(); ?>”><span id=”event-venue” data-fulladdress=”<?php echo esc_html(emd_mb_meta(’emd_venue_fulladdress’, ”, $myrel->ID)); ?>” class=”section-value”><?php echo get_the_title(); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Address’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_venue_address’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘City’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_venue_city’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘State’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_venue_state’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Postal Code’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_venue_postcode’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Country’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_venue_country’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
See Map
</div><?php
echo $res[‘after_item’];
$rel_count_id++;
}
$post = $real_post;
echo $res[‘after_list’]; ?>
</section><?php
} ?></div>
<div class=”single-event-org-section grid-50 mobile-grid-100 padding-10″>
<div class=”single-event-org-title font-bold padding-5″> <?php _e(‘Organizer’, ‘wp-easy-events’); ?> </div><?php $post = get_post();
$rel_filter = “”;
$res = emd_get_p2p_connections(‘connected’, ‘event_organizer’, ‘std’, $post, 1, 0, ”, ‘wp_easy_events’, $rel_filter);
if (!empty($res[‘rels’])) {
?>
<section class=”organizer-section”><?php
echo $res[‘before_list’];
$real_post = $post;
$rel_count_id = 1;
foreach ($res[‘rels’] as $myrel) {
$post = $myrel;
echo $res[‘before_item’]; ?>
<div class=”section-row”>
ID); ?>” title=”<?php echo get_the_title(); ?>”><span class=”section-value”><?php echo get_the_title(); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Email’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_eo_email’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Phone’, ‘wp-easy-events’); ?>:</span> <span class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_eo_phone’, ”, $myrel->ID)); ?></span>
</div>
<div class=”section-row”>
<span class=”section-title”><?php _e(‘Website’, ‘wp-easy-events’); ?>:</span> ID)); ?>” class=”section-value”><?php echo esc_html(emd_mb_meta(’emd_eo_website’, ”, $myrel->ID)); ?>
</div><?php
echo $res[‘after_item’];
$rel_count_id++;
}
$post = $real_post;
echo $res[‘after_list’]; ?>
</section><?php
} ?></div>
</div><!–container-end–>-
This reply was modified 8 years, 2 months ago by
persulla.
Any reply?
Hi @persulla , what is your wordpress and php version?
-
This reply was modified 8 years, 2 months ago by
- The topic ‘Plugin not showing the events pages’ is closed to new replies.