Wednesday, August 13, 2014

Share / User Access Requests and Invitations Missing

In Office 365/ SharePoint Online I came across and issue where I would share a site with an external user, but the invitation would not appear in the "Access requests and invitations" of the site setting. This did not prevent the invitation from being sent or the users accessing the site, but it made it difficult to track the invitations.

As it turns out, this is a know problem, but the cause was unknown. If you have this problem, then Microsoft has a script they can run to fix the issue. You will need to contact them to run the script in their hosted environment.

After going through a number of scenarios, I determined the root of this issue. If you create a site template from a site you created, you can create new sites from that template and the invitations work properly. If you create a new template from a site that was created from a template, the Access request and Invitations will not display your invitations. You will need to call Microsoft for a fix.

To avoid the problem, always make your changes on your original clean site and make new templates from your model template.

Cheers,
Carlos

Thursday, August 7, 2014

No Code Hide Recent from Quick Menu

This isn't new, other's have posted this solution, but I think it's so elegant that I just want to spread the word. There are many JavaScript solutions, but personally, I would rather have a no code solution. It's simple so I'm not going to post any images. There are others that have created step-by-step blogs that are much more detailed, so keep looking down the google search results list if you need more info. :)

1. Create a new SharePoint group called Nobody.

2. Remove yourself from the group. (you are automatically added when you create the group.)

3. Under Site Settings, Navigation, under  "Structural Navigation: Editing and Sorting", select 'Recent' and click edit.

4. In the Audience field, add "Nobody".

5. Make sure to kick 'OK' for the page or your changes won't be saved.

Voila!


Cheers,
Carlos

Wednesday, August 6, 2014

SharePoint 2013 Enterprise Search Go Back - Revisited

This is a rehash of my previous post on the same subject, but it's been redone to use images.

So you want to leverage SharePoint Enterprise Search because it has all the bells and whistles you are looking for in your results and search features. You set your site to leverage enterprise search and you let people start using it. The problem that comes up is that when a user begins using the search, they are taken to the Enterprise Search site collection and there is no quick way to get back from where they started. The only way, out the box, is to hit the back button until they are back to where they started.

I found this to be less than ideal, so I cobbled together some JavaScript that leverages a browser session cookie to capture the site they launch the search. When the user is ready to go back, they simply click on the back button to return to where they started.



Here is the javascript:

<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("returnGoBackURL");
function returnGoBackURL() {
//*******************Specify your url search site here (with https and ending forward slash)*********
var rootURL = 'https://xxxxx.sharepoint.com/sites/searchFAST/';
var lastURL = document.referrer;
if (lastURL.substr(0,rootURL.length) != rootURL) {
setCookie('lastURL', document.referrer, 1 );
document.getElementById('returnURL').href = document.referrer;
} else {
document.getElementById('returnURL').href = getCookie('lastURL');
}
}

function setCookie(c_name,value,exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value + ";path=/";
}
function getCookie(c_name) {
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
 x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
 y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
 x=x.replace(/^\s+|\s+$/g,"");
 if (x==c_name)
   {
return unescape(y);
   }
}
}
</script>
<a href="https://xxxxx.sharepoint.com"><img border="0" src="/sites/searchFAST/SiteCollectionImages/home2.png" alt="home"></a>
<a id='returnURL' class='returnURL' href='http://xxxxx.sharepoint.com'><img border="0" src="/sites/searchFAST/SiteCollectionImages/back.gif" alt="back"></a>


Here are the a couple of starter images for Home and Back. Just update the image references in the script to point to the location of these files after you have put them on your site.


Add the script to a file and put it in the site collection documents. You will need to add a content editor web part (CEWP) to each of the search result pages and point it to the file you saved with the above script.  I put the CEWP under Search Navigation.



In O365, the search site has a document library called 'Pages'. In here are a number of result pages used to display the search results. The default is 'results', but you will find others for 'peopleresults', 'videoresults' and some others. You will want add the content editor webpart to all the result pages where you want the back button to appear.

Cheers,
Carlos