Bug 450570 - Imported calendar does not work and kalendar take very long to start
Summary: Imported calendar does not work and kalendar take very long to start
Status: RESOLVED NOT A BUG
Alias: None
Product: Merkuro
Classification: Applications
Component: general (other bugs)
Version First Reported In: 1.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Claudio Cambra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-19 14:14 UTC by Ivan Tham
Modified: 2022-10-07 21:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Calendar view (264.06 KB, image/png)
2022-10-07 15:43 UTC, Ivan Tham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Tham 2022-02-19 14:14:19 UTC
SUMMARY
Since kalendar does not support alternative calendars as chinese (agricultural) calendar, I imported a chinese calendar from https://github.com/lwlsw/Chinese-Lunar-Calendar-ics using https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics, it does not seemed to work (maybe because it's large?) so I removed the calendar source and now it took 1 minute to start.

STEPS TO REPRODUCE
1. Import calendar source https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics

OBSERVED RESULT
Thing seemed to be slow now, calendar does not work and even though the calendar source is removed it is still slow to start, the new calendar source I also can't seemed to remove it from the sidebar (I tried both delete calendar and delete calendar source but it is still stuck there).

EXPECTED RESULT
Calendar should show up and works without side effect.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2
Kernel Version: 5.16.10-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 15.1 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
Comment 1 Claudio Cambra 2022-10-06 21:08:35 UTC
I imported the calendar in question and was unable to reproduce the slowness -- obviously slower than a blank calendar but nothing unusual or unexpected, even considering the calendar in question has an event every single day

Are you able to reproduce this on Kalendar 22.08?
Comment 2 Ivan Tham 2022-10-07 15:36:38 UTC
Nice, it works now but it doesn't work directly, I need to do it a couple of times retry a few more times to get it working.

Steps need to get it working:
1. open kalendar
2. configure kalendar (can't press ctrl+shift+, or kalendar will hang/lag), need to press settings > configure kalendar
3. press kalendar sources tab
4. press add new kalendar source button
5. select iCal Calendar File
6. input https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics as filename
7. input `Lunar Calendar` as display name
8. check read-only
9. press okay
10. close add new calendar source pop-up
11. now I see a new resource called akanodi_ical_resource_15 instead of `Lunar Calendar`
12. press `Restart` for `Lunar Calendar` so `Lunar Calendar` is now added to my list of calendars besides akanodi_ical_resource_15 (I can't delete this empty calendar or the lunar calendar will be deleted too)
13. now only I see both `Lunar Calendar` and `akanodi_ical_resource_15` (I have no idea what is this)
14. I am so not happy with the extra calendar name so I removed both and retry

Second try without inputting `Lunar Calendar` as display name first

1. open kalendar
2. configure kalendar (can't press ctrl+shift+, or kalendar will hang/lag), need to press settings > configure kalendar
3. press kalendar sources tab
4. press add new kalendar source button
5. select iCal Calendar File
6. input https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics as filename
7. close and wait for a couple of minutes (previously I thought it didn't work and removed the calendar, but now because I am writing a reply to this ticket, it just shows up), probably I just need to wait but I didn't know
8. close all pop-ups
9. right click `akonadi_ical_resource_17` calendar and press edit
10. enter `Lunar Calendar` as display name
11. select `moon-phase-full` as icon
12. press okay
13. it now works as expected, but imagine I tried this ~10 times in different ways at different time in order to get this to work

A better way to solve this is to have kalendar have built-in support for alternative calendars so I wouldn't have to do all this (search for a lunar calendar, figure out how to get kalendar to import, figure out I need to wait for a couple of minutes for it to work).

But yeah, can close this ticket since I figured out how to get it working.
Comment 3 Ivan Tham 2022-10-07 15:43:45 UTC
Created attachment 152631 [details]
Calendar view

I went back to use calendar in kontact due to kalendar having too many unnecessary animations and have to run a separate calendar app.

But I noticed that I have no control over the order of the calendars, then the lunar calendar is going to show up jumbled up as the last calendar which makes it quite unreadable. Maybe I should open a new issue for this?
Comment 4 Claudio Cambra 2022-10-07 21:09:31 UTC
(In reply to Ivan Tham from comment #2)
> Nice, it works now but it doesn't work directly, I need to do it a couple of
> times retry a few more times to get it working.
> 
> Steps need to get it working:
> 1. open kalendar
> 2. configure kalendar (can't press ctrl+shift+, or kalendar will hang/lag),
> need to press settings > configure kalendar
> 3. press kalendar sources tab
> 4. press add new kalendar source button
> 5. select iCal Calendar File
> 6. input
> https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics as
> filename
> 7. input `Lunar Calendar` as display name
> 8. check read-only
> 9. press okay
> 10. close add new calendar source pop-up
> 11. now I see a new resource called akanodi_ical_resource_15 instead of
> `Lunar Calendar`
> 12. press `Restart` for `Lunar Calendar` so `Lunar Calendar` is now added to
> my list of calendars besides akanodi_ical_resource_15 (I can't delete this
> empty calendar or the lunar calendar will be deleted too)
> 13. now only I see both `Lunar Calendar` and `akanodi_ical_resource_15` (I
> have no idea what is this)
> 14. I am so not happy with the extra calendar name so I removed both and
> retry
> 
> Second try without inputting `Lunar Calendar` as display name first
> 
> 1. open kalendar
> 2. configure kalendar (can't press ctrl+shift+, or kalendar will hang/lag),
> need to press settings > configure kalendar
> 3. press kalendar sources tab
> 4. press add new kalendar source button
> 5. select iCal Calendar File
> 6. input
> https://lwlsw.github.io/Chinese-Lunar-Calendar-ics/chinese_lunar_my.ics as
> filename
> 7. close and wait for a couple of minutes (previously I thought it didn't
> work and removed the calendar, but now because I am writing a reply to this
> ticket, it just shows up), probably I just need to wait but I didn't know
> 8. close all pop-ups
> 9. right click `akonadi_ical_resource_17` calendar and press edit
> 10. enter `Lunar Calendar` as display name
> 11. select `moon-phase-full` as icon
> 12. press okay
> 13. it now works as expected, but imagine I tried this ~10 times in
> different ways at different time in order to get this to work

A couple of notes from me:

1. You are right that I have not been able to get an iCal file to work as a new calendar source -- no events show up. However, using the "import calendar" option in the window/hamburger menu works fine, which leads me to believe this is an issue with Akonadi
2. Calendar source names and calendar names are two different things -- on the calendar source creation dialog you are setting the name of the calendar source and not the calendar itself. The calendar name is what will appear in the sidebar