DataTables logo DataTables

via Ad Packs
DataTable server side for Symfony 2 (Doctrine)
  • slauta93slauta93
    Posts: 1
    Hi!

    I then wrote the code for the sample from the database under the Doctrine, it may be useful)

    https://gist.github.com/3175255 or ver. 2 https://gist.github.com/3175282

    P.S. Sorry for my English
  • QuentinQuentin
    Posts: 21
    Hello !

    Thank you for providing us your code.
  • QuentinQuentin
    Posts: 21
    Well... I can't get it to work.

    I use normal routing via yml files, so just putted your routes in the file instead of using SensioFrameworkExtraBundle.

    Datatables is saying that there is a JSON formatting error.

    Can you explain a bit your code ?

    Thank you.
  • allanallan
    Posts: 15,555
    I don't know much about slauta93's framework, but I would say that knowing what the server is returning would be very helpful to anyone who can help you with this problem (i.e. what is it returning other than valid JSON - my guess is an error that would lead to the problem).

    Allan
  • QuentinQuentin
    Posts: 21
    Sure.

    I have made a debug and saw that there was no json returned, because there was no valid routes found by Symfony2. And with a valid route, there is no json but the page itself returned...

    So the sAjaxSource is wrong and i don't understand why... I will continue to learn more about routes in Symfony2 maybe...
  • QuentinQuentin
    Posts: 21
    ...

    I solved my problem, just had to give the namespace when using the path to the entity repository.

    Example:
    mynamespaceMyBundle:MyEntity
    

    :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.

In this Discussion