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

Web content translation is lost when updating article with repeatable fields

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.2.0 CE GA1, 6.2.1 CE GA2, 6.2.10 EE GA1
    • Fix Version/s: 6.2.X EE, 7.0.0 M3
    • Component/s: Dynamic Data Mapping
    • Labels:
      None

      Description

      When saving a translation of an article, the following error is thrown: "Web content is temporarily unavaible".

      Steps to reproduce:
      1. Add an structure having at least 1 repeatable field (see example below)

      <root available-locales="en_US,nl_NL" default-locale="nl_NL">
      	<dynamic-element dataType="boolean" indexType="keyword" name="autoplay" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width="">
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Use autoplay]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      		<meta-data locale="nl_NL">
      			<entry name="label">
      				<![CDATA[Gebruik autoplay]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="boolean" indexType="keyword" name="isLinked" readOnly="false" repeatable="true" required="false" showLabel="true" type="checkbox" width="">
      		<dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" name="linkedUrl" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="medium">
      			<meta-data locale="en_US">
      				<entry name="label">
      					<![CDATA[Link to page]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      			<meta-data locale="nl_NL">
      				<entry name="label">
      					<![CDATA[Link naar pagina]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      		</dynamic-element>
      		<dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" name="image" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width="">
      			<meta-data locale="en_US">
      				<entry name="label">
      					<![CDATA[Slider image]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      			<meta-data locale="nl_NL">
      				<entry name="label">
      					<![CDATA[Slider afbeelding]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      		</dynamic-element>
      		<dynamic-element dataType="document-library" fieldNamespace="ddm" indexType="keyword" name="mobileImage" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-documentlibrary" width="">
      			<meta-data locale="en_US">
      				<entry name="label">
      					<![CDATA[Mobile slider image]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      			<meta-data locale="nl_NL">
      				<entry name="label">
      					<![CDATA[Mobiele slider afbeelding]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      		</dynamic-element>
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Link to page]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      		<meta-data locale="nl_NL">
      			<entry name="label">
      				<![CDATA[Link naar pagina]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      	<dynamic-element dataType="boolean" indexType="keyword" name="moreItemsLinkActive" readOnly="false" repeatable="false" required="false" showLabel="true" type="checkbox" width="">
      		<dynamic-element dataType="string" indexType="" name="moreItemsLinkText" readOnly="false" repeatable="false" required="false" showLabel="true" type="text" width="small">
      			<meta-data locale="en_US">
      				<entry name="label">
      					<![CDATA[Link text]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      			<meta-data locale="nl_NL">
      				<entry name="label">
      					<![CDATA[Linktekst]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      		</dynamic-element>
      		<dynamic-element dataType="link-to-page" fieldNamespace="ddm" indexType="keyword" name="moreItemsLink" readOnly="false" repeatable="false" required="false" showLabel="true" type="ddm-link-to-page" width="small">
      			<meta-data locale="en_US">
      				<entry name="label">
      					<![CDATA[Internal page]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      			<meta-data locale="nl_NL">
      				<entry name="label">
      					<![CDATA[Interne pagina]]>
      				</entry>
      				<entry name="predefinedValue">
      					<![CDATA[]]>
      				</entry>
      				<entry name="tip">
      					<![CDATA[]]>
      				</entry>
      			</meta-data>
      		</dynamic-element>
      		<meta-data locale="en_US">
      			<entry name="label">
      				<![CDATA[Link to overview page active]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      		<meta-data locale="nl_NL">
      			<entry name="label">
      				<![CDATA[Link naar overzichtspagina actief]]>
      			</entry>
      			<entry name="predefinedValue">
      				<![CDATA[false]]>
      			</entry>
      			<entry name="tip">
      				<![CDATA[]]>
      			</entry>
      		</meta-data>
      	</dynamic-element>
      </root>
      

      2. Add a document in the default language
      3. Add at least 1 repeatable field
      4. Click "Save as draft"
      5. Add a translation
      6. Save and publish the document
      7. Reopen the document
      8. Add a repeatable field
      9. Click to open the translation
      10. Note that the previous translation is gone
      11. Click to save and publish the document
      12. The exception is thrown "Web content is temporarily unavailable"

      08:04:39,848 ERROR [http-bio-8080-exec-6][IncludeTag:129] Current URL /group/control_panel/manage?p_p_auth=hqvjGZoo&p_p_id=15&p_p_lifecycle=0&p_p_state=pop_up&p_p_mode=view&doAsGroupId=11035&refererPlid=11048&controlPanelCategory=current_site.content&_15_groupId=11035&_15_structureId=SLIDER&_15_struts_action=%2Fjournal%2Fedit_article&_15_articleId=SLIDER-NEWS&_15_toLanguageId=en_US&yui_patched_v3_11_0_1_1397549076921_1624=1397549079618 generates exception: 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      	at com.liferay.portlet.journal.util.JournalConverterImpl.getFieldValue(JournalConverterImpl.java:427)
      	at com.liferay.portlet.journal.util.JournalConverterImpl.getField(JournalConverterImpl.java:398)
      	at com.liferay.portlet.journal.util.JournalConverterImpl.addDDMFields(JournalConverterImpl.java:227)
      	at com.liferay.portlet.journal.util.JournalConverterImpl.addDDMFields(JournalConverterImpl.java:251)
      	at com.liferay.portlet.journal.util.JournalConverterImpl.getDDMFields(JournalConverterImpl.java:167)
      	at com.liferay.portlet.journal.util.JournalConverterUtil.getDDMFields(JournalConverterUtil.java:36)
      	at org.apache.jsp.html.portlet.journal.article.content_jsp._jspService(content_jsp.java:2578)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
      	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
      	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
      	at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83)
      	at org.apache.jsp.html.portlet.journal.edit_005farticle_jsp._jspService(edit_005farticle_jsp.java:1878)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
      

      Expected result: the "Web content translation" window shows the translation of the document and the untranslated fields that were added.
      Actual result: no translation is shown whatsoever, and saving/publishing the document is impossible

      Workaround:
      A workaround is to remove the translation and add the translation again. Then the original fields are shown properly, but this means you have to delete content for every field you add to the original document which is not desired.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              victor.ware Victor Ware
              Reporter:
              jorismeijer Joris Meijer (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 21 weeks, 3 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 M3