Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: No Longer Reproducible
-
Affects Version/s: 6.1.0 CE GA1
-
Fix Version/s: 6.2.0 CE M4
-
Component/s: DM, DM > Document Library Display, WCM, WCM > Asset Publisher, WCM > Util > Nested Portlets
-
Labels:
-
Similar Issues:
Description
Placing an Asset Publisher within a Nested Portlet results in incorrect content displayed within a Document and Media Library on the same page. Specifically, the content displayed below the menu bar (e.g., title, author and abstract) and the displayed within the right hand side bar is incorrect. The title at the top of the portlet and the preview are always correct (see attached figure). The Documents and Media Display portlet does not appear to have this issue and the Documents and Media library works fine if the Asset Publisher is not within a nested portlet on the same page.

The following update fixes this issue:
In liferay-portal/portal-web/docroot/html/portlet/document_library/view_file_entry.jsp use:
FileVersion fileVersion = fileEntry.getFileVersion();
rather than:
FileVersion fileVersion = (FileVersion)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FILE_VERSION);
Somehow the WebKeys.DOCUMENT_LIBRARY_FILE_VERSION is being set incorrectly when the asset publisher is within a nested portlet. The FileVersion can readily be pulled from the fileEntry, which the jsp already has.