Problem with ical import and timezones

Home Forums Calendar Products Event Aggregator Problem with ical import and timezones

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #1008000
    Anthony D’Arco
    Participant

    I am having trouble with the ical import and it importing the correct time. Here is the feed:

    https://office.schoolrush.com/shareCalendariCal.action?schoolId=10015&token=ofovir82

    and here is the calendar:

    http://aadbdstarter.wpengine.com/events/

    All of the events are 5 hours after the event actually happens. I checked my timezone and its set to Chicago (which by no coincidence is +5 UTC). I tried fiddling with the timezones, but to no avail.

    #1008468
    Nico
    Member

    Hi Anthony,

    Thanks for reaching out to us! Sorry to hear about this glitch but I’ll help you out getting this right!

    I see there’s a known bug, that might be affecting you. Can you please share your system information with me? It seems to affect sites running with PHP 5.2 so checking on that might gives us a clue.

    On the settings side of things, have you tried setting the site timezone with city name (Chicago) and with UTC offset (UTC +5). Sometimes this two options throw different results in timezone related issues.

    Please let me know about this,
    Best,
    Nico

    #1008473
    Anthony D’Arco
    Participant

    Nico,

    I did try playing with the timezones and there was no effect. Here is the system information (I thought I had included in that previous request, but it appears to be 5.5.9

    http://aadbdstarter.wpengine.com
    INSTALL KEYS
    tribe-ical-importer = [removed by admin]
    WORDPRESS VERSION
    4.3.1
    PHP VERSION
    5.5.9-1ubuntu4.11
    PLUGINS
    Gravity Perks version 1.2.9 by David Smith(http://gravitywiz.com/)
    Gravity Forms version 1.9.13 by rocketgenius(http://www.rocketgenius.com)
    Advanced Custom Fields version 4.4.3 by Elliot Condon(http://www.elliotcondon.com/)
    Envira Gallery version 1.3.6.3 by Thomas Griffin(http://thomasgriffinmedia.com)
    Genesis Simple Edits version 2.1.1 by Nathan Rice(http://www.nathanrice.net/)
    GravityView version 1.1 by Katz Web Services, Inc.(http://www.katzwebservices.com)
    Soliloquy version 2.4.3.1 by Thomas Griffin(http://thomasgriffinmedia.com)
    The Events Calendar: iCal Importer version 3.12 by Modern Tribe, Inc.(http://tri.be)
    The Events Calendar version 3.12.1 by Modern Tribe, Inc.(http://m.tri.be/1x)
    WordPress Importer version 0.6.1 by wordpressdotorg(http://wordpress.org/)
    NETWORK PLUGINS

    MU PLUGINS
    Force Strong Passwords version 1.3.3 by Steve Taylor(http://sltaylor.co.uk)
    ManageWP – Worker Loader by ManageWP(https://managewp.com)
    Stop long comments version 0.0.4 by WPEngine(wpengine.com)
    WP Engine System version 2.2.7 by WP Engine
    THEME
    Genesis
    MULTISITE

    SETTINGS
    tribeEnableViews =
    Array
    (
    [0] => list
    [1] => month
    [2] => day
    )
    schema-version = 3.12.1
    recurring_events_are_hidden = hidden
    previous_ecp_versions =
    Array
    (
    [0] => 0
    )
    latest_ecp_version = 3.12.1
    last-update-message = 3.12.1
    donate-link =
    postsPerPage = 10
    liveFiltersUpdate = 1
    showComments =
    showEventsInMainLoop =
    eventsSlug = events
    singleEventSlug = event
    multiDayCutoff = 00:00
    defaultCurrencySymbol = $
    reverseCurrencyPosition =
    embedGoogleMaps = 1
    embedGoogleMapsZoom = 10
    debugEvents =
    tribe_events_timezone_mode = site
    tribe_events_timezones_show_zone = 1
    earliest_date = 2015-09-23 05:00:00
    latest_date = 2016-06-10 05:00:00
    WORDPRESS TIMEZONE
    America/Chicago
    SERVER TIMEZONE
    America/Chicago

    #1008508
    Nico
    Member

    Hi Anthony,

    Thanks for the quick follow-up here!

    Before we continue can you update the plugins to the latest version just released yesterday? Once you have updated the plugins can you please follow the steps described in our Testing for conflicts guide? This way we can see if this is a problem in our plugin or a conflict with the theme or other installed plugins.

    Regarding the system information, everything looks fine on that end. Your should be safe from the bug, but just in case open up the browser console and look for any error’s when re-testing.

    Thanks,
    Nico

    #1008715
    Anthony D’Arco
    Participant

    Nick, I have updated the plugins. I am not sure how to check the error console, and did you want me to reimport the feed as well?

    #1009298
    Nico
    Member

    Hey Anthony,

    Thanks for following up on this, also sorry for the delay on my response we don’t monitor the forums during the weekends.

    Gret to know you’ve updated the plugins!

    Take a look to this article: Using your browser to diagnose JavaScript Errors, Step #3 describes how to use your browser console. And yes, you should do this while trying to re-import the events.

    I’m trying to import the feed locally, but I get a ‘Not a valid url’ notice. Checking the URL in a ics validator it seems there are a couple of errors with it: http://icalvalid.cloudapp.net/?mode=url&uri=&id=635790564787529383&progress=0

    Can you create a sample ics file with Chicago timezone and try to import that so we can check if this an error with the feed or with iCal importer not matching the timezone correctly?

    Thanks,
    Nico

    #1009662
    Anthony D’Arco
    Participant

    Nico,

    I did not get any JS errors while importing. I also talked with the person who developed their calendar, I am now not showing any errors:

    https://office.schoolrush.com/shareCalendariCal.action?schoolId=10015&token=ofovir82

    I am not going to lie, I’m getting really concerned if this works. I currently have two tickets open for the iCal importer, and I have yet to get this working on any of my sites. I want to get to the bottom of this because this feature would be amazing (clearly, because I purchased the unlimited package).

    Please let me know what I can do to help get this working. I can provide you as much access as you need my sites, but at this time, we’ve tried this on three installs with two different calendars to import, and have not had it work yet.

    Thank you,
    Anthony

    #1009838
    Nico
    Member

    Hi Anthony,

    Thanks for following-up on this, and also for correcting the calendar file. I could test this locally and confirm that the import is failing 🙁

    I can understand your frustration, and I’ll try to do my best to find out what’s wrong here as soon as possible. I’ll ping the dev team to test this, and make some additional tests myself tomorrow to confirm if this is a bug or to see if there’s anything wrong with the feed formatting (which apparently is fine now).

    Thanks for your patience while we work on this and also for your willingness to collaborate with us,
    Best,
    Nico

    #1009960
    Anthony D’Arco
    Participant

    Thank you for following up, and I will keep an eye out for any updates. Thank you, and I’m sorry, I had to vent a little bit.

    #1010259
    Nico
    Member

    Hi Anthony,

    Thanks for your patience on this, and don’t worry your claim here is legit 🙂

    Hopefully I think I found the problem with the iCal feed! Your events don’t have UID defined, from what I’ve tested adding the UID property fixes the issue – take a look at the UID specification.


    BEGIN:VEVENT
    UID:[email protected]
    DTSTAMP:20150930T211558
    ...

    Please let me know if adding the UID to event entries fixes this,
    Best,
    Nico

    #1010878
    Anthony D’Arco
    Participant

    Nico,

    Here is the link to the file. The developer updated the UID:

    https://office.schoolrush.com/shareCalendariCal.action?schoolId=10015&token=ofovir82

    That said, I just tried to import it as a test, and only three things were imported (clearly there are more than three items). Also, many times while trying to upload the file I get a “Your search returned no results. Please adjust your search.” error.

    It is worth mentioning. I am doing this on a site that is as default as it gets (ie. the only 2 plugins activated are The Event Calendar and iCal importer and Twenty Fourteen activate).

    Let me know if you would like login information to take a look at the instal.

    #1011357
    Nico
    Member

    Hi there Anthony,

    Thanks for following up on this!

    I’ve tried this again locally and it’s working like a charm, I was able to import all the 142 events when pulling from the iCal feed. One thing that might be happening here is that you previously imported and deleted some of the events so they won’t be re-imported? Maybe the feed was updated once again?

    Can you try this again in a clean install? Maybe just a local site?

    Please let me know if it works as expected,
    Best,
    Nico

    #1011846
    Anthony D’Arco
    Participant

    Yes you are right, however, this leads me to another problem. How do I tell the system that has already had the import, but is now not showing any results because I deleted those events already?

    Ie. I have this working on a local site now, but now I need to get it to work in production, but it won’t import any events that it has previously imported…thoughts?

    Thank you,
    Anthony

    #1011922
    Nico
    Member

    Hi Anthony,

    Glad to hear we are finally at a good spot here 🙂

    Just to clarify it won’t re-import deleted events, but it will update existing one.

    To prevent iCal Importer from saving a record of deleted events, just add this snippet to your theme’s functions.php file:

    /*
    * Prevents iCal importer from saving a copy of "deleted" events
    * This means when you rerun an import, it will reimport any events you previously deleted
    */
    function tribe_ical_dont_save_deleted () {
    $ical_importer = Tribe__Events__Ical_Importer__Main::instance();
    remove_action( 'before_delete_post', array( $ical_importer, 'deletedEventSave' ) );
    }
    add_action( 'wp_loaded', 'tribe_ical_dont_save_deleted' );

    Regarding the events that had been already deleted and need a re-import, you can do a search on the ‘wp_posts’ where ‘post_type’ is ‘deleted_events’ and delete the found rows. The query will look like this:

    // search the posts
    SELECT * FROM wp_posts WHERE post_type = 'deleted_event';
    // delete the posts
    DELETE FROM wp_posts WHERE post_type = 'deleted_event';

    Please note that this can’t be undone, so I would recommend backing up your database first.

    Best,
    Nico

    #1012264
    Anthony D’Arco
    Participant

    Nico,

    Thank you for this, and I am a little concerned that I don’t understand what these actually do, so let me see if I can explain in my own words:

    The first function stops the importer from making a “note” that a particular event has been deleted, and will reimport the event regardless of whether or not it has been deleted. This would not work in my case because the “note” of the deleted events have already been made.

    The second is an SQL command (not sure if thats the right word), that I would run on my database that actually removes those “notes” that are made by the iCal importer. I would need to do this in my circumstance because the “note” has already been made.

    I apologize for my use of the word “note;” I wasn’t sure of a better word.

    Let me know if I understood that correctly.

    Thank you,
    Anthony

Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘Problem with ical import and timezones’ is closed to new replies.