-
Notifications
You must be signed in to change notification settings - Fork 230
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
Nothing is appearing for me #649
Comments
Maybe you need to import first the jquery , and after import the template |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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;
/**
@ORM/Entity
@Orm\ChangeTrackingPolicy("DEFERRED_EXPLICIT")
/
class Comment extends BaseComment
{
/*
*/
protected $id;
/**
*/
protected $thread;
}`
`<?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\CommentBundle\Entity\Thread as BaseThread;
/**
/
class Thread extends BaseThread
{
/*
*/
protected $id;
}`
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 %}
<script src="http://code.jquery.com/jquery-3.2.1.js"></script>
{% 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);
| })();
`
The text was updated successfully, but these errors were encountered: