logseq-calendars-plugin
logseq-calendars-plugin copied to clipboard
Toolbar icon only importing "Calendar 2".
I have Calendar 1, Calendar 2 and Calendar 3 defined in the settings. All calendar URLs resolve correctly to .ics files in an Incognito browser. But only Calendar 2 will import when I click the toolbar.
I first setup only Calendar 1 and it wouldn't import because the toolbar button would only import Calendar 2 and it wasn't setup. Once I setup Calendar 2, it imports correctly but Calendar 1 and Calendar 3 do not.
I don't see any setting to control which calendar gets imported from the toolbar icon?
App Version: 0.9.19 Git Revision: bd36efe Platform: Mozilla/5.0 (Macintosh Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML like Gecko) Logseq/0.9.19 Chrome/112.0.5615.204 Electron/24.6.3 Safari/537.36 Language: en-US Plugins: logseq-awesome-styler (v3.7.1), logseq-awesome-ui (v2.3.1), logseq-calendars-plugin (2.2.2), logseq-tabs (v1.19.3)
Got similar problem but none of the calendars import. Plugin just says: "Calendar not found: Check your URL"
Got similar problem but none of the calendars import. Plugin just says: "Calendar not found: Check your URL"
For what it's worth @taapsa-visma - I got that same error until I populated Calendar 2 settings.
Same issue here, even if all calendar settings are populated. The .ics download using the direct URL works fine.
Hi guys. Using the following config:
- Logseq 0.9.2 (MacOS Apple Silicon)
- Plugin 2.2.2 (installed from Marketplace)
Investigation
What happened for me was that after inserting links to my calendars using settings GUI, I got the same error "Calendar not found: Check your URL".
After checking the console I've seen plugin sends a single request (recall that I have 2 calendars configured). The request URL was https://calendar.google.com/calendar/ical/.... I first thought that replacing proper address with ... is some privacy measure done by the console, but it's not the case.
I went to check plugin's settings (for me on MacOS - should be the same on Linux - it was ~/.logseq/settings/logseq-calendars-plugin.json). From there the cause of the issue was clear: accountsDetails had the single block for Calendar1, and link was the same default https://calendar.google.com/calendar/ical/...:
{
"template": "{Start} - {End}: {Title}",
"useJSON": false,
"IndentCommonBlock": true,
"templateLine2": "{Description}",
"timeFormat": [
"12 hour time",
"24 hour time"
],
"calendar1Name": "Google",
"calendar1URL": "https://calendar.google.com/calendar/ical/path/to/correct.ics",
"calendar2Name": "Outlook",
"calendar2URL": "https://outlook.office365.com/owa/calendar/path/to/correct.ics",
"calendar3Name": "",
"calendar3URL": "",
"calendar4Name": "",
"calendar4URL": "",
"calendar5Name": "",
"calendar5URL": "",
"disabled": false,
"accountsDetails": {
"Calendar 1": "https://calendar.google.com/calendar/ical/..."
}
Possible workaround
The workaround is simple: fix accountsDetails section. For example, in my case I have two calendars:
calendar1is my Google calendar, link is incalendar1URL.calendar2is my Outlook calendar, link is incalendar2URL.
Steps to workaround:
- Open
logseq-calendars-plugin.jsonwith a text editor. - Replace
"Calendar 1"in"accountsDetails"with calendar name e.g.,"Google". - Replace link in
"accountsDetails"with the link from"calendar1URL"e.g.,"https://calendar.google.com/calendar/ical/path/to/correct.ics"
- Make sure the link is in the double quotes (""), and there is a comma at the end of the line describing
Calendar 1.
- Add new line for other calendar following the same pattern e.g.,
"Outlook": "https://outlook.office365.com/owa/calendar/path/to/correct.ics"The result looked like this in my case:
"template": "{Start} - {End}: {Title}",
"useJSON": false,
"IndentCommonBlock": true,
"templateLine2": "{Description}",
"timeFormat": [
"12 hour time",
"24 hour time"
],
"calendar1Name": "Google",
"calendar1URL": "https://calendar.google.com/calendar/ical/path/to/correct.ics",
"calendar2Name": "Outlook",
"calendar2URL": "https://outlook.office365.com/owa/calendar/path/to/correct.ics",
"calendar3Name": "",
"calendar3URL": "",
"calendar4Name": "",
"calendar4URL": "",
"calendar5Name": "",
"calendar5URL": "",
"disabled": false,
"accountsDetails": {
"Google": "https://calendar.google.com/calendar/ical/path/to/correct.ics",
"Outlook": "https://outlook.office365.com/owa/calendar/path/to/correct.ics"
}
- Turn the plugin off, turn the plugin on.
If you have more calendars, repeat step 4 for other calendars, adding comma after each new calendar.
I can't read typescript well, but for my money the code in index.ts that creates accountsDetails looks correct. I couldn't find the reason why accountDetails did not update after I changed the settings.
Thanks @Torainodor , Your workaround solved half of the problem for me.
I also set mine up via GUI, and got the same problem with the account details. but after fixing it manually, still the toolbar icon say "Open-calendar-2", not that big of a deal for me. just as long as it works.
This workaround also worked for me. Thanks very much for documenting this. I had the same results where it still says "Open-calendar-2", and while that is a bit funny, I am just glad it works. Before looking through the issues, I feared that this was somehow a problem with getting my ics from Nextcloud, which maybe does not make sense, but that was what I was thinking. Glad I checked the issue queue.