SharePoint 2013 Content Editor – ​ zero width space characters

•22 March 2016 • Leave a Comment

Sometimes, the content editor web part of SharePoint 2013 adds unwanted characters to the text within it. You check once, twice, remove any unnecessary line breaks, spaces etc., but after saving or in the HTML source of the page you find these weird characters: ​ – the zero width spaces (& #8203;)

They can mess up your CSS layout, and frankly, I have not found a solution to force SharePoint not to insert them.

One possible workaround would be to remove them with a library like jQuery, e.g.

$(‘.ms-rtestate-field’).each(function(index,element)  {
var theeditor = $(element);

The selector applies to the content editor webpart of SP2013.

Hope this helps.

SharePoint 2013: Get item order ID in the search results display template

•17 March 2016 • Leave a Comment

In SharePoint 2013, when creating a custom display template for an item, sometimes you need to know, which item in the whole search results list it is. In other words, you need the information of which item in the whole sequence that is, and perform your own logic according to the parameter.

I’ve looked for the property quite a while, but finally found it. It is called piSearchResultId.

Practically you can call it like that in your display template:


It’s value is similar to the following:

0_1 for first item in the list
1_1 for the second item
2_1 for the third item
…and so forth.

With such values you can extract the first number, and there you go!

Hope this helps,

Fiddler full of /vshub/ requests

•9 February 2016 • Leave a Comment

Recently, when debugging with Fiddler and Visual Studio 2015, I got a lot of requests in the Fiddler list, that weren’t relevant for the work I wanted to accomplish. Actually, they were making a mess, preventing me from finding the desired requests to inspect.
I am talking about the /vshub/… requests, and I mean really a lot of them, like dozens in a second, e.g.:

Continue reading ‘Fiddler full of /vshub/ requests’

Please wait for system event notification service

•13 October 2015 • 3 Comments

This is a very nasty error which happens from time to time on Windows 2008 R2 machines.
A user tries to logon to the machine via RDP, or perform a logout. The screen he sees is hanging with the following message:

Please wait for system event notification service

Of course, one solution is to reboot the machine.

What if it is not possible due to certain reasons?

You can read a lot about it on the web, but none of the solutions was suitable for me.

The first option is to go to run services.msc and try to restart the “System Event Notification Service“. In my case it failed with a message, that the service could not be restarted because it did not respond in a timely fashion.

Last resort, a bit hardcore, but working:

  1. On the machine, run the command prompt as an administrator
  2. type sc queryex sens
  3. you’ll get some properties, including the process ID (PID), e.g. 123.
  4. Now you can kill the process with following command: taskkill /PID 123 , using the PID from previous step
  5. You should get a message “SUCCESS: The process with PID 123 has been terminated.
  6. If it still does not work, use the force parameter, like this: taskkill /PID 123 /F
  7. Then, go back to services list, and start the System Event Notification Service

Hope it helps.

Failed to query the OAuth S2S metadata endpoint

•29 May 2014 • 1 Comment

Blog moved to new URL.