Exception on failed validation

Issue #25 resolved
Brydie McCoy created an issue

When configuring the plugin task (to upload to bamboo instance), if you don't pick the artifact, the validation fails and the ui shows a stacktrace.

This is for version 2.0.9

2014-01-08 10:19:42,924 ERROR [qtp873482707-2748] [runtime] Expression error is undefined on line 4, column 137 in template/aui/field-group-end.ftl.

Expression error is undefined on line 4, column 137 in template/aui/field-group-end.ftl.
The problematic instruction:
----------
==> ${error?html} [on line 4, column 135 in template/aui/field-group-end.ftl]
 in include "/${parameters.templateDir}/${parameters.theme}/field-group-end.ftl" [on line 2, column 1 in template/aui/controlfooter-core.ftl]
 in include "/${parameters.templateDir}/${parameters.theme}/controlfooter-core.ftl" [on line 1, column 1 in template/aui/controlfooter.ftl]
 in include "/${parameters.templateDir}/${parameters.theme}/controlfooter.ftl" [on line 14, column 1 in template/aui/select.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression error is undefined on line 4, column 137 in template/aui/field-group-end.ftl.
    at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
    at freemarker.core.Expression.getStringValue(Expression.java:118)
    at freemarker.core.Expression.getStringValue(Expression.java:93)
    at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)

My 'guess' is there is a field error without any content.

 [#if (fieldErrors[parameters.name])?has_content]
        [#list fieldErrors[parameters.name] as error]
            <div class="error control-form-error" [#if (parameters.name)?has_content] data-field-name="${parameters.name?html}"[/#if]>${error?html}</div>
        [/#list]
    [/#if]

Comments (4)

  1. Michael Knight

    If you're using this task in a normal plan (i.e. not a deployment plan), then this error occurs any time you try to edit the task (even if all the fields are valid).

  2. Robin Fernandes Account Deactivated

    So it turns out it doesn't happen with entirely valid fields. However, it's surprisingly easy to end up with invalid fields, since the password field is served up blank. So the problems are:

    • Validation failures are silent.
    • Passwords fields are loaded blank, which results in a validation failure; you have to re-enter the password to successfully edit.
  3. Joe Clark

    I have a major refactor of the configuration UI on the master branch that will fix these problems.

  4. Log in to comment