View in source repository not working in 4.2.c
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 04:41 AM
I am using v 4.2.c on centos 64bit. Replication works fine and I have just realised that view in source repository is not working. I need to fix this asap as end users are using it and have uploaded documents and cannot downgrade back to 4.0.d
I do not get any errors in the log files. When I click on view in source repository it opens same repository window.
So far I have manually changed the url value in the following xml file
This does open the source repository but not the correct URL. Im not sure how to debug.
I do not get any errors in the log files. When I click on view in source repository it opens same repository window.
So far I have manually changed the url value in the following xml file
webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml: <!– Transferred node: View in source repository –><!– <param name="href">{sourceRepositoryUrl}</param> –> <param name="href">http://hector.uk.domain.com:8080/share/page/site/SITE/documentlibrary</param>
This does open the source repository but not the correct URL. Im not sure how to debug.
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 07:33 AM
I have edited the javascript file webapps/share/components/documentlibrary/actions-min.js How ever I am not sure as to what params to return. I formatted the code so it is more readable. Following is what I currently have
I have noticed there is a problem with Y[Z] it comes up as undefined. The correct url is now there in "view source repository" but it is not opening in new window, Am i missing a parameter?
viewInSourceRepositoryURL : function q(aa, ac) { var ab = aa.node, Z = aa.location.repositoryId, Y = this.options.replicationUrlMapping, ad; /*if (!Z || !Y || !Y[Z]) { return "#" }*/ Z = "hector.uk.domain.com"; console.log(Z); console.log(Y); console.log(Y[Z]); ad = ab.isContainer ? ac.folderDetailsUrl : ac.documentDetailsUrl; ad = ad.substring(Alfresco.constants.URL_CONTEXT.length); console.log("hector.uk.domain.com/share/'+ad); //return G(Y[Z], "/", ad) return G("?hector.uk.domain.com:8080/share/", "/", ad) },
I have noticed there is a problem with Y[Z] it comes up as undefined. The correct url is now there in "view source repository" but it is not opening in new window, Am i missing a parameter?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 07:49 AM
Hi,
Please turn on client-side javascript debugging and check the values.
Don't make any changes in *.min.js and it is not recommended. Change the action.js file and minify it.
I hope your script is failing in,
Please check your value is present in "urlMapping".
Please turn on client-side javascript debugging and check the values.
Don't make any changes in *.min.js and it is not recommended. Change the action.js file and minify it.
I hope your script is failing in,
$combine(urlMapping[repoId], "/", siteUrl);
Please check your value is present in "urlMapping".
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 08:06 AM
My urlMapping[repoId] returns undefined. How can I hard code it? I need a quick fix. I have tried following but it doesn't work.
viewInSourceRepositoryURL : function q(aa, ac) { var ab = aa.node, Z = aa.location.repositoryId, Y = this.options.replicationUrlMapping, ad; console.log(Z); console.log(Y); console.log(this); /*if (!Z || !Y || !Y[Z]) { return "#" }*/ //Z = "hector.uk.domain.com"; Y = new Array(); Y[Z] = "hector.uk.domain.com:8080/share/"; /*console.log(Z);*/ console.log(Y[Z]); ad = ab.isContainer ? ac.folderDetailsUrl : ac.documentDetailsUrl; ad = ad.substring(Alfresco.constants.URL_CONTEXT.length); return G(Y[Z], "/", ad) },
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2013 08:08 AM
You shouldn't need to hack share to get this working. You should instead be configuring through share-config-custom.xml
<config evaluator="string-compare" condition="Replication"> <share-urls> <!– To discover a Repository Id, browse to the remote server's CMIS landing page at: http://{server}:{port}/alfresco/service/cmis/index.html The Repository Id field is found under the "CMIS Repository Information" expandable panel. Example config entry: <share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office:8080/share/</share-url> –> </share-urls> </config>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2013 03:40 AM
I have that but it is not working. As I have mentioned replication works but not when you click on "view in source repository". Unless I hardcode the url in the js.