Bug Report:: tribe_create_venue function creating an event instead of a venue

Home Forums Calendar Products Events Calendar PRO Bug Report:: tribe_create_venue function creating an event instead of a venue

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16504
    James
    Member

    Reproduce: Attempt to create a new venue using the tribe_create_venue function. Result is that a new partially populated event is created. The venue is created fine when venue array is provided to tribe_create_event function along with event data.
    $venue_test = array(
    ‘Venue’ => “Test Venue, Rochester, Mn”,
    ‘Name’ => “Test Venue”,
    ‘Address’ => “200 1st St”,
    ‘Country’ => ‘United States’,
    ‘City’ => “Rochester”,
    ‘State’ => “MN”,
    ‘Zip’ => “55902”,
    ‘ID’ => “MCHS-MN-Rochester”,
    ‘ParentID’ => “MCHS”,
    ‘Campus’ => “MCHS”,
    ‘Type’ => “Building”
    );
    echo “[“.tribe_create_venue($venue_test).”}”;

    Upon review of file “the-event-calender/public/advanced-functions/venue.php” found that createEvent and updateEvent are being called by these methods. Maybe this is supposed to be nested in another keyed array with key of “Venue” according to this? Doesn’t look like the case according to https://theeventscalendar.com/support/documentation/the-events-calendar-advanced-functions-venue-post-type/

    Setup: WordPress 3.2.1 | The Events Calendar 2.0.4 | Events Calendar Pro 2.0.4 | Intranet Version 3 Theme | PHP 5.3.8 | Apache 2.2.3

    Active Plugins: The Events Calendar, Events Calendar PRO, Search Everything, Exclude Pages from Navigation, Less Filters, Simple Section Navigation Widget, TinyMCE Advanced, Widget Context, Smart WYSIWYG Blocks Of Content, WordPress Importer, LDAP Authentication Plug-in

    #16520
    Rob
    Member

    Thanks for the report here, James. I’m not sure about this one myself but it looks like something is up. I’ve asked our dev Jonah to take a look so we can get this patched up for the next release as needed. Stay tuned.

    #16546
    Jonah
    Participant

    Hi James, I’m having problems running tribe_create_venue on it’s own too and I think our documentation might just be out of date. I need to check with one of the other devs though and get some insight. Stay tuned.

    #16559
    Joey Kudish
    Member

    Hi James,

    Two different un-related issues here:

    — There’s an error in our tribe_create_venue() and tribe_update_venue() functions, they should call TribeEventsAPI::createVenue() and TribeEventsAPI::updateVenue() respectively instead of TribeEventsAPI::createEvent() and TribeEventsAPI::updateEvent() – I am going to patch that for 2.0.5 which is our next release. Feel free to patch your own installation in the mean time.

    — Your ID, ParentID, Campus and Type arguments are invalid and could cause a conflict when passed to the function (chiefly ID which is a valid argument for the wp_insert_post function but only used for updates). You yourself linked to the list of valid arguments, so please base your arguments on that list. I am assuming that those 4 extra arguments are custom fields/metadata you are trying to add to the venue? If so, you will need to use update_post_meta() [http://codex.wordpress.org/Function_Reference/update_post_meta] to save that data, something like this: https://gist.github.com/2009346

    #975931
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Bug Report:: tribe_create_venue function creating an event instead of a venue’ is closed to new replies.