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

The value of field can not be configured in Filter by Field

    Details

      Description

      Step to reproduce:

      1. Add a web content structure with a Select field
      2. Add a Dynamic Collection with Web Content Article and new structure
      3. Enable Filter By Field
      4. Click in Select
      5. Check the Select field and Select option 2
      6. Click Apply
      7. Click Save
      8. Assert the success message is shown

      Expected Results:
      The Select: value 2 should be shown above the Select button.

      Actual Results:
      The Select: undefined is shown above the Select button.

      Additonally, The following error is thrown in log console after click Select

      2020-09-16 05:22:22.642 ERROR [http-nio-8080-exec-11][BaseFieldRenderer:46] Unable to render field
      com.liferay.portal.kernel.json.JSONException: org.json.JSONException: A JSONArray text must start with '[' at 1 [character 2 line 1]
              at com.liferay.portal.json.JSONArrayImpl.<init>(JSONArrayImpl.java:60)
              at com.liferay.portal.json.JSONFactoryImpl.createJSONArray(JSONFactoryImpl.java:153)
              at com.liferay.dynamic.data.mapping.internal.storage.StringFieldRenderer.handleSelectFieldValue(StringFieldRenderer.java:141)
              at com.liferay.dynamic.data.mapping.internal.storage.StringFieldRenderer.doRender(StringFieldRenderer.java:90)
              at com.liferay.dynamic.data.mapping.storage.BaseFieldRenderer.render(BaseFieldRenderer.java:43)
              at com.liferay.dynamic.data.mapping.storage.Field.getRenderedValue(Field.java:156)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1505)
              at freemarker.ext.beans.ReflectionCallableMemberDescriptor.invokeMethod(ReflectionCallableMemberDescriptor.java:56)
              at freemarker.ext.beans.MemberAndArguments.invokeMethod(MemberAndArguments.java:51)
              at freemarker.ext.beans.OverloadedMethodsModel.exec(OverloadedMethodsModel.java:61)
              at freemarker.core.MethodCall._eval(MethodCall.java:62)
              at freemarker.core.Expression.eval(Expression.java:101)
              at freemarker.core.Assignment.accept(Assignment.java:134)
              at freemarker.core.Environment.visit(Environment.java:331)
              at freemarker.core.Environment.visit(Environment.java:337)
              at freemarker.core.Environment.visit(Environment.java:337)
              at freemarker.core.Environment.visit(Environment.java:337)
              at freemarker.core.Environment.include(Environment.java:2694)
              at freemarker.core.Include.accept(Include.java:171)
              at freemarker.core.Environment.visit(Environment.java:331)
      

      Reproduced on:
      Tomcat 9.0.37 + MySQL 5.7. Portal master GIT ID: 5b40b5b7a0a805ded3391c0cc9fec5e3c1075707.

      Can not be reproduced on:
      Tomcat 9.0.33 + MySQL 5.7. Portal 7.3.4-GA5.

        Attachments

        1. Broken.PNG
          Broken.PNG
          49 kB
        2. Undefined.PNG
          Undefined.PNG
          66 kB

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              yang.cao Yang Cao
              Participants of an Issue:
              Recent user:
              Jason Pince
              Engineering Assignee:
              Pavel Savinov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 4 weeks, 3 days ago

                  Packages

                  Version Package
                  7.3.5 CE GA6
                  7.3.10 DXP GA1
                  Master