Support » Plugin: Events Manager » [Plugin: Events Manager] em_events() Call to a member function output() on a non-object

  • Resolved Thomas

    (@thomasgg)


    Listing a couple of events using:
    em_events( array('limit'=>1,'orderby'=>'event_start_date') ); works fine.

    As soon as I add 'array'=>true to the arguments to get the output as an array I get the following error:
    Fatal error: Call to a member function output() on a non-object in [..]/wp-content/plugins/events-manager/classes/em-events.php on line 199

    I think this is a bug?

    http://wordpress.org/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks aglonwl!
    I actually fixed it by using EM_Events::get().

    Then I discovered EM_Events::get() isn’t outputting the event’s categories. Or am I missing something?

    Edit: already tried using $EM_Event->get_categories()->categories but that’s giving me the error

    Notice: Undefined property: EM_Event::$id in /wp-content/themes/dir/file.php on line 81

    Fatal error: Call to a member function get_categories() on a non-object in /wp-content/themes/dir/file.php on line 30

    additional useful links

    -http://wordpress.org/support/topic/plugin-events-manager-get-event-category-name-from-category-id?replies=3

    -http://codex.wordpress.org/Function_Reference/get_term

    The problem is that EM_Events::get() isn’t outputting the event’s term_id(s)

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    you need to go trough the events and do

    $EM_Event->get_categories()->get_ids();

    we don’t load them until you need them

    Thanks for your replies guys. I fixed it!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Events Manager] em_events() Call to a member function output() on a non-object’ is closed to new replies.