libasys / calendarplus

Calendar+ App for ownCloud 8.1 or later, lower version not supported
36 stars 8 forks source link

Import failed when refreshing subscribed calendars #200

Open jackmort37 opened 8 years ago

jackmort37 commented 8 years ago

Hi, Whenever I try to refresh a susbscribed calendar like this one webcal://www.mozilla.org/projects/calendar/caldata/FrenchHolidays.ics, I get 'Import failed' popup with no other clue. Trying to debug the issue, I came to find an issue in calendarcontroller.php. On line 505 :

$aMeta = $this -> stream_last_modified(trim($calendar['externuri']));

This returns NULL as fopen doesn't seem to handle the webcal protocol becasue when removing the error suppression on fopen in stream_last_modified method, I can see this in the log :

{"reqId":"VkMCi8CoAQEAAC0S1qUAAACI","remoteAddr":"xx.xx.xx.xx","app":"PHP","message":"fopen(webcal:\/\/www.mozilla.org\/projects\/calendar\/caldata\/FrenchHolidays.ics): failed to open stream: No such file or directory at \/var\/www\/localhost\/htdocs\/owncloud\/apps\/calendarplus\/controller\/calendarcontroller.php#832","level":3,"time":"2015-11-11T08:55:40+00:00","method":"POST","url":"\/index.php\/apps\/calendarplus\/refreshsubscribedcalendar"}

Any fix possible for this issue ?

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

JBScoutBerlin commented 8 years ago

Hi,

why not just using http(s) ? for the example URL above at Mozilla the calendar works fine while using http.

regards Thomas

jackmort37 commented 8 years ago

Hi, For the example it may work fine, but :

JBScoutBerlin commented 8 years ago

Most public calendars that offer ICS-files can be used via http(s), so mostly it will not to bad that the app doesn't act like a calendar client by using the webcal-protocol. if it will so in the future, it will be more like a new feature ;)

About the problem using https: yes, that looks like a bug, I think also.

Best regards Thomas