FriendsOfSymfony/FOSCommentBundle

[Semantical Error] line 0, col 61 near 't WHERE t.id': Error: Class AppBundle\Entity\Comment has no association named thread

MSoni05 opened this issue · 5 comments

i am using foscomment...followed every steps but getting console error as 500 internal server error
i cant see any comments on page

@merk please help me

jquery.min.js:2 GET http://localhost/symfony/MySymPro/web/app_dev.php/api/threads/foo/comments?permalink=http%253A%252F%252Flocalhost%252Fsymfony%252FMySymPro%252Fweb%252Fapp_dev.php%252Fhome 500 (Internal Server Error)
send @ jquery.min.js:2
ajax @ jquery.min.js:2
v.(anonymous function) @ jquery.min.js:2
get @ comments.js:85
getThreadComments @ comments.js:103
(anonymous) @ comments.js:525
(anonymous) @ comments.js:540

config.yml
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }

easy_admin:
entities:
# - AppBundle\Entity\Tbladmin
# - AppBundle\Entity\Tblactivities
- AppBundle\Entity\User

fos_comment:
db_driver: orm
class:
model:
comment: AppBundle\Entity\Comment
thread: AppBundle\Entity\Thread

assetic:
bundles: [ "FOSCommentBundle" ]

fos_user:

registration:
    confirmation:
        enabled: true
        from_email:
            address: manjayk05@gmail.com
            sender_name: Demo registration

resetting:
    email:
        from_email:
            address:        tyontechnology@gmail.com
            sender_name:    Demo Resetting

service:
    mailer: fos_user.mailer.twig_swift
# registration:
#     form:
#         type: AppBundle\Form\RegistrationType

db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: AppBundle\Entity\User

Put parameters here that don't need to change on each machine where the app is deployed

https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration

parameters:
locale: en

framework:
#esi: ~
translator: { fallbacks: ["%locale%"] }
secret: '%secret%'
router:
resource: '%kernel.root_dir%/config/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
templating:
engines: ['twig']
default_locale: '%locale%'
trusted_hosts: ~
trusted_proxies: ~
session:
# handler_id set to null will use default session handler from php.ini
handler_id: ~
fragments: ~
http_method_override: true

Twig Configuration

twig:
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'

Assetic Configuration

assetic:
debug: '%kernel.debug%'
use_controller: false
bundles: []
#java: /usr/bin/java
filters:
cssrewrite: ~
#closure:
# jar: '%kernel.root_dir%/Resources/java/compiler.jar'
#yui_css:
# jar: '%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar'

Doctrine Configuration

doctrine:
dbal:
driver: pdo_mysql
host: 127.0.0.1
port: null
dbname: webfile
user: root
password: null
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: '%kernel.root_dir%/data/data.db3'
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
#path: '%database_path%'

orm:
    auto_generate_proxy_classes: '%kernel.debug%'
    naming_strategy: doctrine.orm.naming_strategy.underscore
    auto_mapping: true

Swiftmailer Configuration

swiftmailer:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }

@merk plz help me

XWB commented

Duplicate issue.