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
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).
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
Hello.
I can not see the file you said you have attached.
Really?, i´ve attached it again as a downloadable file, thanks
Nothing again.
Hey Douglas - Do you not even see the attachment option? Or there's nothing when you download? See below:
Weird, I do not see the link at all.
Usually I can see them without any problem.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.