I've created an entity with generate:doctrine:entity and its controller too with generate:doctrine:crud.
All works well on local, but on the server I receive this error:
request.CRITICAL: Uncaught PHP Exception InvalidArgumentException:
"Unable to find template "entity/index.html.twig"
And the error is right, as there is no template for the entity and its actions.
But my question is: why on local Symfony "guesses" the template and anyway arranges a page while on remote it doesn't?
This error should appear also on local, why it isn't?
Related
I am using doctrine in my ZF project and when I run it I get the exception.
Exception message: Unable to resolve plugin "doctrine"; no
corresponding plugin with that name
Ran into a strange problem - after submitting a form via POST with enctype="multipart/form-data", Doctrine crashes with Fatal Error:
Fatal error: require(): Failed opening required '[PATH/TO/DOCTRINE]/Doctrine\Symfony\Component\HttpFoundation\File\UploadedFile.php' (include_path='.;H:\SERVER\php\PEAR') in [PATH/TO/DOCTRINE]\Doctrine\Common\ClassLoader.class.php on line 164
I don't use Symfony, but I use the Symfony HTTPFoundation and Doctrine separately. And it seems that the error happens when the code calls:
\Symfony\Component\HttpFoundation\Request::createFromGlobals();
I don't understand what does Doctrine have to do with this line...
UPD.
It wasn't autoloading the contents of Symfony HTTPFoundation "File" folder from HTTP Component, so once that was fixed it started working.
But why it was trying to access it via Doctrine Symfony component is still a mystery to me.
I have a Symfony2 (2.6) application and now and then I get "critical errors" as the following one:
Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown
during the rendering of a template ("Circular reference detected when
adding a fallback catalogue for locale "".") in
"AcmeBundle:Content:home.html.twig" at line 2." at /home/acme/acme/app
/cache/prod/classes.php.cache line 5176
After doing some research/debugging I found out, that whenever someone calls the app with an invalid locale (=> http://acme.com/invalidLocale/ instead of http://acme.com/en/ => only "en" and "de" are allowed) Symfony creates a MessageCatalogue in the cache directory (app/cache/prod/translations). Then the app renders the page properly with the fallback locale (en).
Calling the app a second time with the same "invalid/undefined" locale causes the above mentioned error, renders an Error500 page and sends me the mentioned email.
Does anyone know what's wrong?
I would either expect a 404 error already on the first call, or a 301-redirect to the fallback locale "en", but not an 500 error.
Thanx for you help!
Cheers,
d.
Fatal error: Uncaught exception '`Zend\ModuleManager\Exception\InvalidArgumentException' with message 'Zend\ModuleManager\ModuleEvent::setModuleName expects a string as an argument; integer provided' in C:\wamp\www\zf2-tutorial\vendor\zendframework\zend-modulemanager\src\ModuleEvent.php on line 64***
I'm new to Zend and trying the Skeleton application exercise
On attempting to load http://zf2-tutorial.localhost/album I was getting error
404 -"The requested URL could not be matched by routing".***
So I then followed some suggestions on Stackoverflow and it seems to have messed things up altogether for me.
One suggestion was to put die('here'); in the indexAction to see what error shows up. So I tried it, got the above error and then deleted the same line again from indexAction.
However the same error persists and I am unable to resolve it. I'm using WAMP on Windows 8.
To try to resolve it I cleared the DNS cache, cleared browser history and cookies, restarted all services, rebooted, refreshed WAMP...but still the same. Any Ideas please?
I'm new to cakePHP and I've been having real difficulty getting it working on my free aws account. I first tried setting up LAMP on my own, but gave up and am now trying to use the bitnami LAMP stack:
https://aws.amazon.com/amis/bitnami-lapp-stack-5-4-13-1-64-bit-ubuntu-12-04
Anyways, that seemed to work, and I was following the cakePHP Blogs tutorial:
http://book.cakephp.org/2.0/en/getting-started.html
I got the mySQL database and tables all set up, and just to test I went to the cakePHP dir:
http://[my amazon instance].compute-1.amazonaws.com/cakephp/
Page loads up with no problems.
But if I reload that page, I get an error:
PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify an existing static method (class 'App' does not have a method 'load')' in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php:133\nStack trace:\n#0 /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php(133): spl_autoload_register(Array)\n#1 /opt/bitnami/frameworks/cakephp/app/webroot/index.php(77): include('/opt/bitnami/fr...')\n#2 {main}\n thrown in /opt/bitnami/frameworks/cakephp/lib/Cake/bootstrap.php on line 133
At that point, nothing to do but restart apache. Once again the page shows up one time, then reload and it errors as above.
Halp!