When the user is not limiting content types in a view to which contain the date field, date_ical will throw up some errors.

Errors:

Notice: Undefined property: stdClass::$field_my_custom_date in date_ical_plugin_row_ical_feed->render() (regel 124 van /var/www/myproject/drupal/sites/all/modules/contrib/date_ical/date_ical_plugin_row_ical_feed.inc).
Warning: array_key_exists() expects parameter 2 to be array, null given in date_ical_plugin_row_ical_feed->render() (regel 132 van /var/www/myproject/drupal/sites/all/modules/contrib/date_ical/date_ical_plugin_row_ical_feed.inc).

Limiting to content types which contain the field fixxes this issue.

I suppose ical should check if the field exists before accessing it. (I understand limiting to the correct content types is a good thing to do though ;) ).

Comments

Anonymous’s picture

We have the same problem.
Merely enabling the date_ical module causes comment RSS feed to break with the following error message:
Fatal error: Cannot access empty property in ../date_ical/date_ical_plugin_row_ical_feed.inc on line 124

Disabling the date_ical module solves the problem.

RSS feed of nodes works OK, but RSS feed of comments is not compatible with date_ical.

Is there any fix or workaround?

heddn’s picture

Category: bug » support
StatusFileSize
new563 bytes

Patch attached.

skyredwang’s picture

Category: support » bug
Priority: Normal » Critical

This is definitely not a support request. It's a critical bug; it also has something to do with user's context such as language.

liberatr’s picture

After applying this patch I now have a new error:

Illegal offset type in date_ical_plugin_row_ical_feed->render() line 110 of date_ical/date_ical_plugin_row_ical_feed.inc

The contents of $this->options['date_field'] is an empty array.

FIXED: All I had to do was just go back to the feed settings next to Date iCal Entities and re-save the Settings form so the date_field had a value.

cafuego’s picture

I get the impression this means that date_ical can't be used to create an iCal feed of items that contain a date by way of an entity reference, is that correct?

If so, what would need to be done to make this work? The use case here is COD, in which sessions don't contain a date/time field, but are linked to timeslot nodes via an entity reference. I can make date_ical spit out an iCal feed of timeslots, but not of sessions :-/

Could this issue be changed to a feature request for supporting date/time field via entity references or should I open a new issue for that?

kattekrab’s picture

Issue tags: +COD

Hmmm.

That sounds like a bit of a showstopper for including this in COD.

That's a shame - seemed like this module was an easy way to add the ability for people to download their schedule to their own calendar.

coredumperror’s picture

I'd love to make Date iCal capable of pulling in a date from an entity reference, so please do add that request as a new issue.

As for the crash when an entity doesn't have the specified date field, I've fixed that in the 7.x-2.x-dev build. Please check it out and let me know if you're still having problems.

I may be able to fix it in the 1.x branch, but it'll have to wait until tomorrow.

coredumperror’s picture

Status: Active » Closed (fixed)

OK, I've applied a similar fix to the 7.x-1.x-dev build. Please try it out, and if you're still having problems, open a new issue.