-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank page #3
Comments
Hey Mathias! Ok, so we basically just need to figure out why we're getting the blank page - that should never happen :). I need you to check a few things for me:
When you get a white screen, it's typically not because there's an exception in Symfony, but that there's a deeper, more fatal error (it could be within our Symfony code, of course, but probably isn't an exception). Because of this, Symfony's logs are probably not going to help us - we need to look at Apache's error log to see what the actual error is. If Let me know what you find out :). |
Here's a quick video that should hopefully answer all your questions |
Yes, the video was very helpful, but there's still nothing that's obvious. Typically, the white screen means you (a) have a PHP fatal error that's not showing (and your errors appear that they should be showing up), (b) you have a What's interesting with the logs that you posted earlier, is that you can see the correct route being matched, the controller being executed, a query being made, and the request finishing. It all looks perfect. Open up your Thanks! |
Hi ! |
Hi Mathias! Yes, so it looks like there is never an error at all. Can you go into your controller ( public function indexAction()
{
return new Symfony\Component\HttpFoundation\Response('Hello world!');
} And also verify that the template you're rendering has content in it. That may sound basic, but it really does look like your application is working just fine :). Cheers! |
Everything all right apparently ! |
Yes, I agree! Does your template have content in it? If so, try removing all of the content and replacing it with a simple "Hello world". Also, make sure there is content in your base layout (base.html.twig). Finally, if none of this shows anything, try using the return $this->render('EventBundle:Event:index.html.twig', array('entities' => $entities)); Cheers! |
And voilà ! Thank you very much for your help and for your time! |
Hey @mathias-strasser! I'm so glad you figured it out! Yes, the code in question was just "play" code from the last episode, but we never say explicitly to remove it (other people have left it there too). What's interesting is that it shouldn't have broken your code - both of those statements should have printed something, but not broken anything. So, I'll leave this issue open so that we can investigate :). Cheers! |
Hi,
I've juste buy the lesson 2.
I check my php.ini and if I go to the page app_dev.php, i've got "No route found for "GET /" ".
It does not work just on the pages that are supposed to work.
I don't know why but I've a blank page with this messages :
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2013-12-19 13:43:07] request.INFO: Matched route "event" (parameters: "_controller": "Yoda\EventBundle\Controller\EventController::indexAction", "_route": "event") [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener::injectLogger". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
[2013-12-19 13:43:07] doctrine.DEBUG: SELECT t0.id AS id1, t0.name AS name2, t0.imageName AS imageName3, t0.date AS date4, t0.location AS location5, t0.details AS details6 FROM yoda_event t0 [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onKernelTerminate". [] []
I've just beginning the first modification (firewalls) in security.yml, this to work, so I went to the second part (access_control) and then I got a blank page.
I returned with the original file and I still do not display, I do not understand.
Can you help me on what exactly happens?
The text was updated successfully, but these errors were encountered: