fantasycalendar / obsidian-fantasy-calendar

MIT License
176 stars 8 forks source link

Cannot switch between calendars #62

Open Lxran opened 2 years ago

Lxran commented 2 years ago

Hello!

I have recently created a second calendar, and whenever I try to switch between them on the right-hand tab it just doesn't switch. I tried changing it from the settings dropdown on the right-hand tab, I tried changing the default calendar, both didn't work. On a side note about the default calendar selector; it seemingly didn't save my choice. It looked like it did until I closed the menu and reloaded Obsidian, but when I opened the main settings it was unset. Is there an obvious Save button I'm missing?

Edit: I checked the data.json in the module folder and at least the default calendar seems to be saved correctly there. Is this a community plugin compatibility issue? Given my plugin list, I wouldn't think so but here is the list:

Advanced Tables Fantasy Calendar Kanban Obsidian Git TTRPG Statblocks

I will also share the data.json here, maybe there is indeed a problem with it: https://files.catbox.moe/1cinwt.json

My Obsidian.md version is 0.14.15

AkikoPotato commented 1 year ago

Hello! (You can skip this paragraph) I found this thread, and it describes my issue EXACTLY. I had a custom calendar, but as soon as I made a 2nd custom calendar the plug-in would bug out as you described: Can't see the calendar, can't switch, can't change the default, events duplicating, etc. What I found interesting is that I also had the Calendar of Harptos, and Wildmount active and those worked fine. Only as soon as I added the 2nd custom calendar bugs started happening, including when I deleted the 2nd custom calendar for being buggy, it actually deleted my original custom calendar as well. I replicated this issue many times, and whenever a 2nd custom calendar was added the bugs happened. This bug was making homebrew calendars a bust!

I seem to have found a workaround though, and thankfully I had notes about my calendar format. I deleted the custom calendars, created a new calendar, selected a preset (Gregorian), and then modified the Gregorian calendar to be exactly the same as my original custom calendar. It worked well. Then I created another new calendar, selected the Gregorian preset again, and modified that calendar differently - to be the same as my 2nd custom calendar. Weirdly enough, so far so good! No bugs. I can see the calendar, switch, change defaults, no duplication - hooray!

Not sure if there is some sort of missing/duplicated information behind the scenes when a 2nd custom calendar is being made, but this seems to work. The only plugins we have in common is Advanced Tables.

Hope this helps you out and anyone else experiencing the same issues!

Lxran commented 1 year ago

I can confirm the above fix works. Thanks for the workaround @AkikoPotato!

But yeah, seems like there is some deeper problem that needs to be fixed. It's a bit disheartening to see this problem has persisted for more than a year at this point though. I wish I knew how to fix it, I'd like to have contributed to the repo.