-
-
Notifications
You must be signed in to change notification settings - Fork 945
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
SAK-50711 Calendar first xhr request /direct/calendar/site/siteid.json returns invalid json #13056
base: master
Are you sure you want to change the base?
Conversation
@hornersa while I understand your logic here is to retry the fetch can you work out why the first request fails? |
Yes, sorry, not a fan of this type of solution |
@ern @ottenhoff - Can y'all point me to where in the code the REST call is being served? I'm not (very) familiar with where/how calls to /direct URIs is routing calls to which classes. |
Find the request in Chrome console -> Network -> Look at the response
calendar_collection obviously bad. do a refresh and now it's:
then i look at that line using tig: tig blame calendar/calendar-tool/tool/src/webapp/js/sakai-calendar.js |
@ottenhoff - Thanks, but I think I eventually found what I was looking for on the server site-- specifically that CalendarEventEntityProvider.getCalendarEventsForSite as the service method responding to the REST call. Presumably this is happening via the @EntityCustomAction annotation (presumably custom to Sakai) which I haven't delved into before. Nevertheless, I think I may have enough leads to pursue this further for now. |
I've ascertained that the problem is not due to the List object returned by CalendarEventEntityProvider.java.getCalendarEventsForSite when invoked for the first time. In other words, the list has events if you follow the test plan. Therefore, the problem is likely somewhere within whatever RESTful architecture is being used by Sakai and/or an initialization problem with the custom annotation, EntityCustomAction... perhaps. That is to say that this bug is currently too far into the weeds for me to dig much further. |
Jira: https://sakaiproject.atlassian.net/browse/SAK-50711
I demo and explain the approach of this proposed fix in the video, SAK-50711-ProposedFix-20241122.mp4, attached to the jira.