Thursday, July 2, 2015

How to solve results from a result source is showing default results after import of a search schema

If you like me use CSOM to import search configuration xml files between environments in site collections you might run into an issue where after an import, all web parts or API calls using a custom Result Source suddenly show results from the default Local SharePoint Results result source instead of the custom one.

The search-is-down developer solution is to restart Search Host Controller on the query servers to make sure they are up to speed on result sources in your system. The better production search-is-up solution require you to open up each result source, click Save, and wait for 10-20 seconds for settings to go live. Both ways ensures search results will appear as expected again.

image

Monday, June 29, 2015

SharePoint 2013 Search Query Tool v2.4 released

image

I decided it was time to release v2.4  of the query tool this morning. No major changed, but some UI improvements to collapse Connection and Advanced boxed to leave more room for search settings (courtesy of Dan Göran Lunde). You can now also resize the window down to 800x600 for those using low resolution screens or remote desktop sessions.

Get your copy NOW!

Friday, June 26, 2015

See who has looked at your cool stuff

In this day and age where we create site collections instead of sub sites it’s quite easy to see who has taken an interest in your stuff.

Header over to https://tenant.sharepoint.com/sites/yoursite/_catalogs/users/simple.aspx and view the contents of the hidden User Information List. This list contains an entry for anyone who has ever visited your site.

image

And a shout out to Tobias Zimmergren and his trusty old post from 2008 covering this http://zimmergren.net/technical/sharepoints-hidden-user-list-user-information-list.

Listing related articles–with added smartness

I got asked if I could spend a few hours helping with a related articles query for a client. And being such a nice guy I jumped at the chance, as I sort of knew what to do up front. Here’s the solution for your enjoyment.

image
Note: In order to implement the solution you need to know how site columns relate to automatic generated managed properties. Being familiar with JSOM and HTML is also helpful.
Say you have an article page in SharePoint which is tagged from the following term sets
  • Topic
    • News
      • Sports
      • Finance
    • Editorial
      • Analysis
      • Report
  • Audience
    • Novice
    • Intermediate
    • Pro
  • Classification
    • Internal
    • External
    • Go Dark
When you view a page tagged with Topic:Finance, you want to list other pages tagged with the same term. Looking at sample 2 in Query Variables – Constant Trouble I would use the following query in a content search web part to achieve this
owstaxIdTopic:{ListItem.Category.IDWithChildren} ListID:{List.ID} -ListItemID:{ListItem.ID}

Wednesday, June 24, 2015

Video Embed is here! (for first release)

As with all tech following in other footsteps we all cheer when a new feature which should have been there from the start appear. Now in first release tenants in Office 365 you can get an embed code for your videos stored in Office Video.
[Support link about embed] [Get embed code via REST]
image


Click the Embed link, copy the embed code, and paste it into a page in SharePoint.


image


NOTE: The new blog experience via the Delve profile page already support using video’s from Office Video by pasting the URL for a video directly, so no need to use embed code.

Tuesday, June 23, 2015

Something went wrong–when deploying a new control template in search

This is a quick one. I created a new search result page control template for a client. The client deployed it and all was well after they tested it. However when I logged in I got the “something went wrong” message on the result page.

Using Fiddler I noticed an 302 error on the control template .js file, which pointed to _layouts/15/AccessDenied.aspx.

While the file was published and working fine for the person who deployed it in the Master Page Gallery, something had gone wrong. Republishing the file solved the problem and search results are displayed as expected.

Friday, June 19, 2015

Using custom actions to configure, brand and inject client side web parts into a Team Site

image
In my current project we have created a configuration based provisioning engine using CSOM to configure and brand SharePoint Team sites into what we call Group sites. The above picture is a screenshot of the console runner version of the tool, but we’re use the same templates in a custom site creation process as well. As we started this before the OfficePnP engine was made available it’s all custom built, but we have borrowed code from OfficePnP in the engine itself.

As an end user you will use a wizard on the intranet to fill out information about your new site, which in turns does a POST ajax query over to an WebAPI service on a random IIS server which does the actual site creation and configuration.

Do you wish you were an author back in September of 2006? Or August 2012 Now you can be!

You can certainly debate the term author for this, but here goes.

If you in SharePoint or SharePoint Online create a new document via Office Web Apps, and close the opening window before Office Web Apps finish loading, you will end up with an empty file in your library where the last modified date in the file is back in the day.

For Excel the date is September 16th 2006, Word has August 7th 2012 and PowerPoint has August 10th 2012.

The issue becomes apparent in search, but not really an issue as the documents are completely empty and not very useful. They will also carry the default names. Which means, the moment you add content to the files the issue is resolved.

Thursday, June 11, 2015

Every organization should have honeypot documents

image
I was working on a slide-deck about the Office Graph and Delve and got thinking about the public and private signals in the graph.

In the graph a person viewing a document is a private signal as no one else will know that the person viewed that particular document. But even though it’s a private signal in the office graph, it is still not 100% private as it’s stored as a view count on the document itself via SharePoint search, making it anonymous information available to everyone with read access to the document.

And this realization triggered a whack idea about honeypot documents. Honeypot servers have been deployed for a long time to see how people are trying to break into computer networks, or bait them into hacking the server. What if you could use the same tactics to catch trends in a company?

Wednesday, June 10, 2015

How to use a good old farm solution to solve the SharePoint 2013 not allowed in an iframe preview issue

Back in April 2013 I wrote a post on how to add the AllowFraming component to your masterpage, in order to get search preview of content hosted on a different domain.

Fast forward 2015 and we try not to modify master pages following Microsoft guidance to be stay “cloud compatible” for future upgrades - which is a good thing btw.