Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

debug_request=1 not showing template names


Go to End


6 Posts   2162 Views

Avatar
Gurvinder

Community Member, 4 Posts

20 June 2014 at 10:04am

Edited: 20/06/2014 10:10am

Hi there
I have installed Silverstripe version 3.1.5. I have turned on dev mode in site and have done flush as well. Now when i am passing url debug parameter debug_request=1 with http url, system is only showing limited information. So when i enter url http://localhost/ss1?debug_request=1 in browser I am getting following debug information

Debug (line 250 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on Page_Controller
Debug (line 258 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on Page_Controller. Latest request params: array ( 'Action' => NULL, 'ID' => NULL, 'OtherID' => NULL, )
Debug (line 184 of RequestHandler.php): Action not set; using default action method name 'index'

Now Why it is not showing all templates names and template names used with include keyword.

I have used Silverstripe version 2.4 and in that version when i pass debug_request=1 with url, It show all debug information with templates selected for rendering pages.

Am i missing any configuration because as per documentation it say debug_request=1 Show all steps of the request from initial HTTPRequest to Controller to Template Rendering.

So in this version why i am not getting template names with paths in output

Avatar
Gurvinder

Community Member, 4 Posts

20 June 2014 at 8:16pm

Well I can see that question has been viewed 20 times. Can anyone help ?

Avatar
micmania1

Community Member, 9 Posts

21 June 2014 at 2:04am

?debug_request=1 doesn't show templates

You're thinking of ?showtemplate=1

Here's a list of url variables: http://doc.silverstripe.org/framework/en/reference/urlvariabletools

Avatar
Gurvinder

Community Member, 4 Posts

21 June 2014 at 2:30am

Hello there

I am aware of showtemplate variable which shows you the compiled template and their names. In you download any older version silverstripe or using old version you will find that when using debug_request=1, It shows all steps of the request from initial HTTPRequest to Controller to Template Rendering.
For example for URL http://localhost/silverstripe-v2.4.5/?debug_request=1 you get following result

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with '' on Page_Controller

Debug (line 119 of RequestHandler.php): Testing 'widget/$ID/$Action' with '' on Page_Controller

Debug (line 119 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on Page_Controller

Debug (line 128 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on Page_Controller. Latest request params: array (
'Action' => NULL,
'ID' => NULL,
'OtherID' => NULL,
)
Debug (line 167 of SSViewer.php): Selecting templates from the following list: Page, ContentController
Debug (line 181 of SSViewer.php): Found template 'Page' from main theme 'blackcandy': array (
'Layout' => '/var/www/silverstripe-v2.4.5/themes/blackcandy/templates/Layout/Page.ss',
'main' => '/var/www/silverstripe-v2.4.5/themes/blackcandy/templates/Page.ss',
)
Debug (line 191 of SSViewer.php): Found template 'ContentController' from main template archive, containing the following items: array (
'main' => '/var/www/silverstripe-v2.4.5/sapphire/templates/ContentController.ss',
)
Debug (line 202 of SSViewer.php): Final template selections made: array (
'main' => '/var/www/silverstripe-v2.4.5/themes/blackcandy/templates/Page.ss',
'Layout' => '/var/www/silverstripe-v2.4.5/themes/blackcandy/templates/Layout/Page.ss',
)

So you can see names of templates system is calling for rendering.

Now If you do the same thing in new Silverstripe version 3 for URL http://localhost/ss-cms/?debug_request=1 It does not show templates selected for compilation.
Following is the response i get.

Debug (line 250 of RequestHandler.php): Testing '$Action//$ID/$OtherID' with '' on HomePage_Controller
Debug (line 258 of RequestHandler.php): Rule '$Action//$ID/$OtherID' matched to action 'handleAction' on HomePage_Controller. Latest request params: array ( 'Action' => NULL, 'ID' => NULL, 'OtherID' => NULL, )
Debug (line 184 of RequestHandler.php): Action not set; using default action method name 'index'

I am not sure If have to mentioned something extra in configuration file.

Avatar
Gurvinder

Community Member, 4 Posts

21 June 2014 at 3:06am

Yeah you are right, that is not the good move. Template name information in debug_requuest is sometimes helpful during troubleshooting.
Thanks for you help. I wish I they can put it back.