Jump to:

23450 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » debug_request=1 not showing template names

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

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

Page: 1
Go to End
Author Topic: 233 Views
  • Gurvinder
    Avatar
    Community Member
    4 Posts

    debug_request=1 not showing template names Link to this post

    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

  • Gurvinder
    Avatar
    Community Member
    4 Posts

    Re: debug_request=1 not showing template names Link to this post

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

  • micmania1
    Avatar
    Community Member
    7 Posts

    Re: debug_request=1 not showing template names Link to this post

    ?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

  • Gurvinder
    Avatar
    Community Member
    4 Posts

    Re: debug_request=1 not showing template names Link to this post

    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.

  • micmania1
    Avatar
    Community Member
    7 Posts
  • Gurvinder
    Avatar
    Community Member
    4 Posts

    Re: debug_request=1 not showing template names Link to this post

    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.

    233 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.