• copy document's url to browser address,page display nothing

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #6556  by jllort
 
seems its a problem with chinese character, in that wiki url is not displayed correctly.

In version 4.x there's no way to solving it, I'll take note and adding the issue for trying correcting in version 5.x I'll send de UUID document not the document path and that will solve the problem
 #6684  by wangmj
 
openkm5.x

=========solution==add new parameter "docUuid"============================
1. change the url content
com.openkm.frontend.client.widget.properties.Document.java
goto line 298
Code: Select all
url += "?docPath=" + URL.encodeComponent(document.getPath());
change to
Code: Select all
//		url += "?docPath=" + URL.encodeComponent(document.getPath());
		url += "?docUuid=" + URL.encodeComponent(document.getUuid());
2.com.openkm.frontend.client.Main.java
add new code
Code: Select all
	private final OKMRepositoryServiceAsync repositoryService = (OKMRepositoryServiceAsync) GWT
	.create(OKMRepositoryService.class);

public String docUuid = "";  //added by wangmj 为了实现拷贝url就能浏览文档
Code: Select all
	/**
	 * 通过uuid获取到文档的节点的全路径
	 */
	final AsyncCallback<String> callbackGetNodePath = new AsyncCallback<String>() {
		public void onSuccess(String result) {
			if (result!= null && !result.trim().equals("")){
				Main.get().docPath = result; 			
				Main.get().fldPath = Main.get().docPath.substring(0, Main.get().docPath.lastIndexOf("/")); 			
			}else{
				Main.get().docPath = null;
				Main.get().fldPath = null;
			}
		}

		public void onFailure(Throwable caught) {
			// On error must reset variables too
			Main.get().docPath = null;
			Main.get().fldPath = null;
			Main.get().showError("isValid", caught);
		}
	};
in method onModuleLoad()
Code: Select all
		//added by wangmj 获取到文档的uuid
		if (loc.getParameter("docUuid")!=null && !loc.getParameter("docUuid").equals("")) {
			docUuid = loc.getParameter("docUuid");
		}
		if (Main.get().docUuid != null && !Main.get().docUuid.equals("")){
			//首先获取到节点的全路径,然后调用下面的方法
			ServiceDefTarget endPoint = (ServiceDefTarget) repositoryService;
			endPoint.setServiceEntryPoint(Config.OKMRepositoryService);
			repositoryService.getPathByUUID(Main.get().docUuid, callbackGetNodePath);
		}

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.