debugging typoscript

how to debug typoscript

How to debug typoscript?” – Question that appear in the minds of all typo3 beginners. A post in stackoverflow made me write this article.

Let’s start:

  1. Page > Template > Typoscript Object browser (from drop-down menu) shows the syntax errors in typoscript constant and setup sections. If there’s some missing brackets, then the whole typoscript code below it may not work – Typoscript Object browser show these types of errors also along with syntax errors.
  2. Page > Template > Template Analyser (from drop-down menu) is also similar to Typoscript Object browser but shows the details of Typoscript templates in a different way.
  3. Page > Info > Page TSconfig (from drop-down menu) shows the errors in the Page TSconfig settings.
  4. Make use of the built-in syntax highlighter in Typo3 (available when we edit the Constant/Setup section individually instead of opening the whole ts using “Edit the whole template record” option) or typoscript syntax highlighter in your text editor.
  5. Activate the frontend admin panel and use the section “TypoScript”. The admin panel can be activated by User TS Config settings.

    user and/or group setup:


    admPanel=1
    admPanel {
    enable = 1
    enable.edit = 1
    enable.edit.hide=1
    enable.preview = 1
    enable.cache = 0
    enable.info = 1
    module.edit.forceDisplayFieldIcons = 1
    module.edit.forceDisplayIcons = 1
    module.edit.forceNoPopup = 0
    hide = 0

    }

    root template setup:

    config.admPanel=1
  6. Just check whether the markers are working by assigning a text value like:
    marks.MENU_TITLE = TEXT
    marks.MENU_TITLE.value = Hello!
    page.1234 < marks.MENU_TITLE

  7. The most common errors are wrong file paths, non-existing HTML-templates, missing subparts in modified templates, forgetting to include static templates for an extension etc.
  8. While writing new code always refer the Typo3 TSref :
    http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/current/ (firefox addon Typo3 workbench also can help us.)

Reference links:
http://stackoverflow.com/questions/6654913/what-is-the-best-way-to-debug-typoscript-in-typo3-cms
http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/current/
http://wiki.typo3.org/Extension_Development,_Debugging#How_to_debug_TypoScript

Advertisements
Comments
  1. Joad.s says:

    Hi,
    Very nice article. Thanks for providing information about Typo3. I think this information will benefits to Typo3 Developer to build user friendly site.

    Like

How's it? Your comments and suggestions...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s