ui.modern.freemarker.display_errors

Background

This setting should be used on production servers to prevent detailed error messages from appearing to end users.

When error messages are suppressed in the browser the failing block of code causing the error will be silently ignored and the processing will continue at the next code block.

Depending on the structure of your template file this can lead to some sections of the search results page not being displayed at all when an error occurs.

Template files errors are always logged to one of the modern UI log files:

  • $SEARCH_HOME/web/logs/modernui.CONTEXT.log.

  • $SEARCH_HOME/data/SEARCH_PACKAGE_ID/log/modernui.CONTEXT.log (Linux)

  • $SEARCH_HOME/web/logs/modernui.SEARCH_PACKAGE_ID.CONTEXT.log (Windows)

Where:

  • CONTEXT: either Public: search endpoints (search.json, search.html etc.) accessed via the public search URL; Admin: search endpoints accessed via the admin search URL

  • SEARCH_PACKAGE_ID: the ID of the search package.

When this setting is enabled, the errors will also be displayed on the search results page.

Setting the key

Set this configuration key in the results page (preferred) or search package configuration.

Use the configuration key editor to add or edit the ui.modern.freemarker.display_errors key, and set the value. This can be set to any valid Boolean value.

Default value

Errors are displayed in the browser:

ui.modern.freemarker.display_errors=true

Examples

Prevent error messages from being displayed in the browser:

ui.modern.freemarker.display_errors=false