Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Profiler data lost for the master request in 3.3 #23235

Copy link
Copy link
Closed
@1ed

Description

@1ed
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version >=3.3.1

If I have a deprecation message (I just suppose to related to this) and a sub-request the profiler data related to the master request is not saved to the storage thus I get a 404 by WDT.

It works if I remove the sub-request or with Symfony 3.3.0, but not in 3.3.1 or 3.3.2.

Steps to reproduce:

  1. Create a new symfony project
$ symfon new blog
  1. Apply this patch
From d4b4d86174e6f4a1b448823092bbf13f3f81865c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Egyed?= <egyed.gabor@mentha.hu>
Date: Tue, 20 Jun 2017 15:40:40 +0200
Subject: [PATCH] Bug - profile not saved

---
 app/Resources/views/base.html.twig             |  2 ++
 app/Resources/views/default/index.html.twig    | 10 ++++++++++
 src/AppBundle/Controller/DefaultController.php |  9 +++++++++
 3 files changed, 21 insertions(+)

diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig
index bafd28d..76fd501 100644
--- a/app/Resources/views/base.html.twig
+++ b/app/Resources/views/base.html.twig
@@ -9,5 +9,7 @@
     <body>
         {% block body %}{% endblock %}
         {% block javascripts %}{% endblock %}
+        {% block does_not_exist_but_works %}{% endblock %}
+        {{ block('deprecated') }}
     </body>
 </html>
diff --git a/app/Resources/views/default/index.html.twig b/app/Resources/views/default/index.html.twig
index c720409..c407a1a 100644
--- a/app/Resources/views/default/index.html.twig
+++ b/app/Resources/views/default/index.html.twig
@@ -44,6 +44,16 @@
 
         </div>
     </div>
+
+{# 
+
+    if I add this empty bock it works
+    
+    {% block deprecated %}{% endblock %}
+#}
+
+    {# if I remove the subrequest it works #}
+    {{ render(controller('AppBundle:Default:embedded')) }}
 {% endblock %}
 
 {% block stylesheets %}
diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php
index cecd334..0cdb2b2 100644
--- a/src/AppBundle/Controller/DefaultController.php
+++ b/src/AppBundle/Controller/DefaultController.php
@@ -5,6 +5,7 @@ namespace AppBundle\Controller;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
 
 class DefaultController extends Controller
 {
@@ -18,4 +19,12 @@ class DefaultController extends Controller
             'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,
         ]);
     }
+
+    /**
+     * @Route("/embedded", name="embedded")
+     */
+    public function embeddedAction(Request $request)
+    {
+        return new Response('');
+    }
 }
-- 
2.7.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.