05-25-2017 11:16 AM
Hello,
i´m currently migrating a share and repo project from version 4.2.0 to 5.2 and i´m facing some issues.
One of those is that i´ve extended org/alfresco/slingshot/search/search.get.js (i needed to customize advanced search, since i wanted to search documents with the effectivity aspect within a date range which was between cm:from and cm:to)
What i did was that i created a new search.get.js with the custom query i wanted and placed it on my alfresco installation in this directory (because it couldnt be extended via amp):
tomcat\shared\classes\alfresco\extension\templates\webscripts\org\alfresco\slingshot\search
i also created a .xml file which called this file and placed it on :tomcat\shared\classes\alfresco\extension
this solved the issue then.
But now, doing that doesnt work on v5.2 investigating a bit i found that the search.get.js file is on the share-services.amp, which it didnt exist back in version 4.2, and my question is, how do i do it now?
Thanks a lot in advance
05-25-2017 01:27 PM
The approach to overriding web scripts via the shared/classes/alfresco/extension/templates/webscripts path has not changed in 5.2 and is still viable. The fact that share-services is a separate project / AMP also should not have any impact on this, since only a small portion of Share-specific web scripts / APIs have actually been extracted to that project (in an ideal world, everything about sites would be in that project, but those are too entwined in the core to extract).
I currently see no reason your approach should not work in 5.2 from what you have provided. Either some of the information is not correct or some other addon that you have installed may already be overriding that web script (only one can do that and the shared/classes is basically one of the last places to be checked).
05-25-2017 01:47 PM
Thanks for the quick reply,
I have checked the webscript path and i realized i wrote a folder incorrectly, having corrected my mistake i restarted my alfresco server and the advanced search does not search anything (even when i do not search for effectivity) when i inspect the page i found this error
"04250009 Wrapped Exception (with status template): 04250040 Failed to execute script 'classpath*:alfresco/extension/templates/webscripts/org/alfresco/slingshot/search/search.get.js': 04250039 Invalid node ref - does not contain forward slash: true"
At least i know that it has found the script but i do not know why its giving me this error.
Could you please help me again? thanks
EDIT: i´ve attached my custom search file
05-25-2017 03:45 PM
Hello.
I can not see the file you said you have attached.
05-25-2017 03:54 PM
05-25-2017 03:57 PM
Nothing again.
05-25-2017 04:00 PM
Hey Douglas - Do you not even see the attachment option? Or there's nothing when you download? See below:
05-25-2017 04:05 PM
Weird, I do not see the link at all.
Usually I can see them without any problem.
Explore our Alfresco products with the links below. Use labels to filter content by product module.