Jump to content

Add iCalendar Feed


Maalong

Recommended Posts

Hi there,

I am having a problem adding in a calendar feed. The feed I want to use is:

webcal://www.imca-int.com/events/ics/

However, when I add it in I get this error:

The feed appears to be invalid because content not matching the expected format was returned

What is going wrong here, is it there a problem with the actual feed from here:

https://www.imca-int.com/events/calendar/

 
Link to comment
Share on other sites

In the language, that string is referenced as "ical_error_bad_content"

Looking in to the code, this error is returned when the isvalid check is run against the provided feed - and 'bad_content' indicates that the feed doesn't begin with "BEGIN:VCALENDAR"

However.....looking at the ics file on a validator, it does appear to start with that (see https://icalendar.org/validator.html?url=http://www.imca-int.com/events/ics/ and click 'Show Source Data')

Echo'ing out info in the isvalid function in applications\calendar\sources\Icalendar\ICSParser.php indicates that the first item in the ics file's content array is returning as blank, instead of "BEGIN:VCALENDAR", which is actually the second item.

Log a ticket with IPS, point them in the direction of this post, and see if they can have a closer look in to why the ICS file is causing this behaviour (I reckon the ics file might have a carriage return at the beginning, which is resulting in the first item in the array being blank, and that the validator above is actually tidying things up for display)

Link to comment
Share on other sites

Nathan, 

You were quite right. I asked the question and received the following:

"The iCalendar specification states that only CRLF should be used within the feeds. Whilst I can't locate any specific information about the file starting with line-feeds the examples give show BEGIN being on the first line without any spaced or other characters. The best solution at this time would be to contact the vendor and let them know that their iCalendar feed is malformed so that they can look into correcting it."
 

Quote

 

4.1 Content Lines The iCalendar object is organized into individual lines of text, called content lines. Content lines are delimited by a line break, which is a CRLF sequence (US-ASCII decimal 13, followed by US-ASCII decimal 10).

http://www.ietf.org/rfc/rfc2445.txt

 

image.png.9f35801ddb1fef614f0987ea4649b804.png.b7382e35ea66cb15dac4029c817e01e4.png

 

Hope this helps anyone else with the same question.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...