Available for: Content Management Server (from version 6.5.0)
Task: For the purpose of finding errors in the code of layout files, this command simulates the export of the file with the specified ID. It becomes clear from the output which NPSOBJ tags from which source layouts are evaluated in which order and which errors occurred during the evaluation process.
Additional information:
systemExecute
instructions will neither be
searched for errors nor formatted. However, the output of such instructions is
formatted.Syntax:
obj withId objectId debugExport
[templateName templateName]
[detailed (yes | no)]
[quoteHtml (yes | no)]
[errorPrefix errorPrefix]
[errorSuffix errorSuffix]
[htmlPrefix htmlPrefix]
[htmlSuffix htmlSuffix]
[infoPrefix infoPrefix]
[infoSuffix infoSuffix]
[preferEditedTemplates (yes | no)]
[allowEditedContents (yes | no)]
Function parameters:
templateName
: Specifies the base layout (initial
layout file) with which the export test is to be performed. If
templateName
has not been specified, the user-specific standard
layout is used (mastertemplate by default).detailed
: Specifies whether the output is to be
restricted to error messages (no
) or should rather be detailed
(yes
). The default value is no
.quoteHtml
: Specifies whether the characters <,
>, and & are to be output as HTML entities (yes
) or not
(no
). The prefix und suffix parameters are not affected by this. The
default value is no
.errorPrefix
: Specifies a character string which is
output prior to each error message. The default value is "***".errorSuffix
: Specifies a character string which is
output after each error message (empty by default).htmlPrefix
: Specifies a character string which is
output prior to HTML text. The default value is "<pre>".htmlSuffix
: Specifies a character string which is
output after HTML text. The default value is "</pre>".infoPrefix
: Specifies a character string which is
output prior to each NPSOBJ information message (empty by default).infoSuffix
: Specifies a character string which is
output after each NPSOBJ information message (empty by default).preferEditedTemplates
: Specifies whether the draft
versions of layout files are to be preferred to the released versions. The default
value corresponds to the user configuration setting of the same name, which is also
used for the preview.allowEditedContents
: Specifies whether draft
versions are to be used if released versions are not available. The
default value is no
.Return value if successful: the formatted export report (string).
Necessary permissions: The user must have the
permissionGlobalExport
permission or the
permissionRead
permission for the specified file.
Example: (output strongly abridged)
CM>obj withId 25687 debugExport detailed yes <HTML> <HEAD> ... NPSOBJ insertvalue=var: title The title END NPSOBJ insertvalue=var </TITLE> </HEAD> NPSOBJ insertvalue=var: body <a ...>Linked text</a> *** ERROR [140008] The instruction attribute was missing from an NPSOBJ tag. ...