Thursday, February 5, 2015

Liferay 6.2 - Post-Migration issues

Liferay 6.2 - issues, which may occur after Liferay migration (from 5.x, 6.x to 6.2)

1. Document Library links issue.

After migration to 6.2 download links to DL documents may be broken (even if those document are displayed in DL portlet, and there are appropriate files in data/document_library folder).

This issue and it's fix described here: DL broken link issue

2. Dockbar issue - Add, Edit buttons do not work.


For some communities in Liferay 6.2  'Add', 'Edit' buttons in dockbar may display empty content. So, it's not possible to add portlet on page or modify page settings.

There can be also such error in browser:

Chrome: Uncaught TypeError: Cannot read property 'ancestor' of null
Firefox: TypeError: is null

There is also similar LPS issue:


At first sight, it seems to be a JS error.
But the issue may be in DB corrupted data. 

1) Check groupId for current community,  and get creatorUserId for that group_; 
2) Check if such user exists;
3) If there is no such user, change creatorUserId for that group_ for existing user (e.g. admin);
4) Clean DB cache;
5) Check if issue resolved;
6) Check if there are other communities with corrupted data:

SELECT creatorUserId, groupId, friendlyURL from group_ WHERE creatorUserId not in (SELECT userId from user_);
7) If there are such records - change creatorUserId for them also.

Wednesday, February 4, 2015

Liferay 6.2 - Unable to download DL documents

Liferay 6.2 - Unable to download DL documents


Documents are available in DL, and there are appropriate files in /data/document_library folder, but download link is broken. When accessing link, like:

such error is shown:

However, when accessing the same document using host:port URL, like:


files are downloaded successfully.


Patch com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter class:

(line 290):
if (isDocumentFriendlyURL(
        request, group.getGroupId(), friendlyURL)) {

            VirtualHostFilter.class, request, response,

else {

Compile it, and place into /ROOT/WEB-INF/classes directory. Restart Liferay.
More info:

1. Jira issue
2. Liferay form thread