WordPress.org

Forums

amr ical events lists
[resolved] Error Displaying .ICS Calendar (4 posts)

  1. meadeiator
    Member
    Posted 2 years ago #

    First, let me thank you for this plugin. It's exactly what I was looking for and the ability to configure and style to my heart's content is fantastic! Thanks for making it available to all.

    I have having one .ics feed, however, that is producing the following error. The error appears whenever I save the page with the short code referencing the calendar on it through wp-admin or when I view the page with the short code on it. Following is the error:

    Unable to create DateTime object from -000-11-13
    DateTime::__construct() [datetime.--construct]: Failed to parse time string (-000-11-13 T0:40:00) at position 7 (-): Double timezone specification

    The error appears prior to the listing of events, which will properly list after the error on the page.

    I have created a test post on http://test.icalevents.com and the error is also produced there. It is post 4098 submitted for review with the title "TEST FOR WP USER MEADEIATOR" - I prefer not to list my .ics address on a public forum.

    I ran the .ics address through an .ics validator and it is showing no errors when validated against the iCalendar 2.0 Strict ruleset.

    The .ics file is being created by Events Manager (http://wp-events-plugin.com/).

    Thanks in advance for any suggestions you may be able to provide!

    http://wordpress.org/extend/plugins/amr-ical-events-list/

  2. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    the problem is the caused by the data in the source ics file (you said produce by Events Manager plugin). The DTSTAMP fields don't look correct. In particular the one my plugin is complaining about is rather 'wrong'.

    ..
    DTEND:20120903T040000Z
    DTSTAMP:-00011130T040000Z
    SUMMARY:Labor Day - School Closed
    ...

    The source ics file has a smattering of weird DTSTAMP dates that cannot be correct 1969, 1970 etc - I doubt your ics file was last generated or events last modified around the birth of the internet!

    Trying to make a DATETIME object out of a bad datestring would normally cause a fatal error, except my plugin has code to trap the exception, highlight it and then 'continue'. Otherwise you wouldn't know there was a problem or a missed event.

    So.... what to do?

    "event manager" should fix their DTSTAMPS....

    What should my plugin do with badly formed dates? Should it "fail silently"?

    Obviously DTSTART and DTEND must be correct else events won't make sense or will be skipped. But what about DTSTAMP ? how 'important' is it to have this correct?

    I did some web searching, and some opinions are that it should be reasonably accurate (some references below), and some old notes that ms outlook requires DTSTAMP (maybe older versions?)

    Interestingly, Google seems to accept the ics file without complaint, so possibly it is ignoring the bad DTSTAMP.

    Some posts indicate possible problems with synchronisation after event modifications if DTSTAMPs not available or not correct.

    So in my opinion,
    1) a correctly formed DTSTAMP is probably worth having to ensure consistent use across all calendar applications.
    2) there is low risk in allowing a dud DTSTAMP through in my plugin as the plugin is only displaying (not synchronising).

    Sooooo.....The next update will report such data errors a lot more discretely, possibly only to logged-in admin.

    References:
    ===========

    The DTSTAMP is defined by RFC 5545 as

    ...the date and time that the instance of the iCalendar object was created. In the case of an iCalendar object that doesn't specify a "METHOD" property, this property specifies the date and time that the information associated with the calendar component was last revised in the calendar store.

    This is interpreted in various ways. Could be important in resolving clashes on UID and SEQUENCE when there are updates.

    https://bugzilla.mozilla.org/show_bug.cgi?id=303663

    "Message Sequencing" says if there are multiple
    messages that match on UID and SEQUENCE, then the one with the later
    DTSTAMP overrides.

    http://code.google.com/p/google-caldav-issues/issues/detail?id=26
    Synchronization problem with DTSTAMP and LAST-MODIFIED:
    https://groups.google.com/forum/?fromgroups=#!topic/caldav4j/U0lFrm14fB0

  3. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Me again,

    Forgot to say thanks for taking the time to recreate on the test site. Certainly makes it quicker and easier to look into things when people provide enough information.

  4. meadeiator
    Member
    Posted 2 years ago #

    Thank you anmari for you feedback and response. Thanks to your suggestion I was able to fix the issue as it pertained to me and passed along to the developer of the plugin that generated the .ics file the information you provided.

    Thanks again for a great plugin. This is really is hands down the best .ics reader I've seen out there!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • amr ical events lists
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.