Cannot create web calendars with webcals:// scheme

@dcaliste did you test the web calendar feature with Nextcloud? I was able to add such a calendar but I get no data displayed in calendar app. If I visit the site in my browser (it’s a public school calendar - ) and choose copy link I get:


As far as I remember I had to change webcaks to https and cut of the ?export argument to get sailfish accepting the url…

As I implemented it, it is supposed to support the webcal URL scheme (internally it is changed into http). But I didn’t envision the webcals possibility with an ‘s’. My bad… I’m submitting a patch upstream to add this ‘s’ URL scheme handler.

Patch content
diff --git a/extensions/ui/webcal.qml b/extensions/ui/webcal.qml
index 057ee61..87167fe 100644
--- a/extensions/ui/webcal.qml
+++ b/extensions/ui/webcal.qml
@@ -78,6 +78,8 @@ AccountCreationAgent {
                     // startsWith() was added in Qt5.8
                     if (text.slice(0,7) == 'http://' || text.slice(0,8) == 'https://') {
                         return text
+                    } else if (text.slice(0,10) == 'webcals://') {
+                        return 'https://' + text.slice(10)
                     } else if (text.slice(0,9) == 'webcal://') {
                         return 'http://' + text.slice(9)
                     } else {
diff --git a/extensions/webcal-import.desktop b/extensions/webcal-import.desktop
index c431139..8c37a13 100644
--- a/extensions/webcal-import.desktop
+++ b/extensions/webcal-import.desktop
@@ -6,7 +6,7 @@ Icon=icon-launcher-settings
 Comment=Sailfish MimeType Handler for Webcal URL

Besides, I guess you need to keep the ?export but just change webcals into https. I tested on my device and it’s fine.

1 Like

@dcaliste thanks so far, I got it working that way, but there are still bugs:

I tried to add the calendar before I asked above and deleted it.
Now I set it up again, open the account settings again and changed the name. Then I opened calendar and had the calendar two times, one with the changed name (and no data) and another one with the name from the url. Deleted it again. Third try… Three calendars. The bugs:

  1. So I found out that deleting a Web calendar account just deletes the account itself, but not the calendar in calendar app.
  2. If you change the calendar name in accounts this change only affects the name shown in Settings app, in calendar app name isn’t changing.
  3. If adding the same webcal url again and change the name right during setup this webcal data is shown under the name of one of the previous attempts while the new given name stays empty.
  4. If you change the calendar name the account icon isn’t shown in calendar app.

Well, it’s working on my side, otherwise I would have a long list of web calendars after testing ; ) It seems, you’re triggering a way to do it that I didn’t use and test… Myself, I’ve always deleted the account from the account list with a long press and the “delete” option in the menu. @flypig recently found that the delete option of the pull down menu of the account page itself misfunction. He corrected it.

I’ll give a look to this.

Sorry, I don’t understand the steps. You setup a new account and before validating, you change the name. Then, what happens in a bit unclear to me…

Fun, I’ll check and correct that.

Misunderstood - after validation process (screen 1 where you enter the url) setup shows screen 2 with the calendar name that’s given from the server as default, http-redirect option and snyc interval.

But I guess I solved it. I deleted the webcal, then I deleted the calendar database from system. After reboot I had one empty Calendar left, but with the right name. I added the Webcal again, giving that display name and ended up with one webcal as wanted, but without the chance of changing the color. Another database deletion including the whole mkcal directory solved it, after reboot I had my Nextcloud calendars from two accounts, but needed to force a sync from pulley menu (did that from settings - accounts) to get the webcal visible in in the calendar list from calendar app. The webcal is now shown with its display name given by me in Settings, shows the webcal icon and color can be changed.

Seems there was something wrong after my first attempts so just deleting the whole mkcal folder did it. So sorry for disturbing with that.

Nice side effects of the db deletion: All calendars are now displayed on alphabetical order, not sorted by account…

What the hell is webcals://?

I get from context that it’s implied that it’s a SSL-enabled version of webcal://, but I can not find it in the IANA List of URI schemes.

I therefore conclude that something issuing or supporting a webcals:// URI scheme is not doing something standards compliant, and random breakage is expected.

You should be using webcal://<<servername>>:443/ for ssl-enabled WebDAV content.

Feel free to correct me if that scheme is somehow in wide usage, or if there is an internet standard that says appending an s to any URI scheme makes implementations have to use SSL/TLS.

; -) I totally agree, but from a pragmatic point of view, I can easily change webcals by https to actually access the file… And maybe send a mail to the host to suggest to use IANA compliant URI scheme.

Or not. My phone went off last night, emtpy battery, and after restart I had again two emtpy calendars with the same name as my webcal and without the webcal icon.