juliocamarero/liferay-portal — pull request #1568 by riccardo-ferrari (2013-03-27 18:59:21+00:00)
Title: Lps 34032

Hi,

This pull request wants to address the problem reported on LPS-34032.
When exporting a wiki we are creating multiple times the following elements in the portlet-data xml structure:

This is happening for each WikiNode regardless of any reference to DL entries.
When importing data we relay on the importReferencedData method from the JournalPortletdataHandler class. That method looks for the very first entry of each of the previous elements leading to import only the first occurrence of these entries.

This fix avoid the creation of these elements multiple times, appending data to existing elements instead.

There are alternative approaches that you may want to take into account:
-Move the creation of these elements out of the WikiNode export loop: this involve method signature change and modification to WikiDisplayPortletDataHandler too.
-Improve the JournalPortletDataHandler logic to look for multiple occurrences of these elements.

Thanks