Problem with iCal export and Multiple Categories visible

Home Forums Calendar Products Events Calendar PRO Problem with iCal export and Multiple Categories visible

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1066572
    Seth Hemken
    Participant

    We are integrating our Event calendar Pro version with an application on iOS. The applications developers were given the specific category based ical addreses for importing nutrition menu information on each campus. The weird thing is even with the specific category url, the ical is exporting other calendar items in the categories.

    Example
    http://juniper.reddingschools.net/events/category/nutrtion-breakfast – by visiting this category you ONLY see the items that are categorized as the category “Nutrition-Lunch”. But if you put the /ical on the end and export you will see other events from other categories.

    Example – on any given day there are 1 breakfast item which pulls from the /nutrition-breakfast category and 2 lunch items which are pulled from the /nutrition-lunch category, however in viewing the ical from the /nutrition-breakfast you see items from BOTH categories, not just breakfast. Also there will be other random events from the /school-event category inserted into that ical as well.

    I’m wondering if it has something to do with the filtering of ical once you download the .ical file. I have quite a few sites that I need to fix this at since the app is brining in the wrong feeds for other items as well. We have other categories like school events, and sporting events that all use customized categories, but when trying to pull those into the app we have the same results when pointing at the ical.

    thanks

    #1067080
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    We have a bug causing this and have a bug ticket to find and resolve the issue.

    I do not have a timeline when it will be fixed though.

    Let me know if you have any follow up questions.

    Thanks

    #1067309
    Seth Hemken
    Participant

    This reply is private.

    #1067327
    Brian
    Member

    The best bet might be to downgrade to 3.12.x to get you up and running with it.

    I will test tomorrow to verify it works correctly there.

    #1067680
    Brian
    Member

    So I looked into downgrading and the issue is in 3.12.6 too.

    I did create a filter that helps fix this in the month view in my tests:

    /*
    * The Events Calendar - Force Category to iCal Feed
    */
    add_filter( 'tribe_ical_feed_month_view_query_args', 'tribe_modify_month_ical_query', 10, 2 );
    function tribe_modify_month_ical_query( $args, $month ) {
    global $wp_query;
    $category = '';
    if ( isset( $wp_query->query_vars[Tribe__Events__Main::TAXONOMY]) ) {
    $category = $wp_query->query_vars[ Tribe__Events__Main::TAXONOMY ];
    }
    if ( $category ) {
    $args[ Tribe__Events__Main::TAXONOMY ] = $category;
    }
    return $args;
    }

    Adding that to your theme’s functions.php should force the iCal in month view categories to correctly only show events in that category.

    I found that if you use the next and previous event links that the export works correctly for all views, it is just the initial load creating the bug, which would be what scripts are using.

    Let me know if using that filter works for you for now.

    Thanks

    #1072311
    Seth Hemken
    Participant

    This reply is private.

    #1073239
    Brian
    Member

    I am not sure. I used the Month View Url from the link your provided so worked on fixing that.

    What is the exact url you are using so I can test it out.

    Thanks

    #1083894
    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 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Problem with iCal export and Multiple Categories visible’ is closed to new replies.