phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

Update to 2.12 breaks Symfony debug toolbar

Open jirikmik opened this issue 2 years ago • 11 comments

Hello,

after update to 2.12 debug toolbar stopped work with message

An error occurred while loading the web debug toolbar. Open the web profiler.

After click it shows:

The profiler template "@Doctrine/Collector/db.html.twig" for data collector "db" does not exist.

Symfony 7.0.8 and 7.1.0.

How to solve? Thanks

jirikmik avatar Jun 05 '24 10:06 jirikmik

I cannot reproduce that. Works fine for me on Symfony 7.0.8.

Can you list your doctrine/* and symfony/* composer dependencies?

And one more thing: So this fails for you? bin/console debug:twig @Doctrine/Collector/db.html.twig?

dmaicher avatar Jun 05 '24 10:06 dmaicher

Yes, after upgrade to 2.12 it fails:

Matched File
------------
 Template name "@Doctrine/Collector/db.html.twig" not found

Configured Paths
----------------
 ----------- --------------------------------------------------
  Namespace   Paths
 ----------- --------------------------------------------------
  @Doctrine   vendor/doctrine/doctrine-bundle/Resources/views/
 ----------- --------------------------------------------------

jirikmik avatar Jun 05 '24 11:06 jirikmik

Excuse me, list of dependencies: dependencies.txt

jirikmik avatar Jun 05 '24 11:06 jirikmik

Yes, after upgrade to 2.12 it fails:

Matched File
------------
 Template name "@Doctrine/Collector/db.html.twig" not found

Configured Paths
----------------
 ----------- --------------------------------------------------
  Namespace   Paths
 ----------- --------------------------------------------------
  @Doctrine   vendor/doctrine/doctrine-bundle/Resources/views/
 ----------- --------------------------------------------------

Hm strange. It should be using the new directory structure. Here my output

Matched File
------------

                                                                                                                        
 [OK] vendor/doctrine/doctrine-bundle/templates/Collector/db.html.twig                                                  
                                                                                                                        

Configured Paths
----------------

 ----------- -------------------------------------------- 
  Namespace   Paths                                       
 ----------- -------------------------------------------- 
  @Doctrine   vendor/doctrine/doctrine-bundle/templates/  
 ----------- -------------------------------------------- 

@ostrolucky any idea? :thinking:

dmaicher avatar Jun 05 '24 11:06 dmaicher

@jirikmik did you try to completely purge your cache? like rm -rf var/cache/*?

dmaicher avatar Jun 05 '24 11:06 dmaicher

Ah yeah, this looks like a stale cache

ostrolucky avatar Jun 05 '24 12:06 ostrolucky

A did clean only dev cache but now I removed whole cache dir with rm -fvr command and it is does not help.

jirikmik avatar Jun 05 '24 13:06 jirikmik

I think we will need a self contained reproducer for this :/

ostrolucky avatar Jun 05 '24 14:06 ostrolucky

Sorry, I am new here - what does it mean for me?

jirikmik avatar Jun 05 '24 14:06 jirikmik

Eg. a ZIP file or a link to repository which contains a project where we can just do composer install and run bin/console and it will show us the error you experience

ostrolucky avatar Jun 05 '24 14:06 ostrolucky

During preparing data I have found that completely remove and than resync vendor directory solved this problem. Three projects (6.4, 7.0, 7,1) and two different webservers... I am developing in PhpStorm on Windows and also composer I am running on my pc and than synchronize changes with PhpStorms Diff. Same tool I used for new upload of vendor directory. Thanks to everybody for help.

jirikmik avatar Jun 11 '24 16:06 jirikmik