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

Unable to see additional metadata sets in document after upgrading from 6.2 to 7.0

    Details

      Description

      Unable to see additional metadata sets in document after upgrading from 6.2 to 7.0

      Steps to Reproduce:
      1. Start up 6.2 SP20
      2. Go to Admin > Site Administration > Content
      3. Go to Documents and Media > Manage > Metadata Sets > Click Add
      4. Go to Source tab, and paste:

      <root available-locales="en_US" default-locale="en_US">
      	<dynamic-element dataType="string" indexType="keyword" localizable="true" name="text2281" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="25">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Display Title]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="string" indexType="keyword" localizable="true" name="text12897" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="25">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Subject Matter Expert]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="string" indexType="keyword" localizable="true" name="text15954" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="25">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Editor]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="date" fieldNamespace="ddm" indexType="keyword" localizable="true" name="ddm-date5372" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-date" width="25">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Last Review Date]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="date" fieldNamespace="ddm" indexType="keyword" localizable="true" name="Next_Review_Date" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-date" width="small">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Next Review Date]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="date" fieldNamespace="ddm" indexType="keyword" localizable="true" name="Last_Updated_Date" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-date" width="small">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Last Updated Date]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      </root>

      5. In Documents and Media, go to Manage > Document Types > Add
      6. Don't add any Fields, but go down to Additional Metadata Fields and select the Metatdata set from step 4
      7. Add a document with the Document Type from the previous step
      8. Shut down and upgrade to 7.0 with de-84
      9. Start up 7.0, go to Documents and Media, and try to edit the document
      Expected Result: The Additional Metadata fields section appears
      Actual Result: The Additional Metadata fields section is missing, and the following stack trace is thrown:

      2019-10-28 16:24:19.884 ERROR [http-nio-8080-exec-1][IncludeTag:128] Current URL /group/guest/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_document_library_web_portlet_DLAdminPortlet_mvcRenderCommandName=%2Fdocument_library%2Fedit_file_entry&_com_liferay_document_library_web_portlet_DLAdminPortlet_redirect=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fguest%2F~%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_document_library_web_portlet_DLAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview&_com_liferay_document_library_web_portlet_DLAdminPortlet_fileEntryId=20567&_com_liferay_document_library_web_portlet_DLAdminPortlet_backURL=http%3A%2F%2Flocalhost%3A8080%2Fgroup%2Fguest%2F~%2Fcontrol_panel%2Fmanage%3Fp_p_id%3Dcom_liferay_document_library_web_portlet_DLAdminPortlet%26p_p_lifecycle%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview generates exception: com.liferay.portal.kernel.exception.PortalException: com.liferay.portal.kernel.template.TemplateException: Unable to process template com/liferay/dynamic/data/mapping/dependencies/ddm/date.ftl
      java.text.ParseException: Unparseable date: "1571961600000"
       at java.text.DateFormat.parse(DateFormat.java:366)
       at freemarker.core.JavaTemplateDateFormat.parse(JavaTemplateDateFormat.java:43)
       at freemarker.core.BuiltInsForMultipleTypes$dateBI$DateParser.parse(BuiltInsForMultipleTypes.java:185)
       at freemarker.core.BuiltInsForMultipleTypes$dateBI$DateParser.get(BuiltInsForMultipleTypes.java:160)
       at freemarker.core.DynamicKeyName.dealWithStringKey(DynamicKeyName.java:145)
       at freemarker.core.DynamicKeyName._eval(DynamicKeyName.java:73)
       at freemarker.core.Expression.eval(Expression.java:78)
       at freemarker.core.Assignment.accept(Assignment.java:131)
       at freemarker.core.Environment.visit(Environment.java:324)
       at freemarker.core.AssignmentInstruction.accept(AssignmentInstruction.java:54)
       at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
       at freemarker.core.IfBlock.accept(IfBlock.java:48)
       at freemarker.core.Environment.visit(Environment.java:324)
       at freemarker.core.MixedContent.accept(MixedContent.java:54)
       at freemarker.core.Environment.visitByHiddingParent(Environment.java:345)
       at freemarker.core.IfBlock.accept(IfBlock.java:48)
       at freemarker.core.Environment.visit(Environment.java:324)
       at freemarker.core.MixedContent.accept(MixedContent.java:54)
       at freemarker.core.Environment.visit(Environment.java:324)
       at freemarker.core.Environment.process(Environment.java:302)

      Testing:
      Reproduced in 7.0.x-private - b6ba30ea491b0d97e4a75374c3bc83b43b8a7626
      Reproduced in master - cc9ced2f1e37c4c7fd656d6165e09bc824f89fbb

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                samuel.ziemer Sam Ziemer
                Participants of an Issue:
                Recent user:
                Harry Chai
                Engineering Assignee:
                Sam Ziemer
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  38 weeks, 2 days ago

                  Packages

                  Version Package
                  7.3.0 CE GA1
                  Master