adesigns / calendar-bundle

This bundle allows you to integrate the jQuery FullCalendar plugin into your Symfony2 application.
MIT License
97 stars 60 forks source link

Uncaught Error: The route "fullcalendar_loader" does not exist. #7

Closed JamesDonnelly closed 11 years ago

JamesDonnelly commented 11 years ago

"fullcalendar_loader" is mentioned on line 23 of calendar-settings.js:

url: Routing.generate('fullcalendar_loader')

My twig file is set up like this:

<script type="text/javascript" src="{{ asset('bundles/projects/js/jquery-1.10.2.min.js') }}"></script>
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
<script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>
<script type="text/javascript" src="{{ asset('bundles/projects/js/jquery.fullcalendar.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('bundles/projects/js/calendar-settings.js') }}"></script>
{% include 'ADesignsCalendarBundle::calendar.html.twig' %}

However I'm getting the JavaScript error:

Uncaught Error: The route "fullcalendar_loader" does not exist.

The only thing I'm using which isn't mentioned in the documentation is jQuery 1.10.2 instead of 1.8.x, but that shouldn't affect anything.

mikeyudin commented 11 years ago

Have you added the routing to your configuration according to the instructions?

# app/config/routing.yml

adesigns_calendar:
  resource: "@ADesignsCalendarBundle/Resources/config/routing.xml"   
JamesDonnelly commented 11 years ago

Hey Mike, I fixed the issue in the end by moving the bundle files into the Vendor folder. Forgot to update this ticket! Thanks :-)

orodsem commented 10 years ago

Hey JamesDonnelly,

I have the same problem, can you please explain me how you fixed it? I'm not clear with what you said :-P

orodsem commented 10 years ago

Hey mikeyudin,

I think this is still an issue, even though if people can fix it by hacking up the code and moving the files around. I think a bundle should just work by following the README. would be good if you can have a look at it and fix it.

Thanks,

mikeyudin commented 10 years ago

You should not need to move any files around to make this bundle work. As long as you have followed the instructions, there should be no issues... I have tested this bundle on both existing and new symfony apps. Have you added the routing requirements to your routing.yml, and enabled the bundle in AppKernel?

orodsem commented 10 years ago

Thanks Mike for quick response. That was my mistake which I haven't read the first paragraph of the installation.

I have to install FOSJsRouting. It's all good now :+1:

mikeyudin commented 10 years ago

Nice, good luck!