FriendsOfSymfony / FOSUserBundle

Provides user management for your Symfony project. Compatible with Doctrine ORM & ODM, and custom storages.
https://symfony.com/doc/master/bundles/FOSUserBundle/index.html
MIT License
3.25k stars 1.57k forks source link

FOSUserBundle 2.0 related pages not showing debug toolbar #2555

Closed RodolVelasco closed 7 years ago

RodolVelasco commented 7 years ago

Symfony FOSUserBundle versions:

composer info

behat/transliterator                 v1.1.0  String transliterator
composer/ca-bundle                   1.0.7   Lets you find a path to the system CA bundle, and includes a fallba...
doctrine/annotations                 v1.4.0  Docblock Annotations Parser
doctrine/cache                       v1.6.1  Caching library offering an object-oriented API for many cache back...
doctrine/collections                 v1.4.0  Collections Abstraction library
doctrine/common                      v2.7.2  Common Library for Doctrine projects
doctrine/dbal                        v2.5.12 Database Abstraction Layer
doctrine/doctrine-bundle             1.6.7   Symfony DoctrineBundle
doctrine/doctrine-cache-bundle       1.3.0   Symfony Bundle for Doctrine Cache
doctrine/inflector                   v1.1.0  Common String Manipulations with regard to casing and singular/plur...
doctrine/instantiator                1.0.5   A small, lightweight utility to instantiate objects in PHP without ...
doctrine/lexer                       v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive De...
doctrine/orm                         v2.5.6  Object-Relational-Mapper for PHP
egeloen/ckeditor-bundle              5.0.1   Provides a CKEditor integration for your Symfony2 Project.
egeloen/json-builder                 3.0.0   JSON builder with escaping control for PHP 5.6+
friendsofsymfony/user-bundle         v2.0.0  Symfony FOSUserBundle
gedmo/doctrine-extensions            v2.4.28 Doctrine2 behavioral extensions
incenteev/composer-parameter-handler v2.1.2  Composer script handling your ignored parameter file
ircmaxell/password-compat            v1.0.4  A compatibility library for the proposed simplified password hashin...
javiereguiluz/easyadmin-bundle       v1.16.9 Admin generator for Symfony applications
jdorn/sql-formatter                  v1.2.17 a PHP SQL highlighting library
jms/aop-bundle                       1.1.0   Adds AOP capabilities to Symfony2
jms/cg                               1.2.0   Toolset for generating PHP code
jms/di-extra-bundle                  1.4.0   Allows to configure dependency injection using annotations
jms/metadata                         1.6.0   Class/method/property metadata management in PHP
jms/parser-lib                       1.0.0   A library for easily creating recursive-descent parsers.
jms/security-extra-bundle            1.5.2   Enhances the Symfony2 Security Component by adding several new feat...
knplabs/knp-snappy                   0.4.3   PHP5 library allowing thumbnail, snapshot or PDF generation from a ...
knplabs/knp-snappy-bundle            v1.4    Easily create PDF and images in Symfony2 by converting Twig/HTML te...
kriswallsmith/assetic                v1.4.0  Asset Management for PHP
lexik/form-filter-bundle             v5.0.4  This bundle aim to provide classes to build some form filters and t...
liuggio/ExcelBundle                  v2.1.0  This is a Symfony2 Bundle helps you to read and write Excel files (...
monolog/monolog                      1.22.1  Sends your logs to files, sockets, inboxes, databases and various w...
pagerfanta/pagerfanta                v1.0.5  Pagination for PHP 5.3
paragonie/random_compat              v2.0.10 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
petkopara/crud-generator-bundle      v3.0.5  Symfony3 bundle for CRUD generation with pagination, filtering, sor...
petkopara/multi-search-bundle        v1.0.0  Symfony3 bundle that provides multi search doctrine query builder f...
phpoffice/phpexcel                   1.8.1   PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents i...
phpoption/phpoption                  1.5.0   Option Type for PHP
psr/log                              1.0.2   Common interface for logging libraries
sensio/distribution-bundle           v5.0.20 Base bundle for Symfony Distributions
sensio/framework-extra-bundle        v3.0.26 This bundle provides a way to configure your controllers with annot...
sensio/generator-bundle              v3.1.4  This bundle generates code for you
sensiolabs/security-checker          v4.0.4  A security checker for your composer.lock
stof/doctrine-extensions-bundle      v1.2.2  Integration of the gedmo/doctrine-extensions with Symfony2
swiftmailer/swiftmailer              v5.4.8  Swiftmailer, free feature-rich PHP mailer
symfony/assetic-bundle               v2.8.1  Integrates Assetic into Symfony2
symfony/monolog-bundle               v3.1.0  Symfony MonologBundle
symfony/phpunit-bridge               v2.8.20 Symfony PHPUnit Bridge
symfony/polyfill-apcu                v1.3.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu            v1.3.0  Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring            v1.3.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php54               v1.3.0  Symfony polyfill backporting some PHP 5.4+ features to lower PHP ve...
symfony/polyfill-php55               v1.3.0  Symfony polyfill backporting some PHP 5.5+ features to lower PHP ve...
symfony/polyfill-php56               v1.3.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP ve...
symfony/polyfill-php70               v1.3.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP ve...
symfony/polyfill-util                v1.3.0  Symfony utilities for portability of PHP codes
symfony/security-acl                 v3.0.0  Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle           v2.5.4  Symfony SwiftmailerBundle
symfony/symfony                      v2.8.20 The Symfony PHP framework
twig/extensions                      v1.4.1  Common additional features for Twig that do not directly belong in ...
twig/twig                            v1.33.2 Twig, the flexible, fast, and secure template language for PHP
vich/uploader-bundle                 v0.14.0 Ease file uploads attached to entities

Description of the problem including expected versus actual behavior: Everything works fine but I can't see the debug toolbar in every page related to FOSUserBundle, these are: forgot password, login and register. I have tried everything

Steps to reproduce:

  1. Load page "http://localhost/dropbox/fortuna/web/app_dev.php/login
  2. or load "http://localhost/dropbox/fortuna/web/app_dev.php/resetting/request"
  3. or load "http://localhost/dropbox/fortuna/web/app_dev.php/register/"

Provide logs (if relevant):

[2017-05-17 17:15:55] php.INFO: The class "JMS\DiExtraBundle\Config\FastDirectoriesResource" is performing resource checking through ResourceInterface::isFresh(), which is deprecated since 2.8 and will be removed in 3.0 {"type":16384,"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"function":"trigger_error"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ResourceCheckerConfigCache.php","line":113,"function":"isFresh","class":"Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ConfigCache.php","line":77,"function":"isFresh","class":"Symfony\\Component\\Config\\ResourceCheckerConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":512,"function":"isFresh","class":"Symfony\\Component\\Config\\ConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":133,"function":"initializeContainer","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":182,"function":"boot","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\web\\app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-05-17 17:15:55] request.INFO: Matched route "fos_user_security_login". {"route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::loginAction","_route":"fos_user_security_login"},"request_uri":"http://localhost/dropbox/fortuna/web/app_dev.php/login"} []
[2017-05-17 17:15:55] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-05-17 17:15:56] php.INFO: The class "JMS\DiExtraBundle\Config\FastDirectoriesResource" is performing resource checking through ResourceInterface::isFresh(), which is deprecated since 2.8 and will be removed in 3.0 {"type":16384,"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"function":"trigger_error"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ResourceCheckerConfigCache.php","line":113,"function":"isFresh","class":"Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ConfigCache.php","line":77,"function":"isFresh","class":"Symfony\\Component\\Config\\ResourceCheckerConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":512,"function":"isFresh","class":"Symfony\\Component\\Config\\ConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":133,"function":"initializeContainer","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":182,"function":"boot","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\web\\app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-05-17 17:15:56] request.INFO: Matched route "_wdt". {"route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"139c5a","_route":"_wdt"},"request_uri":"http://localhost/dropbox/fortuna/web/app_dev.php/_wdt/139c5a"} []
[2017-05-17 17:15:56] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2017-05-17 17:15:56] security.DEBUG: Access denied, the user is not fully authenticated; redirecting to authentication entry point. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied. at C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Security\\Http\\Firewall\\AccessListener.php:70)"} []
[2017-05-17 17:15:56] security.DEBUG: Calling Authentication entry point. [] []
[2017-05-17 17:15:57] php.INFO: The class "JMS\DiExtraBundle\Config\FastDirectoriesResource" is performing resource checking through ResourceInterface::isFresh(), which is deprecated since 2.8 and will be removed in 3.0 {"type":16384,"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"level":28928,"stack":[{"function":"handleError","class":"Symfony\\Component\\Debug\\ErrorHandler","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker.php","line":32,"function":"trigger_error"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ResourceCheckerConfigCache.php","line":113,"function":"isFresh","class":"Symfony\\Component\\Config\\Resource\\BCResourceInterfaceChecker","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Config\\ConfigCache.php","line":77,"function":"isFresh","class":"Symfony\\Component\\Config\\ResourceCheckerConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":512,"function":"isFresh","class":"Symfony\\Component\\Config\\ConfigCache","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":133,"function":"initializeContainer","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\Kernel.php","line":182,"function":"boot","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"},{"file":"C:\\Dropbox\\Apache Xampp\\fortuna\\web\\app_dev.php","line":28,"function":"handle","class":"Symfony\\Component\\HttpKernel\\Kernel","type":"->"}]} []
[2017-05-17 17:15:57] request.INFO: Matched route "fos_user_security_login". {"route_parameters":{"_controller":"FOS\\UserBundle\\Controller\\SecurityController::loginAction","_route":"fos_user_security_login"},"request_uri":"http://localhost/dropbox/fortuna/web/app_dev.php/login"} []
[2017-05-17 17:15:57] security.INFO: Populated the TokenStorage with an anonymous Token. [] []

Describe the feature: I just need the debug bar to be shown. Every other route/controller/twig that is not related to FOSUserBundle shows the debug toolbar.

I have tried the most simple response in order to show the toolbar but It doesn't work. Something like new Response("Hi!"); overwritten in controller/security inside vendor/friendofsymfony ...

Any idea!?

RodolVelasco commented 7 years ago

I found the solution. I had to add this code in security.yml inside firewalls

dev:
      pattern:  ^/(_(profiler|wdt)|css|images|js)/
      security: false