This wiki does not contain official documentation and is currently deprecated and read only. Please try reading the documentation on the Liferay Developer Network, the new site dedicated to Liferay documentation. DISCOVER Build your web site, collaborate with your colleagues, manage your content, and more. DEVELOP Build applications that run inside Liferay, extend the features provided out of the box with Liferay's APIs. DISTRIBUTE Let the world know about your app by publishing it in Liferay's marketplace. PARTICIPATE Become a part of Liferay's community, meet other Liferay users, and get involved in the open source project. document library version problem
Hi Guys,
gOOd news we have solved the problem of document_libray which didn't allow us to create more than 1.9 version of document in upto 6.0.6 CE liferay version .. so solution for this is quite simple and is as follows
Find this java class FileVersionVersionComparator
it will look like this
package com.liferay.portlet.documentlibrary.util.comparator;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portlet.documentlibrary.model.DLFileVersion;
public class FileVersionVersionComparator extends OrderByComparator {
/*public static String ORDER_BY_ASC = "version ASC";
public static String ORDER_BY_DESC = "version DESC";
public static String[] ORDER_BY_FIELDS = {"version"};*/
Coment these three lines and add these three lines of code
public static String ORDER_BY_ASC = "createDate ASC";
public static String ORDER_BY_DESC = "createDate DESC";
public static String []ORDER_BY_FIELDS = {"createDate"};
Thats it ..now build your code and deploy it ..restart your server...
Cheers ....