Title: [event_embed] sometimes only shows &quot;Array&quot;
Last modified: August 24, 2016

---

# [event_embed] sometimes only shows "Array"

 *  [muranyia](https://wordpress.org/support/users/muranyia/)
 * (@muranyia)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/)
 * Every now and then [event_embed] fails to display events and only the text “Array”
   is shown. There are no changes going on meanwhile to the underlying code and 
   the error goes away by itself.
    The code I am using:
 *     ```
       echo do_shortcode('[event_embed from="now" to="now + 1 week" nothing_found_text="Jelenleg nincsenek közelgő események." cache="5" limit="10"]<div class="eventrocket embedded-event post"> <h2><a href="{url}">{title}</a></h2> <div class="schedule">{schedule}</div> <div class="summary">{advanced_excerpt}</div> <div class="entry-meta"><a href="{venue_link}">{venue}</a> (<a href="{map_link}" title="{city}, {street_address}" target="_blank">{city}</a>) | {cost}&nbsp;</div> </div>[/event_embed]');
       ```
   
 * [https://wordpress.org/plugins/event-rocket/](https://wordpress.org/plugins/event-rocket/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051003)
 * Hi muranyia,
 * That sounds like a strange problem – particularly if it happens sporadically 
   and is not something you can reliably reproduce.
 * Have you tried some basic troubleshooting, such as deactivating all other plugins
   except Event Rocket and The Events Calendar (and switching to a default theme)
   just in case some other component is misfiring and interfering somehow?
 * Right now I’m afraid there’s little I can suggest to help unless you can give
   me a set of steps that will let me experience the same thing, as I am unable 
   to recreate this problem.
 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051004)
 * …Not directly related to the issue you are having difficulties with, but I did
   also want to leave a note about programmatically embedding events, as you are
   doing in your example code.
 * Your approach of using [do_shortcode()](http://codex.wordpress.org/Function_Reference/do_shortcode)
   is absolutely fine, but I did want to highlight there are other – arguably “cleaner”–
   ways of doing this, just in case it interested you or anyone else coming across
   this topic.
 *     ```
       $args = array(
       	'from'  => 'now',
       	'to'    => 'now + 1 week',
       	'cache' => 5,
       	'limit' => 10,
       	'nothing_found_text' => 'Jelenleg nincsenek közelgő események.',
       );
   
       $html = <<<HTML
       	<div class="eventrocket embedded-event post">
       		<h2><a href="{url}">{title}</a></h2>
       		<div class="schedule">{schedule}</div>
       		<div class="summary">{advanced_excerpt}</div>
       		<div class="entry-meta">
       			<a href="{venue_link}">{venue}</a> (<a href="{map_link}" title="{city}, {street_address}" target="_blank">{city}</a>) |
       			{cost}&nbsp;
       		</div>
       	</div>
       HTML;
   
       event_embed()->render( $args, $html );
       ```
   
 *  Thread Starter [muranyia](https://wordpress.org/support/users/muranyia/)
 * (@muranyia)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051119)
 * Hello Barry,
 * I have applied the changes that you had suggested, and unfortunately, I ran into
   the “Array” problem right after. It is still sporadic.
    I’m afraid I will not
   be able to disable the other plugins, at least not for an extended period of 
   time, which would be necessary for testing if the problem ever comes back. I 
   was trying to dive into your code and see where an array could be returned at
   all. No hit. Do you think another plugin may be filtering the output?
 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051144)
 * > Do you think another plugin may be filtering the output?
 * It’s possible, or they may be filtering something else which is having a “knock-
   on” effect.
 *  Thread Starter [muranyia](https://wordpress.org/support/users/muranyia/)
 * (@muranyia)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051282)
 * Hi Barry,
 * some news:
 * I manned up and disabled every plugin except for The Events Calendar, The Events
   Calendar PRO and Event Rocket. “Array” still kept on showing up.
 * Then I started to have the impression that I can reliably get “Array” appear 
   if I reload the site quickly after a previous loading.
 * For curiosity, I’ve set `'cache'` to `0`. It seems this has effectively cured
   the problem. (Knocking on wood loudly!)
 * What could be wrong with the underlying caching mechanism…?
 *  Plugin Author [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * (@barryhughes-1)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051283)
 * That’s potentially a good find! My guess is that, perhaps, it is an issue with
   the retrieval of data from the transient store.
 * I’ve [made a note](https://github.com/barryhughes/event-rocket/issues/36) to 
   check it out in more detail.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[event_embed] sometimes only shows "Array"’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/event-rocket_dacd8c.svg)
 * [Event Rocket](https://wordpress.org/plugins/event-rocket/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/event-rocket/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/event-rocket/)
 * [Active Topics](https://wordpress.org/support/plugin/event-rocket/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-rocket/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-rocket/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Barry](https://wordpress.org/support/users/barryhughes-1/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/event_embed-sometimes-only-shows-array/#post-6051283)
 * Status: not resolved