• Resolved nwarmenh

    (@nwarmenh)


    My client contacted me to say that recently all of the event info has disappeared from the custom single-event.php pages. It seems that placeholders like #_LOCATIONNAME and #_EVENTNOTES are suddenly showing nothing, but also not throwing an error.

    I discovered that
    $event = new EM_Event($post->ID);
    still successfully creates an object, but it’s (now) entirely empty:

    EM_Event Object
    (
        [event_id] => 
        [post_id] => 
        [event_parent] => 
        [event_slug] => 
        [event_owner] => 

    etc.

    Yes, I verified that $post->ID is working fine.

    The fact that this just showed up within the last couple of weeks suggests a plugin conflict brought about by some plugin update, but I haven’t been able to figure that out yet and was hoping others might have experienced this and could point me in the right direction.

Viewing 4 replies - 1 through 4 (of 4 total)
  • nikra

    (@nikra)

    I second that.

    Neither EM_Event( $id ); or em_get_event( $id ); works.

    katherinac

    (@katherinac)

    I’m facing the same problem since updated to version 5.9.10.

    $event = em_get_event(get_the_ID()); doesn’t work anymore.
    So echo $event->output("#j"); an similar outputs are empty.

    Had to switch back to our prior version 5.9.8.1 again.

    katherinac

    (@katherinac)

    I’d like to give you an update on how I was able to fix it in my case. It seems (meanwhile) you have to pass a second parameter to the function em_get_event to specify if the ID (post_id or event_id). I think event_id is the default.

    In my case I was searching by the post_id and had to change
    $event = em_get_event(get_the_ID());

    to

    $event = em_get_event(get_the_ID(), 'post_id');

    Maybe this helps you guys too!

    nikra

    (@nikra)

    Confirmed. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘new EM_Event() suddenly creates empty object’ is closed to new replies.