fc_load_events
Hello ! I'm using your bundle in a Symfony project, but in the back end part (with easy admin). When I was using it in the front, it was working perfectly, but now I think there is a problem to load the events as the script JS is calling the path 'fc_load_events", do you have an idea to fix this ? The calendar is displayed but not the events. thank you by advance
Hi do you have a reproducer?
Hi, No, I'm sorry. I am a student in web development and not yet learned to use it.
Hi, I can't help you if you don't show me the code.
If I put my project on my GitHub, so I can show you the code, will this help ?
Yes if you want. You can create a public repository else a private repository and share it with me tattali.
I will look at your problem as soon as I have a moment.
Thank you very much, I don't want to waste your time ! Most of all because to test you'll have to recreate the database and migrations... create an account, set it with ["ROLE_ADMIN"], create some bookings... Maybe I will take too much time I don't want to bother you.
You'll see in the booking controller that there are two routes, one that is working (booking/calendar) with the calendar on the front end. The other (booking/calendarAdmin) that shows the calendar in the admin part, but this one generates this error
16c452 | POST | xhr | 404 | {{ path('fc_load_events') }} | 218ms
It can't fetch the events in the database...
Thank you for your help
Hi I didn't install the project but I'm not sure that your templates/bundle/EasyAdminBundle/layout.html.twig is related to templates/bundle/EasyAdminBundle/page/calendar.html.twig
you are right ! I deleted the layout because it is useless. First I was having trouble to display the calendar in the admin part, so I tried many things, but at last I managed including the scripts directly in the DashboardController, in the function configureAssets() Do you think that the problem is related to this ?
why not put it directly in your template?
But a 404 error is probably because the url fc_load_events is wrong.
{{ path('fc_load_events') }} is twig language and not JS.
So this is not possible

Check here the data-events-url to pass var from twig to js
Thank you so much !!!!!!!! it works, and most of all I understand the mistake so thank you again !