1

I am having trouble installing the bundle. I have followed the instruction in the document. I have successfully installed the package as I saw the vich folder created in the vendor folder. And I have created and put the vich_uploader.yaml file inside config/packages folder. However, when I got to the end of the second step here and ran the console clear cache command, I got the errors

In FileLoader.php line 166:

There is no extension able to load the configuration for "vich_uploader"... Looked for namespace "vich_uploader", found "framework", "web_server", "twig" , "sensio_framework_extra", "maker", "web_profiler", "monolog", "debug", "doctrine_cache", "doctrine", "doctrine_migrations", "security" in ...

In YamlFileLoader.php line 666:

There is no extension able to load the configuration for "vich_uploader"... Looked for namespace "vich_uploader", found "framework", "web_server", "twig" , "sensio_framework_extra", "maker", "web_profiler", "monolog", "debug", "doctrine_cache", "doctrine", "doctrine_migrations", "security"

When I removed that yaml file, everything works fine again.

reddy
  • 1,721
  • 3
  • 16
  • 26

2 Answers2

2

Add your bundle in config/bundles.php

return [
  ...
  Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true]
  ...
]

If you are using Symfony Flex, the bundle and config should be added automatically.

Iwan Wijaya
  • 2,077
  • 1
  • 16
  • 14
0

I figured out what's wrong with my problem. On my installation, there's an option asking me to install a recipe with the yellow warning sign next to it, so I thought it might be something and chose "no".

It works fine now after I reinstalled the package with that recipe.

reddy
  • 1,721
  • 3
  • 16
  • 26