Search is no longer context aware in Alfresco 5

During testing an upgrade from Alfresco 4 to Alfresco 5 we noticed that searches are no longer context aware in Alfresco 5. Before Alfresco 5, if you made a search from within a site, then the default action was that results were also scoped to the site. This no longer happens in Alfresco 5. There is a Jira for this: https://issues.alfresco.com/jira/browse/MNT-13350, however the solution proposed in the comments wouldn’t work for me. The correct code to get the search to be context aware again would be to put the following code snippet in your extended share-header.get.js.

/** 
 Set default search scope to site:

https://issues.alfresco.com/jira/browse/MNT-13350

**/
function setDefaultSearchScopeToSite() {
  var searchMenuBase = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SEARCH");
  //searchMenuBase.config.site = page.url.templateArgs.site; //Does not work
  searchMenuBase.config.defaultSearchScope = page.url.templateArgs.site;
}
setDefaultSearchScopeToSite();

Perhaps something changed in the Aikau framework after this issue was tested which introduced this regression error.

My reflection is, why isn’t the default behaviour of the search that it should be context aware? Isn’t that what people want? Or at least make this configurable in a simple way instead of requiring extending a web script controller.

There are a few other issues relating to this such as scoping the live search and advanced search: https://issues.alfresco.com/jira/browse/MNT-14006, https://issues.alfresco.com/jira/browse/MNT-11543

This entry was posted in Alfresco, share, Solr, Uncategorized. Bookmark the permalink.

70 Responses to Search is no longer context aware in Alfresco 5

  1. Brian Knoblauch says:

    Example code given does not work for me. I’ve got a share-header-get.js override that I merged it in with. My custom modifications to the header show up fine, but the search scope change does not happen. It still searches outside of site scope. Test platform is Alfresco 5.0a.

  2. Trevor says:

    The code works but breaks searches executed outside the scope of a site.
    An if statement will insure the proper scope is chosen depending on where you are.

    function setDefaultSearchScopeToSite() {
    var searchMenuBase = widgetUtils.findObject(model.jsonModel.widgets, “id”, “HEADER_SEARCH”);
    //searchMenuBase.config.site = page.url.templateArgs.site; //Does not work
    if(page.url.templateArgs.site != null){
    searchMenuBase.config.defaultSearchScope = page.url.templateArgs.site;
    }
    }
    setDefaultSearchScopeToSite();

  3. Advantages Related too Picking head soccer hack Instrument

    Head Soccer – here is the particular vvideo game
    that iis essential to attempt in case you’rea fann regarding soccer video game
    titles and aare seeking a completely fresh experience.
    The concept is obviously straightforward. It is really a one-on-one, mobile gamne
    where you truly require too test out and
    gget the ball into the actual other model’s goal.
    This game is actually displayed in 2nd. That’s why
    yyou are going to bbe viewing thhe exact gameplay coming frfom the actual side.
    The mobile game will probably be named Head Little
    league, because the the majority of special characteristic associatfed with the players you actually
    command are actually their paarticular brains.

    These are ddisproportionately significant.
    The actual video ame iis without issue really straightforward
    to interact with in. It is doable to relocate the player using easy to use controls.
    On the base right-hand aspect, you’ll find a button to be able to kick as well
    as a buttn to jump. This seems a breeze, yet once you play your initial game you’ll be able to rapidly discover thee key reason why this online
    game is undoubtedly thus challenging to know. The soccer ball jumps all over the screen at breakneck rates and you can be flying in all directions along with it.

    1 / 2 of times, whenever you in fact score, it is nothing to use along with
    experience, but it’s simply the fortune regarding where by the particular
    basketball comes. You will alsoo be capable tto choose betweeen a compleye of 4 online game modes.
    And each and everyy game method will demand different goals so as to end up being accomplished eevery single child alllw
    you possess great results.
    During the entire video game you’ll swiftly discover the point
    that when you victory a match, you’ll be given 100 dollars.
    Those coins could possibly be utilized tto un-lock all types of stuff
    like new in addition to different players including their strong power shots.
    You’ll be able to naturally, just like another totally free activity, buy coins immediately by way off
    in-app purchase. However it’s likewise achievable to work with
    head soccer cheatss and avoid totaally wasting your hard earned dollars.
    head soccer hack apk is precisely what you’ll require to receive just in case yyou want tto enable the exact using of the exact cheats.
    There will never be any need to help devote your challenging earned dollars once acquiring this app and you’ll obtain every one of the coins you mayy everr need.
    That will certainly create the video game a great deal more exciting.
    And thus, thee reason the reason limit oneself – just
    make use of the particular hack and love the actual game.

    There’s no denying the beief that Head Soccer is without quesdtion the mobile game that is the actual
    choice available foor yyou if perhaps you will be on the watch foor somethging fascinating.

    It possesses fast, hectic games, this can be a breeze to discover
    the best way to engage inside, and thee particular images are really adorable along having
    humorous. Mastering this mobile game is required a loong time and
    there is no questioning concerning this particular nevertheless if you’re seeking an amazing cell phone
    game then this happens to be a wonderful choice.

    http://www.bis-ingame.net

  4. Great blog! Do you have any recommendations for aspiring writers?
    I’m hoping to start my own website soon but I’m a little lost on everything.
    Would you propose starting with a free platform like WordPress or go for a paid option? There are so many choices
    out there that I’m totally overwhelmed .. Any suggestions?
    Appreciate it!

    My web blog spilleautomater p㟮ett

  5. norske says:

    It’s amazing to visit this website and reading the views
    of all mates on the topic of this article, while I am also
    zealous of getting knowledge.

    my page norske

  6. suba me says:

    RNLoZF Wow! This could be one particular of the most helpful blogs We ave ever arrive across on this subject. Actually Great. I am also a specialist in this topic so I can understand your hard work.

  7. Well I really liked reading it. This information provided by you is very helpful for proper planning.

  8. sexy garotas says:

    your website, how can i subscribe for a blog website? The

  9. The whole look of your web site is fantastic, let well as the content material! Excellent weblog right here! Additionally your site quite a bit up very fast!

  10. travel says:

    Motyvacija kaip tvai galt padti savo vaikams Gimtasis odis

  11. World News says:

    Rattling nice design and style and superb subject material, hardly anything else we need.

  12. Thanks so much for the article post.Much thanks again. Want more.

  13. That is a good tip especially to those fresh to the blogosphere. Short but very accurate information Many thanks for sharing this one. A must read post!

  14. 릴 게임 says:

    Thank you ever so for you article.Much thanks again. Keep writing.

  15. This is a really good tip particularly to those fresh to the blogosphere. Brief but very accurate info Thanks for sharing this one. A must read article!

  16. Wow, great post.Thanks Again. Fantastic.

  17. Thanks for the article post.Much thanks again. Awesome.

  18. Thanks so much for the blog article. Awesome.

  19. speakers use clothing to create a single time in the classic form of the shoe provide the maximum air spring.

  20. I think this is a real great article post.Really looking forward to read more. Fantastic.

  21. wonderful points altogether, you just won a logo new reader. What would you recommend in regards to your submit that you just made a few days ago? Any sure?

  22. You made some decent points there. I looked on the internet for the subject and found most people will consent with your site.

  23. This site was how do you say it? Relevant!! Finally I ave found something which helped me. Appreciate it!

  24. 다자바 says:

    wow, awesome blog article. Really Great.

  25. That is a great tip particularly to those new to the blogosphere. Short but very precise info Appreciate your sharing this one. A must read post!

  26. Im thankful for the blog post.Much thanks again. Great.

  27. I really liked your blog.Really thank you! Cool.

  28. Very good article.Thanks Again. Keep writing.

  29. 릴 게임 says:

    Im no expert, but I think you just made an excellent point. You undoubtedly fully understand what youre talking about, and I can really get behind that. Thanks for being so upfront and so honest.

  30. I think this is a real great blog post. Fantastic.

  31. If you want to grow your familiarity just keep visiting this web

  32. Thanks-a-mundo for the post.Much thanks again. Really Cool.

  33. I truly appreciate this post.Much thanks again. Awesome.

  34. 다잡아 says:

    Looking around While I was browsing yesterday I saw a excellent article about

  35. DesignStudio says:

    same nearly a lot often inside case you shield this hike. Feel free to surf to my website; social bookmark

  36. Precisely what I was looking for, thanks for posting.

  37. Really appreciate you sharing this blog post.Really looking forward to read more. Will read on

  38. Thank you for your post.Really looking forward to read more. Keep writing.

  39. Very good article.Thanks Again. Really Great.

  40. Thank you ever so for you post.Much thanks again.

  41. VIBRAM FIVE FINGERS OUTLET WALSH | ENDORA

  42. air force says:

    This web site certainly has all of the information I needed about this subject and didn at know who to ask.

  43. News info I was reading the news and I saw this really cool information

  44. You made some clear points there. I did a search on the issue and found most persons will go along with with your blog.

  45. MP3 says:

    I went over this web site and I believe you have a lot of great info, saved to favorites (:.

  46. This is a great tip especially to those new to the blogosphere. Short but very accurate information Many thanks for sharing this one. A must read article!

  47. This is one awesome article post.Thanks Again. Really Cool.

  48. Merely a smiling visitant here to share the love (:, btw great layout. Everything should be made as simple as possible, but not one bit simpler. by Albert Einstein.

  49. This website was how do I say it? Relevant!! Finally I have found something that helped me. Thanks!

  50. Really appreciate you sharing this article post.Much thanks again. Really Great.

  51. Some truly quality posts on this site, bookmarked.

  52. Thanks for sharing, this is a fantastic blog.Much thanks again. Really Great.

  53. you are in point of fact a excellent webmaster.

  54. In absence of Vitamin E and Gotu Kola extract may be of some help to know how to

  55. Just Browsing While I was surfing today I noticed a excellent post about

  56. sale says:

    Really clear web site, regards for this post.

  57. Mlb Lines says:

    IaаАа’б‚Т€ТšаЂаŒаАа’б‚Т€ТžаБТžm glad to become a visitor in this pure internet site, regards for this rare info!

  58. pretty practical material, overall I think this is worthy of a bookmark, thanks

  59. Think about it I remember saying I want to screw

  60. I value the article post.Really thank you! Really Cool.

  61. There are a total of 12 teams including Hiroshima Toyo Kafu, the majority shareholder of Mazda Motor Co., and Softbank, excluding the parent company Fukuoka Softbank Hawks.일본야구스포츠중계

  62. We will provide you with a good match analysis and sports issue & news to bet on Toto.안전토토사이트

  63. An example is the preservation of ancient Greek sculptures in the museum and the making of replicas to create alternatives for display. Therefore, replicas are not necessarily replicas made by the original author.이미테이션

  64. that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly very often

  65. wow, awesome blog post.Really thank you! Fantastic.

  66. this post reminds me of my old room mate! He always kept

  67. Keep up the good piece of work, I read few articles on this site and I conceive that your website is real interesting and has circles of excellent info.

  68. go to says:

    There is perceptibly a lot to identify about this. I consider you made some good points in features also.

  69. Im thankful for the blog article.Really looking forward to read more. Really Great.

Leave a Reply to norske Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>