I have a problem with my project, I can't load my controller in my CoreBundle, but I manage it with Composer for updating easily in production server.
All code is on my github : https://github.com/super-vizor.
Supervizor (the main app) call CoreBundle by composer, but after update, during cache clear process, it gives an error:
"The file "../Controller" does not exist (in:
D:\Supervizor\supervizor\vendor\super-vizor\corebundle\DependencyInjection/../Resources/config)."
Why am I getting this error? How can I load my controller ?
Thanks for the response in advance and sorry for my English I'm French.
Related
I installed SonataClassificationBundle and extend it on my App\Application folder. The documentation on the official website isn't clear Classification Bundle
I corrected all namespaces to point into my extended bundle. I cleared the cache without error and I run the server.
When I log into the profile, I get this exception :
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_app_sonataclassificationcategory_create" as such route does not exist.").
There is my sonata_classification:
sonata_classification:
class:
category: App\Application\Sonata\ClassificationBundle\Entity\Category
collection: App\Application\Sonata\ClassificationBundle\Entity\Collection
context: App\Application\Sonata\ClassificationBundle\Entity\Context
tag: App\Application\Sonata\ClassificationBundle\Entity\Tag
I detected the same problem with SonataUserBundle, but after promoting my user to ROLE_ADMIN, the problem was solved.
Can someone help?
Thank you
Solved again.
I just run :
composer update
When I move project to live server getting this error .This error is on concrete 5..
Whoops \ Exception \ ErrorException (E_ERROR) Class '\Application\Block\ParallaxSection\Controller' not found
It looks like you had a block in the overrides directory (/applications/blocks/parralax_section) but it's not there now?
Maybe you converted it to a package, but used the same database where you had installed it via the override directory?
Whatever the case, I'd say find the block folder and throw it in that directory, or worst case scenario just stub out a block folder called parallax_section with a controller that doesn't do anything, and that would make it not explode at the least.
Why every single time I generate a curd for some entity , every thing works right except for last action which is updating routing file. I always get this :
Generating the CRUD code: OK Confirm automatic update of the Routing
[yes]? Importing the CRUD routes: FAILED
The command was not able to configure everything automatically.
You must do the following changes manually.
Import the bundle's routing resource in the bundle routing file ....
I know that I can do it manually as the message suggests but I want to understand why it Fails ?
i'm creating a bundle that adds an entity and a few routes to be use in a Symfony2 application.
I want my bundle to be used as a vendor, so I've created all the files, published it on GitHub and packagist and everything works fine.
My problem is now when I require the bundle in another project, my entities and my routes are not detected:
1) php app/console doctrine:schema:update doesn't detect any modification
2) When I try to hit a GET route from the vendor, here is the error I get:
No route found for "GET ..."
Any idea is welcome, what's the process to really do these things in a bundle?
Cheers.
Cyril
Take a look at the installation steps of the FOSUserBundle for example. Everyone who uses your published bundle, have to activate it in the appkernel and import the routes. For the entity I think the bundle user have also to subclass the entity.
Should be simple enough. Everything works in my local environment, but not on my prod server (neither prod nor dev environment). I get an error that the FOS template cannot be found:
Unable to find template "FOSUserBundle::layout.html.twig".
My code is simple:
{% extends "FOSUserBundle::layout.html.twig" %}
I'm going from my local Windows machine to a Linux box. I've read case sensitivity might be the culprit, but it doesn't seem like it.
The FOS bundle is in the normal place: vendor/friendsofsymfony/user-bundle/FOS/UserBundle.
I'm having trouble diagnosing - any ideas? Did things get screwed up when I FTPd? Permissions issues? What are the common gotchas? I'm desparate!
Update: A clue. I ran assetic:dump and got
[RuntimeException]
".../app/Resources/FOSUserBundle/views/layout.html.twig" resource is hidden by a
resource from the "*******Bundle" derived bundle. Create a
".../app/Resources/*******Bundle/views/layout.html.twig" file to override the bundle
resource.
This question seems relevant.
Another update: I was using getParent() in my own bundle to override the templates. I switched to the first method in the docs but now the templates in app/resources simply aren't having an effect. It's going straight to the default form template with a white background.
Any ideas?
It was a upper/lower case/namespacing thing. I thought my local files were in sync with remotes but they were not.
Just check your whole directory & all namespaces in the FOS bundle!
I also encountered the problem and "solved" it by renaming my layout.html.twig inside my bundle's Resources/views folder to bundle-layout.html.twig and adapting my templates accordingly.
I resolved the resource is hidden by a resource error by moving the template in the good bundle extension.
Specifically from app/Resources/FOSUSerBundle/views/ChangePassword
to src/Application/Sonata/UserBundle/Resources/views/ChangePassword
I confounded FOSUser & SonataUser.