FriendsOfSymfony / FOSCommentBundle

Threaded comments for Symfony
http://friendsofsymfony.github.com/
MIT License
462 stars 230 forks source link

Nothing is appearing for me #649

Open DylanB85 opened 6 years ago

DylanB85 commented 6 years ago

Hi guys, nothing is appearing for me once I've finished following the installation guide. I've created both my comment and thread entity classes as far as I can notice.

`<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM; use FOS\CommentBundle\Entity\Comment as BaseComment;

/**

`<?php namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM; use FOS\CommentBundle\Entity\Thread as BaseThread;

/**

I've also issued the command in the command line php bin/console doctrine:schema:update --force, but have not noticed any new tabled in my MySQL Workbench.

I've finally laid out my index.html.twig file like this `{% extends 'base.html.twig' %}

{% block body %} {% include '@FOSComment/Thread/async.html.twig' with {'id': 'foo'} %} {% endblock %}

{% block javascripts %}

{% endblock %} `

And yet, nothing appears at the end. Could someone with more knowledge on this bundle let me know where I potentially went wrong? If you need to see any more code I'd be more than happy to show you.

Also this is how the JavaScript code looks in the page's source code

` // thread id

  | var fos_comment_thread_id = 'foo';   | var fos_comment_thread_view = 'tree';   |     | // api base url to use for initial requests   | var fos_comment_thread_api_base_url = '/api/threads';   |     | // Snippet for asynchronously loading the comments   | (function() {   | var fos_comment_script = document.createElement('script');   | fos_comment_script.async = true;   | fos_comment_script.src = '/bundles/foscomment/js/comments.js';   |     | (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(fos_comment_script);   | })();

`

arandapablodamian commented 6 years ago

Maybe you need to import first the jquery , and after import the template