I get this following error when creating an Ical feed for single node page.

Warning: trim() expects parameter 1 to be string, array given in iCalUtilityFunctions::_setDate() (line 8483 of public_html/sites/all/libraries/iCalcreator/iCalcreator.class.php).

I created a views ical feed and disabled "webcal:// " in style option format settings. Also under format show section - set it to ical entity and the date field has been selected.

Then I added a contextual filters as Nid
Filter is set to "Display all results for the specified field" when no filter is present in url.

The path have been set as calendar/ical/%/calendar.ics
Then on node page I have put up the link to pass nid as "/calendar/ical/<nid>/calendar.ics"

By clicking on the link I am able to download the ics file, but refreshing the page shows the above error.

I am not sure if this is a bug or if I done it wrong. Any help would be appreciated.

Thanks

Comments

coredumperror’s picture

Gosh, I just love how utterly &#$*ing worthless PHP's error messages are. Your setup sounds entirely reasonable, so we're going to have to do some deep debugging.

The best way to debug this is for you to install the Devel module, enable it, then go to admin/config/development/devel. On that page, go to the "Error handlers" section, and choose "Krumo backtrace in the message area", then Save configuration.

With that set up, your site won't give worthless error messages, and we can learn what part of Date iCal may be broken. So download your feed again, then check the error. You should see a yellowish rectangle instead of that usual error message. If you click the little icon on the left side of the rectangle, it will expand into the full backtrace of the error. Post a screenshot of that expanded backtrace to this issue, and I'll be able to help.

dejavu_007’s picture

StatusFileSize
new309.25 KB

Thanks for helping.
I have attached the screenshot below.

coredumperror’s picture

StatusFileSize
new1.14 KB

OK, I think I figured out the problem. I was not aware of this until I delved deep into the iCalcreator docs, but it's apparently necessary to not call the createTimezone() function for UTC timezones. This makes sense, but I'd never considered it before, and I suppose no one else has attempted to use UTC dates until now (or at least no one has complained about it).

I can't personally confirm that the fix in this patch works, though, because my site doesn't use UTC dates. Could you please let me know if this works for you, so I can incorporate it into the official release?

dejavu_007’s picture

Yes the above patch has fixed it, the issue no longer appears.
Thanks a lot. :-)

coredumperror’s picture

Status: Active » Fixed

Excellent! Thank you for reporting this.

coredumperror’s picture

This fix has been pushed to git, and will appear in the next dev build.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

added text line which is not appearing changed to <nid>