Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar events are disappearing randomly #52

Open
Jarosch opened this issue Jul 20, 2022 · 11 comments
Open

Calendar events are disappearing randomly #52

Jarosch opened this issue Jul 20, 2022 · 11 comments

Comments

@Jarosch
Copy link

Jarosch commented Jul 20, 2022

Hi.
Please see this link here. There I've shared a video which is showing the behaviour of the plugin while scrolling through the months. Events are disappering and appearing again when scrolling through the months up and down.

Link to video: https://1drv.ms/v/s!Ao83UV5As0xGgZQIWL_ch-0sLVFSZA?e=58o58m

Do you have an idea what is the reason for that?
You can just check it by yourself at following adress: http://kgv-bellingholz.de/events

@wernerjoss
Copy link
Owner

Hm, I can't reproduce this with my Calendar - I can switch forth and back without events disappear.
might be a browser cache issue ?
btw., your calendar link is dead (404)

@Jarosch
Copy link
Author

Jarosch commented Jul 22, 2022

Hi,
I updated to fullcalendar V5, but it hasn't solved the issue. It seems that the problem comes up, when there are more than one ICS files. I've updated my host. Now you should be able to access the "Events" page where you will see what is happening when you roll through the months.

@wernerjoss
Copy link
Owner

well, I can see the disappearing (and re-appearing) events in your calendar now.
as said, this does not happen with my calendar, which has 3 ics files - so more than 1 ics file is not the problem.
I guess the issue is related to some javascript/jquery interference, maybe triggered by the theme.
you could try to change your jquery version to jquery-3 (currently: jquery-2).
if that does not help, what happens if you switch to a better supported theme, e.g. quark ?
(currently, you are using twenty-fifteen, which is only a bad and incomplete port of an old WP theme).
additionally: how did you update to fc5 ?
just by copying the fc5 files into the fc4 folders ?

@Jarosch
Copy link
Author

Jarosch commented Jul 24, 2022

Hi,
I've updated the jquery version to v3. No changes.
I've also tried the "Quark" theme. Same behaviour. So, it's not theme related.

Yeah, I've just updated the fullcalendar by using the npm-tool and replaced the file content in the folders by the new files.

@wernerjoss
Copy link
Owner

wernerjoss commented Jul 24, 2022

well, then, I guess there is not much more left that I can propose, except this:
set verbose to true in calendar.js, line 17.
then you will get a lot of output in javascript console, including detailed info about calendars beeing loaded,
and events lists.
additionally, you can disable grav's cache for your calendar page, see the docs

@Jarosch
Copy link
Author

Jarosch commented Jul 24, 2022

Hi again.
Well, after changing "verbose" to true, I've figured out that in case that the events are missing, the "allevents" variable is not filled with events. Index is 0 and do_callback is false. After toggling the month forward and backward, the allevents array is filled up again and index is 1 and do_callback is true.
The events array is filled with the same amount of values at each time.

@wernerjoss
Copy link
Owner

strange - I cannot reproduce this: for me, allevents and events variables are always populated as expected
(events holds one calendar, allevents all calendars), index is 2 and do_callback is true.
so, ATM, I'm out of ideas what is causing this problem.

@Jarosch
Copy link
Author

Jarosch commented Jul 25, 2022

Hi,
it's curious. In general I've figured that in some cases, the script starts parsing not the same file as before. And when this happens, the allevents var is not complete, what leads into missing events in the calendar.
I have created two logs for you for the month "November" in 2022. There I expect the event "Allerheiligen" in the 1st of November.

Check here for a quick diff: https://quickdiff.net/?unique_id=7F4100C8-C163-BCDF-628B-7256873C73CF
The left window shows the log with the missing "Allerheiligen" event. The right window shows the log with the "Allerheiligen" event shown in the calendar.

kgv-bellingholz.de-november_22-missing.log
kgv-bellingholz.de-november_22-complete.log

@wernerjoss
Copy link
Owner

wernerjoss commented Jul 25, 2022 via email

@Jarosch
Copy link
Author

Jarosch commented Jul 25, 2022

Yes, this solved the issue.

So, probably there‘s something wrong in parsing the files doing it the other way.

Thanks for your support!

@wernerjoss
Copy link
Owner

ok, that's fine and also explains why I could not reproduce this 😄 .
in fact, I never used the feature 'calendar files in page folder' in a production environment, just developed it upon request, tested and found no problems (maybe just overlooked).
I'll then dig a bit deeper into this and try to solve it, of course, but that will take awhile as I'm currently busy with other things.
so, for the time being, I'll add some hint to the docs and leave this issue open.
thanks for reporting !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants