Tuesday, 28 January 2014

SharePoint 2010 : The search function does not seem to work in some cases.

Hi all,

Today, I decided to figure out with a recurrent problem with the Search engine.
Search engine, is the standard version of SharePoint 2010 (not the enterprise version).

And, customers are always complaining about it, saying that it’s not always working.
After checking, testing and log-reading, the only visible thing is : search is working O_°

So, today, I made long tests and reproduce the problem, and give a credible explanation to my customer.

The problem is that the customer is trying to search as in Google, with part of the name.
What is wrong?
It should give back some results, but there is only the “no results found” page sent back to him.


So, I discover that the search engine will only search for the exact word in the path of the file, but it’ll give a result only if the keyword is not part of a word in the file name.

In my example, the customer is trying to have results for “VE11”.
There is no word “VE11” in the library.
But there is “VE 11” in the library, and the search is using them as 2 keywords: “VE” & “11”, and search for each of them.



Input from my customer:
Keyword(s) : SharePoint 2010 : Contoso Internal
Make your selection : Probleem
Describe : The search function does not seem to work in some cases.
Een voorbeeld uit de library “CCJ requests invoiced” op batch datum 11/12/2013:
Example: If we search on “VE 11” as part of a file name from the "CCJ requests invoiced" library, we get no result. If we search on another part of that same file name e.g. “345340” we do find a result. Idem for a search on “TU60” without result, whereas “345225” from the same name, does give a result.
Attachment : Ja

My research and conclusion:
Checked search.
Result found with all given examples.
Test with: "VE 11" and "345340"
VE 11 => several results
               

345340 => 1 result
               

VE11 => no results

VE11L3005493 => 1 result : VE11L3005493 13 ccj 345340.msg

Try to search with this word “ve11l3005493”, starting with first letter, then adding eachletter one by one.
You’ll find out how the search engine of SharePoint 2010 is working.
The search is indexing complete part of the names of the file name, not part of the different names making the filemane.
The matching result is always written in bold.
This is the reason why there is no result for "VE11", but you gor result for "345340", and also results for "VE 11" (as "VE" and "11" are indexed by the SharePoint search engine.



Then, I decided to make a last test : writing the keyword between asterisk  è *VE11*
Et voilà.







That’s all Folks


Monday, 27 January 2014

How to Limit the Self-Service Site Creation in SharePoint 2013 to only users added into a specific AD Group

Hi all,

Today, I was asked to allow the self-service site creation for the mySite in my SharePoint 2013 Farm.
As the audience will be only for the test users, I've decided to do in the same way as I've done for my SharePoint 2010 Farm.

1-      Creation of a new AD Group.
          


2-      Set the Self-Service Site Creation to "ON":
          In Central Administration, highlight the mySite Web App
          


          Select the MYSITE Web App, then review all 5 sections:
-          Self-Service Site Creation
-          User Permissions
-          User Policy
-          Anonymous Policy
-          Permission Policy


               

o   Self-Service Site Creation:
              

o   User Permissions: check this in the "Site Permissions" section
         

o   User Policy: use the default values

o   Anonymous Policy: use the default values

o   Permission Policy: use the default values




3-      Configuration of the User Profile Service Application:

In Central Administration, select the "Manage Service Applications" link:

In the "Service Applications" page, select the "User Profile Service Application":



            Now, select "Manage User Permissions" from the "People" section:
              
           From this Window, I've added my AD Group (in blue):

                


The settings for my AD Group is : thus, only users present in this AD Group will be able to create on demand their mySite when entering their mySite URL : http://mySite-uat.xxx.net
               

Do not forget to uncheck the "Create Personal Site" entry to all other groups, otherwise everybody from the organisation will be able to create his mySite.
               





That's all folks



MissingWebPart Error in SharePoint 2010

Hi all,

Today I found useful cmdlets to diagnose and clear those errors in the Content DB of my SharePoint 2010 Farm.

How to proceed:

Step 1: Inspect the DB
-          Test-SPContentDatabase -name <ContentDB_Name> -webapplication <Web App URL>

Step 2:
-          Select the WebPart Class GUID

Step 3:
           -     Create the SQL Function and execute it into PowerShell:

function Run-SQLQuery ($SqlServer, $SqlDatabase, $SqlQuery)
{
    $SqlConnection = New-Object System.Data.SqlClient.SqlConnection
    $SqlConnection.ConnectionString = "Server =" + $SqlServer + "; Database =" + $SqlDatabase + "; Integrated Security = True"
    $SqlCmd = New-Object System.Data.SqlClient.SqlCommand
    $SqlCmd.CommandText = $SqlQuery
    $SqlCmd.Connection = $SqlConnection
    $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter
    $SqlAdapter.SelectCommand = $SqlCmd
    $DataSet = New-Object System.Data.DataSet
    $SqlAdapter.Fill($DataSet)
    $SqlConnection.Close()
    $DataSet.Tables[0]
}

-          Run this command with the related WebPart Class GUID:

Run-SQLQuery -SqlServer "SRV_DATABASE" -SqlDatabase "SharePoint_Content_sharepointWorkgroup17" -SqlQuery "SELECT * from AllDocs inner join AllWebParts on AllDocs.Id = AllWebParts.tp_PageUrlID where AllWebParts.tp_WebPartTypeID = '9812863c-ee62-dab6-57f5-79e9d4d36022'" | select Id, SiteId, DirName, LeafName, WebId, ListId, tp_ZoneID, tp_DisplayName | Format-List


Step 4:
-          The result will give the below info, with the URL where the Missing Web Part is located:

Id                         : a5da7b36-083f-4d07-b50b-8f1fc8d7bbe9
SiteId                   : 53061278-8b1d-4d6d-9dce-8568f90c5574
DirName              : Sites/WW12000012/Sandbox/TestWSServiceLevelDashboard
LeafName            : default.aspx
WebId                 : 2ab691b1-0d74-4bf2-9524-c6b1d969cfac
ListId                   :
tp_ZoneID           : Left
tp_DisplayName  :



                  Adding at the end of the URL "?contents=1" will let SharePoint to show the "Web Part Page"


-          So, here are the steps that I follow to remove the “ErrorWebPart”:

1- select the Error rows
2- click on “Close” to set them as “No” for the “Open on Page?” column
3- select the same Error rows then Delete them



Step 5:
-          Execute again the “Test-SPContentDatabase” to check that all entries for the MissingWebPart are gone.




That's all folks




How to replace an existing URL located in the Top Navigation Bar

Hi All,

Today's request is to replace the Hyperlink in the navigator bar, as the referenced site URL has changed.




And last but not least, the request is to change this hyperlink to all sites inside the Web App: more than 1800 Site Collection.


This is the used Code:

#----------------------------------------------------------------------
#Below the code to update the topnavigationbar
#  for all Site Collection of the mentioned Web Application .
# Author : Marc Mathot
# Date: November 2013
#----------------------------------------------------------------------
$Webs = Get-SPSite -WebApplication "http://SharePoint.Contoso.com"  -limit ALL | Get-SPWeb -limit all

Foreach($Web in $Webs)
{
$TN = $Web.Navigation.TopNavigationBar | Where-Object {$_.Title -eq "Landing Page & Wiki"}
if ($TN.url -like "http://SharePoint.Contoso.com*")
{
   write-host "Updating $($Web.url)"
  “Updating $($Web.url), $($TN.Url)” | out-file D:\temp\LandingPageUpdate.csv   -append
    $TN.Url = "http://NewSharePoint.Contoso.com/Pages/LandingPageWikiDefault.aspx"
    $TN.update()
}
}
#----------------------------------------------------------------------

Also, in parallel, I had to modify the template used to create the new sites into this Web App.
Doing this will avoid having to run this script periodically to correct the changes.




That's all folks

Thursday, 28 November 2013

PowerShell cmdlets for SharePoint ::: Check DB that must be upgraded

Hi all,

Today, I’ll write down the PowerShell cmdlets used to diagnostic and solve the error “Database is in compatibility range and upgrade is recommended”.

The reason of this error is simple: I ran the SharePoint Feb 2013 Cumulative Update on my production Farm, and I got errors.
Thus, some DB’s are upgraded, other are not.

Now, I want to list them, and check in my test environment if I can upgrade each DB one by one without having my entire Farm down.
If my farm is down during the process, I must prepare a technical activity and work on it during the night.

I found a post from academicjargon giving the cmdlets to use. 

List DB that need to be upgraded:
Get-SPDatabase | ?{$_.NeedsUpgrade –eq $true} | Select Name

List DB that need to be upgraded and upgrade them:
Get-SPContentDatabase | ?{$_.NeedsUpgrade –eq $true} | Upgrade-SPContentDatabase

And this cmdlet if you want to upgrade one specific content DB:
                Get-SPContentDatabase –Identity SP2010_MySiteContentDB | Upgrade-SPContentDatabase





Job’s done.

Thursday, 1 August 2013

Error 404 with Calendar Overlay across 2 Web Applications (part 2)

Hi all,

This is the reply that I’ve received this morning from our Vendor concerning the Calendar Overlay issues between multiple Web Applications: “it’s by design”.
So, no fix can be expected for this at the moment.

Therefore, I recommend educating the end user to open the item in the correct Web Application when needed.


You can find hereunder the complete explanation:


--------------------------------------------------------------- 
Hello Marc

As I also could repro the issue, MSFT did further research and found that this behavior is ‘by design’.
The issue has been addressed by the product group earlier and this was their answer :


It turns out it is by design:
=====================

We have conducted a thorough investigation into this matter and have determined the issue is Design Change Request in a feature area of substantial complexity. This complexity precludes making changes in this area outside of a major release.

The SharePoint calendar aggregation feature was designed to aggregate calendars within a single web application.
The calendar can aggregate across alternate access mappings, but not across apps. The alternate access mapping support did, however, make it appear that calendars could be aggregated across multiple web apps, but that is not a supported scenario. Adding support for cross web application calendar aggregation would involve significant feature work and as such, is not possible in a QFE.

Microsoft carefully reviews all Hotfix requests, as each code change must maintain or improve both quality and stability of the product.
In this instance, the risks to product quality and potential for destabilization are too high to permit changes in this area outside of a major release.

We thank you for bringing this issue to our attention and continuing to work with us on improving our products for customers worldwide.


The response is actually coming from the product group and they have no ETA on this nor if it will be fixed or not in future releases.
--------------------------------------------------------------- 



Voilà.


Wednesday, 31 July 2013

Error 404 with Calendar Overlay across 2 Web Applications (part 1)

Hi all,

Last week, I received a mail asking me if there was an issue with SharePoint.
The reported problem was that the client got an “Error 404” page when opening an item in her Overlay Calendar.

So, first thing first, is to reproduce the issue;

The client is using a calendar in her SharePoint Site (let’s call it TT2013MMA from the shpTeamCalendar Web Application).
Then she added the calendar of another site (let’s call it WW2013MMA from the shpWorkCalendar Web Application).

All is working like a charm, as the items of both calendars are correctly added, named in the TT2013MMA Calendar.

The problem start when you click on one of the items.
If the item is from the same calendar (the TT2013MMA), the details of this item is opened and can be reviewed/modified.
If the item is from the calendar located on the other Web Application (WW2013MMA), we got a nice looking 404-Error page not found.

I made some research, and I notice that doing calendar overlay across multiple Web Application gave the same problem.




So, at the request of Microsoft, I’ve reproduce with success the issue in my Test Farm with 2 brand new Web Applications.


Server name : test.domain\TestServerName

Tests were done with in both sites: test.domain\MyLogin (Mathot Marc)

Calendar of the second Web App : http://shpTeamCalendar-test.domain/sites/TT2013MMA


And the item added from this calendar are in green.

The overlayed calendar (from the second Web Application), is on this site : http://shpTeamCalendar-test.domain/sites/TT2013MMA
The items from the TT2013MMA calendar are in yellow.


Calendar using the Overlay in the shpWorkCalendar Web Application:



 Calendar from the second Web Application : shpTeamCalendar






Now, let’s check the URL pointing to the different items in the shpWorkCalendar:
                The URL is correct :
-          Web Application of the Calendar : shpWorkCalendar
-          Site (WW2013MMA) is created on the shpWorkCalendar Web Application



The URL of the item is incorrect:
-          Web Application of the calendar is shpWorkCalendar
-          Site (TT2013MMA) is created on shpTeamCalendar and NOT on shpWorkCalendar.
SharePoint is pointing to the source Web Application (shpWorkCalendar) instead of the correct URL where the item was created.





Same fort his second item :
                The correct URL must be : http://shpTeamCalendar-test.domain/sites/TT2013MMA/Lists/Calendar/DispForm.aspx?ID=2








And also for the last one:



  
Result on clicking on the NOK item, is a Error-404 page.


My vendor already made testing, and had the same results as mine.
Now, waiting for the Microsoft specialist to make the same tests, and give his feedback.



So, as far as from now, I have no solution, nor workaround.


... to be continued...