Closed ghost closed 7 years ago
Comment by @j0nem June 22nd, 2017, 23:10 GMT
I have a similar issue with an empty url_suffix
, but for some reason the 404 alert only occurs if a frontend user is logged in, otherwise everything remains correct. Also I don't get the error posted above when opening the profiler, but simply a message that the token of the request was not found in the database. However, in another setup with empty url_suffix
everything works.
Comment by @fritzmg June 23rd, 2017, 10:31 GMT
Presumably this happens because in the standard-edition the contao_catch_all
route is registered after the _profiler
route while in the managed-edition it may not be registered after. This is the debug:router
output in both editions:
Contao Standard Edition:
$ php bin/console debug:router
-------------------------- -------- -------- ------ -----------------------------------
Name Method Scheme Host Path
-------------------------- -------- -------- ------ -----------------------------------
_wdt ANY ANY ANY /_wdt/{token}
_profiler_home ANY ANY ANY /_profiler/
_profiler_search ANY ANY ANY /_profiler/search
_profiler_search_bar ANY ANY ANY /_profiler/search_bar
_profiler_info ANY ANY ANY /_profiler/info/{about}
_profiler_phpinfo ANY ANY ANY /_profiler/phpinfo
_profiler_search_results ANY ANY ANY /_profiler/{token}/search/results
_profiler_open_file ANY ANY ANY /_profiler/open
_profiler ANY ANY ANY /_profiler/{token}
_profiler_router ANY ANY ANY /_profiler/{token}/router
_profiler_exception ANY ANY ANY /_profiler/{token}/exception
_profiler_exception_css ANY ANY ANY /_profiler/{token}/exception.css
contao_install ANY ANY ANY /contao/install
contao_backend ANY ANY ANY /contao
contao_backend_login ANY ANY ANY /contao/login
contao_backend_password ANY ANY ANY /contao/password
contao_backend_preview ANY ANY ANY /contao/preview
contao_backend_confirm ANY ANY ANY /contao/confirm
contao_backend_file ANY ANY ANY /contao/file
contao_backend_help ANY ANY ANY /contao/help
contao_backend_page ANY ANY ANY /contao/page
contao_backend_popup ANY ANY ANY /contao/popup
contao_backend_switch ANY ANY ANY /contao/switch
contao_backend_alerts ANY ANY ANY /contao/alerts
contao_backend_picker ANY ANY ANY /_contao/picker
contao_frontend_cron ANY ANY ANY /_contao/cron
contao_frontend_share ANY ANY ANY /_contao/share
contao_initialize ANY ANY ANY /_contao/initialize
contao_backend_redirect ANY ANY ANY /contao/
contao_frontend ANY ANY ANY /{alias}.html
contao_index ANY ANY ANY /
contao_root ANY ANY ANY /
contao_catch_all ANY ANY ANY /{_url_fragment}
-------------------------- -------- -------- ------ -----------------------------------
Contao Managed Edition:
$ vendor/bin/contao-console debug:router -e=dev
-------------------------- -------- -------- ------ -----------------------------------
Name Method Scheme Host Path
-------------------------- -------- -------- ------ -----------------------------------
contao_install ANY ANY ANY /contao/install
contao_backend ANY ANY ANY /contao
contao_backend_login ANY ANY ANY /contao/login
contao_backend_password ANY ANY ANY /contao/password
contao_backend_preview ANY ANY ANY /contao/preview
contao_backend_confirm ANY ANY ANY /contao/confirm
contao_backend_file ANY ANY ANY /contao/file
contao_backend_help ANY ANY ANY /contao/help
contao_backend_page ANY ANY ANY /contao/page
contao_backend_popup ANY ANY ANY /contao/popup
contao_backend_switch ANY ANY ANY /contao/switch
contao_backend_alerts ANY ANY ANY /contao/alerts
contao_backend_picker ANY ANY ANY /_contao/picker
contao_frontend_cron ANY ANY ANY /_contao/cron
contao_frontend_share ANY ANY ANY /_contao/share
contao_initialize ANY ANY ANY /_contao/initialize
contao_backend_redirect ANY ANY ANY /contao/
contao_frontend ANY ANY ANY /{alias}.html
contao_index ANY ANY ANY /
contao_root ANY ANY ANY /
_wdt ANY ANY ANY /_wdt/{token}
_profiler_home ANY ANY ANY /_profiler/
_profiler_search ANY ANY ANY /_profiler/search
_profiler_search_bar ANY ANY ANY /_profiler/search_bar
_profiler_info ANY ANY ANY /_profiler/info/{about}
_profiler_phpinfo ANY ANY ANY /_profiler/phpinfo
_profiler_search_results ANY ANY ANY /_profiler/{token}/search/results
_profiler_open_file ANY ANY ANY /_profiler/open
_profiler ANY ANY ANY /_profiler/{token}
_profiler_router ANY ANY ANY /_profiler/{token}/router
_profiler_exception ANY ANY ANY /_profiler/{token}/exception
_profiler_exception_css ANY ANY ANY /_profiler/{token}/exception.css
contao_install_redirect ANY ANY ANY /install.php
contao_catch_all ANY ANY ANY /{_url_fragment}
-------------------------- -------- -------- ------ -----------------------------------
As expected, the _profiler
routes are registered after the contao routes in the managed-edition
.
Should be fixed with 2a726c61b146f496709fe2b80008749d52df53a0
Issue by @fritzmg June 22nd, 2017, 19:30 GMT
Tested in Contao
managed-edition
4.4.0
.app/config/config.yml
:domain.org/app_dev.php
The Symfony debug bar will not be visible. After a while you will see the following alert:
If you open the profiler, an exception will be visible:
I am assuming this happens because without an
url_suffix
the/_profiler/307a90
URL is catched by Contao and treated as a regular page URL (which can then not be found).