Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-85259

Form field visibility expression shows Form is temporarily unavailable error

    Details

      Description

      Description:
      "Form is temporarily unavailable." error message appears in the Form portlet when a Form tries to use the "Field Visibility Expression" functionality. The client mentioned they did not experience this behavior in fixpack-44.

      Steps to Reproduce:
      1. Create a simple Form with 2 fields:
      a. One is either a Single Checkbox or a Multiple Selection type.
      b. The other is any type, but a simple text field will do:
      For the simple text type field, define the "Field Visibility Expression" to be either:

      • for Simple Checkbox: "equals(name_of_simple_checkbox_field,value)"
      • or for Multiple Selection: "contains(name_of_multi_select_field,value)"
        client noted: (The value of "value" is uncertain, but have tried 'true', '1', 'name-of-specific-multi-select-field', and a number of other things.)

      2. Ellipses > Settings > Form Options > Require CAPTCHA
      3. Save
      4. Add a Form portlet to a page and configure it to use the Form that was just created.
      5. Navigate to the page with the Form portlet.
      6. See the red UI error: Form is temporarily unavailable

        • In my testing I noticed that the form loads as expected when either removing the "Field Visibility Expression" or unchecking Require CAPTCHA

      The client mentioned that they are not seeing errors in their logs, but I have the error

      2018-09-07 19:35:37.793 ERROR [http-nio-8080-exec-1][render_portlet_jsp:131] null
      java.lang.NullPointerException
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.getValueString(DDMFormEvaluatorHelper.java:327)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.setDDMExpressionVariables(DDMFormEvaluatorHelper.java:378)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.evaluateBooleanExpression(DDMFormEvaluatorHelper.java:127)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.evaluateDDMFormFieldValue(DDMFormEvaluatorHelper.java:174)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.evaluateDDMFormFieldValue(DDMFormEvaluatorHelper.java:156)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.evaluateDDMFormFieldValues(DDMFormEvaluatorHelper.java:248)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorHelper.evaluate(DDMFormEvaluatorHelper.java:81)
          at com.liferay.dynamic.data.mapping.form.evaluator.internal.DDMFormEvaluatorImpl.evaluate(DDMFormEvaluatorImpl.java:53)
          at com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormTemplateContextFactoryImpl.doCreate(DDMFormTemplateContextFactoryImpl.java:136)
          at com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormTemplateContextFactoryImpl.create(DDMFormTemplateContextFactoryImpl.java:78)
          at com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormRendererImpl.populateCommonContext(DDMFormRendererImpl.java:130)
          at com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormRendererImpl.doRender(DDMFormRendererImpl.java:102)
          at com.liferay.dynamic.data.mapping.form.renderer.internal.DDMFormRendererImpl.render(DDMFormRendererImpl.java:59)
          at com.liferay.dynamic.data.lists.form.web.internal.display.context.DDLFormDisplayContext.getDDMFormHTML(DDLFormDisplayContext.java:113)
          at org.apache.jsp.display.view_jsp._jspService(view_jsp:658)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      2018-09-07 19:39:04.507 ERROR [http-nio-8080-exec-3][PortletRequestDispatcherImpl:295] Unable to dispatch request: java.lang.NullPointerException
      2018-09-07 19:39:04.508 ERROR [http-nio-8080-exec-3][PortletServlet:112] javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
      javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
          at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java
      

      I am confirming whether they are seeing any similar errors.

      Expected Behavior:
      The form would show on the page

      Actual Behavior:
      The red UI error shows instead: Form is temporarily unavailable

      Reproduced:
      Branch: yes, dcae6c5060770b366663b9ae7fa7ff1284b17412

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              samuel.ziemer Sam Ziemer
              Reporter:
              samuel.ziemer Sam Ziemer
              Participants of an Issue:
              Recent user:
              Sam Ziemer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 31 weeks, 5 days ago

                  Packages

                  Version Package