Closed HecFranco closed 4 years ago
Thank you for the report @HecFranco! Could you please update the description using the issue template?
Maybe the problem is related to the absence of an entity registered under a Doctrine manager. I think you should check this configuration in your example.
You could extend a little more the @phansys answer, I don't understand you, the entity I think is declared. I don't know exactly what you want to tell me.
I mean, you should check the configuration for Doctrine ORM (ref.):
doctrine:
orm:
entity_managers:
default:
mappings:
ApplicationSonataMediaBundle: ~
SonataMediaBundle: ~
If you need more information than the provided in the docs or if you found some steps that are not working as expected, please check the DoctrineBundle configuration or follow the instructions at "Support" section to get support.
Thank you so much.
Thanks for the @phansys answer, I've also tried that configuration you told me about, but it didn't work either. Do you know of any sonata sandbox for symfony 4 that works well?
@phansys I checked the configuration again, including what you said and I get the same error (I leave here the repo: https://github.com/HecFranco/sonata-complete-bundle)
I have this same bug, what can we do to fix it?
Looks like you should define the category under sonata_media.class
.
I had the same problem and I solved it by adding this into sonata_classification.yaml:
media: App\Application\Sonata\MediaBundle\Entity\Media
Also put into sonata_media.yaml:
category: App\Application\Sonata\ClassificationBundle\Entity\Category
I found the solution in official documentation.
Looks like you should define the category under
sonata_media.class
.
Thanks, this fixed it for me.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Environment
Sonata packages
Symfony packages
PHP version
Subject
I have this mistake: "The target-entity Application\Sonata\MediaBundle\Entity\Media cannot be found in 'App\Appl
ication\Sonata\ClassificationBundle\Entity\Category#media'.".
Steps to reproduce
I followed the installation instructions of the official documentation and when launching the server I found that error inside the media option. I try to update the database and the console says to me:
I have the demo uploaded on my github : https://github.com/HecFranco/Sonata-project-complete-demo.
Expected results
Update the database and be able to launch the server correctly.
Actual results
The target-entity Application\Sonata\MediaBundle\Entity\Media cannot be found in 'App\Application\Sonata\ClassificationBundle\Entity\Category#media'.