avanzu / AdminThemeBundle

Admin Theme based on the AdminLTE Template for easy integration into symfony
MIT License
281 stars 149 forks source link

The file "services.xml" does not exist #176

Closed bguilz closed 6 years ago

bguilz commented 6 years ago

Since I made an update of this package, I have errors:

First :

Undefined index: options
in AvanzuAdminThemeExtension.php line 60

So, I added (config.yml):

avanzu_admin_theme:
   options: ~

Second :

[InvalidArgumentException]
The file "services.xml" does not exist (in: /var/www/odysee/symfony/vendor/avanzu/admin-theme-bundle/DependencyInjection/../Resources/config).

at XmlFileLoader->load('services.xml') in AvanzuAdminThemeExtension.php line 66

I don't find the services.xml file (it disappeared). Why ? Tell me, what can I do to fix it ?

shakaran commented 6 years ago

@bguilz not sure if you are using master or the prerelease 2.0.0-beta.6 (take in mind that this is a pre-release, not ready for production). For production you should use version 1.3. Also Symfony 3.3 and Symfony 3.4 use services.yaml or services.yml files. Let me know if with last master if you have the same issues

MehGokalp commented 6 years ago

The reason for this error, the thrown exception in this line isn't instance of FileLocatorFileNotFoundException (actually i don't know which instance of exception it returns), but practically if you change the instance FileLocatorFileNotFoundException to \Exception in, here and here it won't crash your deployment. Also it's why @shark3 changes the instance of exceptions in this pull request.

shakaran commented 6 years ago

@MehGokalp pushed a commit https://github.com/avanzu/AdminThemeBundle/commit/ed309d2ad4599c139f6151b853c2982e7096675a let me know if that works fine for you

shakaran commented 6 years ago

@MehGokalp waiting your feedback to close or advance in this issue if something is still pending, thanks!

MehGokalp commented 6 years ago

I haven’t tested yet this update but i did the same thing to solve this bug. Also i commented some things that you should do. Thanks

shakaran commented 6 years ago

@MehGokalp @bguilz let me know if you can test the update with dev-master so this issue could be closed if it is all fixed. Thanks

shakaran commented 6 years ago

It seems that nobody has this issue again. I gonna close it. If someone detect the problem in future, please reopen this issue, Thanks!