calendarplus icon indicating copy to clipboard operation
calendarplus copied to clipboard

Import failed when refreshing subscribed calendars

Open jackmort37 opened this issue 9 years ago • 3 comments

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.

jackmort37 avatar Nov 11 '15 08:11 jackmort37

Hi,

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

regards Thomas

JBScoutBerlin avatar Nov 11 '15 19:11 JBScoutBerlin

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

  • I'm not sure it will for other calendars
  • When I tried with https, refreshing the calendar made all events disappear (still investigating and I will probably open another bug). Regards.

jackmort37 avatar Nov 11 '15 20:11 jackmort37

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

JBScoutBerlin avatar Nov 11 '15 22:11 JBScoutBerlin