Start page
Start page

Start page / Template development / Debugging / Are there errors?

Is an error present?

Important This page is currently under development. Some of the content may still contain errors.

Errors in FirstSpirit templates can occur or can be identified at different points in the development process:

  • Some syntax errors in FirstSpirit templates are identified during the development stage. If, for instance, parameters or attributes are used incorrectly in forms, the templates cannot be saved and a relevant reason for the error is displayed.
  • It is possible to check whether forms look and function as required directly in the integrated preview on the “Form” tab.
  • To directly view the entries on the presentation channel tabs and their effect using existing content, a page reference can be defined on the “Properties” tab in the “Preview page” field (for page templates, see Properties tab) that renders the content of the affected templates and is to be used as the preview for the template presentation channel.
  • When calculating the preview and during generation, the content input by the editors in the forms is combined with the presentation channel tab instructions. The steps for evaluating the FirstSpirit syntax and the description language used (e.g. HTML) are logged, thus highlighting errors in particular.
    • Errors in the calculation of the preview can be displayed using the “Preview errors” context menu entry on pages and page references in SiteArchitect. Clicking on this will take the user directly to the spot with the error in the affected template.
      Examples: syntax and logical errors, missing references
    • Errors that occur during generation are recorded in a separate log file: fs-schedule.*.log.
      Examples: information on deprecated methods, functions, etc., syntax and logical errors, missing references
  • The following file contains general information on the operation of the FirstSpirit server as well as on actions and errors in projects: fs-server.log (“server log”).
  • Despite utmost care, some errors are only found once the template is physically used in the project. To ensure that they are found before the editors use the template, it is recommended to develop and test the templates on a test system and only then to use them in production after successful testing. In this way, the template developer receives help, for instance, using the ContentTransport function.

Activating additional logging

1) For direct debugging, the following lines can be added temporarily to the templates:

$CMS_VALUE(#global.logError"xxx")$ 

The user can see the calling location(s) in the log.

2) de.espirit.common.Logging class

3 context.log*()methods

Example:

context.logDebug("Hello World!")

Refer to the page on scripting

4) Extended error logging mode

$CMS_SET(#global.debugMode,true)$

Refer to the page on preview-based #global calls

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2014-03-24