10928 Posts in 2612 Topics by 1809 members
|Go to End|
18 November 2009 at 8:37am
I am trying to import a feed of announcements but I am having a but of trouble getting it to render properly.
You can see what is going on here -> http://howellv2.stagedsite.net/
Everything looks great but the content ends prematurely and we are getting a bunch of '\' characters as well.
Any help / insight would be great
18 November 2009 at 9:29am
I see all the events in the right hand column. Is there something I'm missing? Also, make sure there's no HTML in your ICS feed. I'm not sure that I'm filtering the ICS content for HTML at this point.
19 November 2009 at 1:47am
Thanks for the response UncleCheese, much appreciated.
If you look at the descriptions below any given listing, it only outputs a line or two before it ends. For example "Don't miss the traditional start of the holiday season in the H" is maybe only 1/3rd of the total description on the calendar but thats all that gets rendered on the page.
The descriptions don't have any HTML at this point. It looks like (my guess) for some reason google has manual line breaks in long descriptions and because the ICS is parsed with explode("\r\n" it thinks that is the end of the description?
19 November 2009 at 3:46am
Yeah, that's a very unfortunate bug in the ICS import class I'm using. It's all line-break based, so if your description has one, it ends the field there. I tried for a while to give it some new logic to tolerate line-breaks circumstantially, but I just couldn't make it work. If you're a programmer, look at that ICSReader (?) class and see what you can come up with. I'd really love to fix this.
23 December 2009 at 9:58am
I have found a quick workaround to this problem.
1. Open up the event_calendar/code/iCal.php file
2. Uncomment lines 42-44 (as of revision 83)
3. On line 42 replace "END:VEVENT" with whatever comes right after the end of your description in your .ics file. I am importing from Google Calendar, so for me I put "LAST-MODIFIED". You will need to open up the .ics file you are importing and see what comes after the description.
This may not work if you are importing .ics files from different sources with slightly different formats, but I am only importing from Google Calendar so this does the trick. If anyone can find a better fix for this please let me know.
23 December 2009 at 10:54am
That's a great fix. Thanks. It's true that the varying sources of ICS outputs is the most problematic issue with the imports. ICS is supposed to be a standardized format, but there's so little information about it. You'd think this stuff would have been figured out by now.
|Go to Top|