Maybe this should be a feature request rather than a bug report, as I'm not sure whether it's an issue with the parser or with the actual feeds. But it appears to affect feeds from both Google Calendar and Meetup.com, and that would seem to suggest that it's an issue with the module itself.

Anyway, I'm using iCal Feed Parser to import iCal calendars into (custom) event nodes for use in Calendar - as described in this video tutorial: http://mustardseedmedia.com/podcast/episode34 (which builds on this previous video tutorial: http://mustardseedmedia.com/podcast/episode27).

It works great, apart from one thing: the feeds all seem to use a fixed column width, without word wrapping.

For example:

DESCRIPTION:Doors open 6.30pm\nSpeaker at about 7.30pm\n\nMeeting finishes 
 about 9.30pm\n\nAdmission £2 (£1 concessions)\nAll welcome\, no need to boo
 k\, just turn up

So that's how the nodes are created too - which can break links as well as making the text look peculiar.

Would it be possible for iCal Feed Parser to "stitch" the lines of text back together?

CommentFileSizeAuthor
#4 remove_line_breaks-1559342-4.patch456 bytessvajlenka

Comments

gerlos’s picture

Still a problem in Drupal 6.26, Date 6.x-2.9, Feeds 6.x-1.0-beta12+0-dev and iCal feed parser 6.x-2.0-beta1.

Found that was related to carriage returns in original ical file.

Solved editing parser_ical.dateapi.inc, changing:

<?php
function _parser_ical_parse($feed_content) {
  include_once(drupal_get_path('module', 'date_api') .'/date_api_ical.inc');
  $feed_folded = explode("\n", $feed_content);
  $ical_parsed = date_ical_parse($feed_folded);

?>

To:

<?php
function _parser_ical_parse($feed_content) {
  include_once(drupal_get_path('module', 'date_api') .'/date_api_ical.inc');
  // added to remove carriage returns, that caused troubles
  $feed_content = str_replace("\r", "", $feed_content);
  $feed_folded = explode("\n", $feed_content);
  $ical_parsed = date_ical_parse($feed_folded);

?>

Now everything works fine.

fox’s picture

Unfortunately the above solution did not work for me. Still getting line breaks.

However I am using Feed API and Feed Element Mapper modules as described in the video tutorial above.

Do I need to migrate to Feeds module?

gerlos’s picture

Unfortunately the above solution did not work for me. Still getting line breaks.

However I am using Feed API and Feed Element Mapper modules as described in the video tutorial above.

Do I need to migrate to Feeds module?

Yes, you should.

Those modifications work with Feeds module. I didn't try them with Feed API and Feed Element Mapper. I guess that you should change something else.

Anyway, the problem is that we have to cope with carriage returns and line feeds in the original ics feed. Shouldn't be too difficult to apply similar changes for your installation.

svajlenka’s picture

StatusFileSize
new456 bytes

Just took #1's change and rolled it into a simple patch.

svajlenka’s picture

Status: Active » Needs review

Asking for review