Symfony2 FOS Comment Bundle error

The problem is that the fos_comment_script.src = '/web/js/35a8e64_comments_1.js' doesn't exist, i cant access it, so no threads are added and nothing is displayed. I'm not receiving any errors, nothing, everything looks fine but nothing is happening. I am using async.twig.html and the javascript that is generated on my page looks like this :

// thread id
var fos_comment_thread_id = '309';

// api base url to use for initial requests
var fos_comment_thread_api_base_url = '/web/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 = '/web/js/35a8e64_comments_1.js';
fos_comment_script.type = 'text/javascript';

(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(fos_comment_script);
})();

Answer


You probably forgot to run php ./app/console assetic:dump --env=dev after the cache was cleared or something. Please for more information take a look at the asset_management part of the symfony cookbook


你可能感兴趣的:(Symfony2 FOS Comment Bundle error)