Leading spaces in iCal

Home Forums Calendar Products Events Calendar PRO Leading spaces in iCal

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #18778
    Steven
    Participant

    I can’t get the .ics file to work because there are two leading spaces or line feeds. It will open fine in Outlook because it ignores that whitespace, but in iCal it says the format is bad.

    I’ve even edited the PHP file and there’s still these leading spaces. Does anyone know why this is happening and how I can fix it?

    UPDATE: Here’s an example of an iCal download with the leading spaces/line feeds:
    http://pastebin.com/aFmz0Eig

    Thanks in advance for the help!
    -JD

    #18810
    Jonah
    Participant

    Hi Steven,

    Sorry to hear about this. I’m not sure why this is happening – do you have an example I can look at?

    #18820
    Andy Fragen
    Moderator

    Steven,

    What program/app created the ics file? Also, as Johah said and example would help a lot. What PHP file did you edit?

    #18828
    Steven
    Participant

    [code]

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//Neumos//NONSGML v1.0//EN
    CALSCALE:GREGORIAN
    METHOD:PUBLISH
    X-WR-CALNAME:Neumos
    X-ORIGINAL-URL:http://www.neumos.com
    X-WR-CALDESC:Events for Neumos
    BEGIN:VEVENT
    DTSTART;VALUE=DATE-TIME:20120524T200000
    DTEND;VALUE=DATE-TIME:20120524T200059
    DTSTAMP:20120506T000233
    CREATED:20120403T180452
    LAST-MODIFIED:20120502T184316
    UID:476-1337889600-1337889659@http://www.neumos.com
    SUMMARY:The Twelves with Victor Menegaux + James Ervin + Hanibal
    DESCRIPTION:Neumos and Trashed Present: The Twelves Thursday May 24th\, 2012 $12 ADV Doors at 8pm 21+ Website Advance Tickets on sale at Moe Bar + etix.com From Rio de Janeiro\, Brasil\, “The Twelves” were formed by the duo João Miguel and Luciano Oliveira back in 2005. The name came from the strange coincidence of their birth dates: twelve of july of 1980. The breakthrough for The Twelves came in July of 2007 when they remixed the track “Boyz” from M.I.A’s sophomore album\, Kala. The reworked track with an added club feel resulted in one of the most talked about remixes of 2007. The blog coverage surrounding the remix was extensive and eventually the track started to pop up in sets from high profile djs around the world\, including Kissy Sell Out\, who played it on BBC’s “In New Djs We Trust” series. The duo followed “Boyz” with equally well received remixes for Asobi Seksu and Erlend Oye\, both of which were featured on a number of blogs and music related sites. This stream of good tracks soon caught the attention of a number of labels\, including Modular Records (home of Cut Copy\, Klaxons and others) who comissioned a “Twelves” remix of the song “Get Lucky” by New Young Pony club. The resulting remix was released alongside reworkings from household names like MSTRKRFT and Who Made Who\, and received excellent reviews. Press coverage in Brazil soon started to pick up\, with interviews on Newspapers and magazines. The coverage led to appearances in festivals and concerts alongside names like Diplo\, LCD Soundsystem\, She Wants Revenge\, Van She and Phoenix. The sound of the duo brings influences from many genres. Among the most influential to their sound are Daft Punk\, Justice\, Röyksopp\, Vitalic\, Simian Mobile Disco\, MSTRKRFT\, Clor\, Cut Copy and Goldfrapp. Their live show is a unique blend of live keyboards\, drum machines\, mash-ups and remixing on the fly. Always trying to improvise as much as possible.
    LOCATION:925 E. Pike St., Seattle, WA, 98122, United States
    URL:http://www.neumos.com/?tribe_events=the-twelves
    END:VEVENT
    END:VCALENDAR
    [/code]

    #18829
    Steven
    Participant

    You can see the actual copy of the code without the forum formatting at PASTEBIN:
    http://pastebin.com/aFmz0Eig

    #18835
    Andy Fragen
    Moderator

    How is this ics file created?

    #18851
    Andy Fragen
    Moderator

    Sorry Steven, my bad. I see what’s creating the file. Just to confirm, you are using v2.0.6? What changes to the PHP did you make? I might be simpler to fix this problem if we all know your using a non-modified events-calendar-pro.php file.

    #18864
    Steven
    Participant

    Hello @Andy, et al. (My name is JD, Steven is my client) — We are using 2.0.6. I’ve tried 2.0.3 as well. The changes that I made to the code in the iCalFeed() function in “events-calendar-pro.php” was simply a trim() on the $content variable before it’s echoed back to the caller. It didn’t trim the whitespace because I think it’s happening elsewhere. I have a few client sites that this works on, just not this one: http://neumos.com — you can see what I’m talking about here: http://neumos.com/?post_type=tribe_events&eventDisplay=month

    I’ve tried to get the iCal export to work with my edits and from a fresh install — but those leading spaces/line feeds cause it not to open in iCal.
    -JD

    #18877
    Andy Fragen
    Moderator

    JD, I see the same leading blanks as you do in your feed and it doesn’t open in iOS calendar. I’m not at a desktop right now. 😉

    Can you reinstall a clean version of ECP 2.0.6 and don’t put in your edits. Can you also put up a pastebin of what your edits are, perhaps just your version of function iCalFeed()? Perhaps there’s an edit that isn’t doing what you think it should be doing. I have a clean install of 2.0.6 and I specifically do not see leading blanks.

    #18923
    Andy Fragen
    Moderator

    JD, I have some time to look at your code today if you could post the modified iCalFeed function to pastebin or github.

    #18924
    Andy Fragen
    Moderator

    JD, what is the purpose of your PHP mods? What I mean is what precisely are you wanting to do?

    #18944
    Andy Fragen
    Moderator

    JD, I’ve been playing around and I think I’ve found a solution to what you want to do, but to be sure I need to know precisely what that is. FWIW, my solution doesn’t change the events-calendar-pro.php file.

    #18960
    Andy Fragen
    Moderator

    FWIW, I’ve found a way to change any event field created for an ics file, though I still don’t know what changes you want to make to which field and why?

    #18984
    Andy Fragen
    Moderator

    JD, I did a lot of guessing as to what you might want. I assumed that you wanted to shorten the DESCRIPTION value in the iCal feed. I’ve created a bit of code that you can add to your theme’s function.php file that will truncate the iCal feed DESCRIPTION value to 100 characters. You should use a non-modified version of ECP 2.0.6 or better with this.

    git://gist.github.com/2649910.git

    If I’m guessing wrong please let me know.

    Regards,
    Andy

    #18985
    Andy Fragen
    Moderator

    Oops, copied wrong URL.

    https://gist.github.com/2649910

Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘Leading spaces in iCal’ is closed to new replies.