I created the .ics file from google which has multiple entries. The first one looks like this:

DTSTART;VALUE=DATE:20130523
DTEND;VALUE=DATE:20130525

As you can see, the events last the whole day and as such only have year, month and day info.

When setting the feed importer to import the iCal information six nodes (I have six events) are added. However, even though I have set the mapping for DTStart and DTEND into a date-ISO field (called begin and end), these are not coming through at all. Everyting else (description / summary) is going fine.

I'm not a prof at iCal parsers, but my guess is that something goes wrong there... If I'm wrong I would love to hear so :)

CommentFileSizeAuthor
#2 ics.test20.95 KBiband

Comments

coredumperror’s picture

Could you please provide the complete .ics file that you're having trouble with? With the original source file, I can attempt to duplicate your issue and debug the underlying problem.

You also mentioned that you're using a Date-ISO field, which is actually something I've never tested with Date iCal. That does lend weight to the possibility that it's a bug in Date iCal.

iband’s picture

StatusFileSize
new20.95 KB

Coredumperror,

Here you go. I attached the .ics file, renamed from basic.ics to ics.test in order to upload. It is from a test calendar of mine and has about 48 events. I generated it by simply clicking on the Private URL that Google generated for my test calendar when I clicked on the ICAL button for Private URL.

Thanks in advance,

Iver

coredumperror’s picture

OK, great. I'll get to this as soon as I can. I'm currently fairly busy with other work, though, so I can't guarantee a particularly quick response.

flying dutchman’s picture

Sorry for my late reply! Thank you iband for providing coredumperror with the full ics file!

Next to Date-ISO I have also used other data fields with the same result, which is why I think the issue is the iCal parser. I just though that date-iso resembles the way google stores dates in the ics best. However as said before, I'm not familiar with parsers so I could as well be wrong.

I have chose the easiest path to fix this, i.e. I started using GCal Events, which is elaborate enough for my purpose of creating a block with the upcoming 5 events. Nevertheless I really liked date iCal because of its general purpose approach.

I hope you find a way to fix this, as apparently other people are having the same issue. However, I can now live with it ;)

Daemon_Byte’s picture

I have found a fix but that works for me when I have the same error. I don't know what causes it though. Maybe it's php5.4 or maybe it's some other change. But in the function date_feeds_set_target in feeds\mappers\date.inc you have to add these lines

    foreach ($feed_element as $f) {
      if ($f instanceof FeedsDateTime) { //add this line here
        $f = $f->getTimestamp(); //add this line here
      } //add this line here
      if (empty($f) || !is_numeric($f) && !date_create($f)) {
bryansd’s picture

Confirming that #5 Daemon_Byte fix worked for me. (PHP 5.3.x)

coredumperror’s picture

Ahhh, that section of the Feeds code is known to be buggy (see #1989196: Never Pass FeedsDateTime objects into date_create), so I'm glad you found a fix that works. I'd suggest updating to the newest dev version of Feeds to see if the solution posted in that issue (which has been committed to the Feeds dev version) fixes your problem without the change suggested by Daemon_Byte.

But if the new dev eversion doesn't fix your problem, you might want to submit this fix to that linked issue, since it may be a better solution.

dgeo’s picture

With same kind of problem, date did appear in my nodes after
- patching with #5
- OR installing -dev version of feeds

coredumperror’s picture

Status: Active » Fixed

Looks like this issue was resolved, so I'm going to mark it Fixed. If any of you guys are still having problem, please re-open this ticket.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

colan’s picture

Status: Closed (fixed) » Closed (duplicate)