Skip to main content

Posts

Showing posts from 2014

The Ribbon Tab with id: "Ribbon.Read" has not been made available for this page or does not exist. Use Ribbon.MakeTabAvailable(). at Microsoft.Web.CommandUI.Ribbon.Render(HtmlTextWriter writer) at Microsoft.SharePoint.WebControls.SPRibbon.Render(HtmlTextWriter writer)

Add this code in the webpart:   Page currentPage = this .Page; SPRibbon ribbon = SPRibbon.GetCurrent( this .Page); SPContext context = SPContext.Current; ribbon.MakeTabAvailable(SPRibbon.ReadTabId);   Add the Windows.Web.CommandUI dll reference.   Enjoy.  

Sharepoint 2013: Get all active tasks using SPSiteDataQuery for the current user (My Tasks)

My project was an intranet, a sub site monster that needed a query to show all the tasks for the current user. There were two options - recursive code (no thank you) or  SPSiteDataQuery . The key to the code is to limit the list query to the appropriate list type (see  here  for a list from Microsoft). In my case, it was "<Lists ListTemplate='107' />". Then add some simple CAML (thank you  Camldesigner ) and you are there. My final query was as follows:             SPSiteDataQuery q = new SPSiteDataQuery();             q.Webs = "<Webs Scope='SiteCollection' />";             q.Lists = "<Lists ListTemplate='107' />";             q.Query = "<Where><And><Or><Membership Type='CurrentUserGroups'><FieldRef Name='AssignedTo'/></Membership><Eq><FieldRef Name='AssignedTo'></FieldRef><Value Type='Integer'><UserID/><

Using Export and Import, you can migrate list from SP 2010 to SP 2013

Using Export and Import, you can migrate list from SP 2010 to SP 2013 but you have to make some manual changes. Export the list from SharePoint 2010 using either the Central Administration or PowerShell (Export-SPWeb). In the Central Administration, go to Backup and Restore > Export a site or list. Choose your list, and click Start Export Export-SPWeb –Identity http://sltfiler01/rechumanos/ -Path C:\tmp\CV.cmp -Itemurl "CV" -Force -IncludeUserSecurity  -IncludeVersions ALL Copy the exported list (.cmp file) to your desktop and change the extension to .cab. You can then extract it using a software like WinRar. Open the SystemData.XML file with an editor like NotePad++ and change the version from 14.0.0.0 to 15.0.0.0 , and the build version from your 14.0.x.x to 15.0.x.x (depending on the build you have on both your farms). For view the version export a little library from SP2013 and copy the line of version CabPack -->  http://download.cnet.com/Cab

Create a SharePoint 2013 Theme using Color Palette Tool (Web2)

Summary :  Create Custom Theme in SharePoint 2013 (Step-by-Step Tutorial), Create Theme in SharePoint 2013, Create new Composed look, SPColor.xml, SPFont.xml in SharePoint,Create Custom Theme in SharePoint 2013 – Step-by-Step Tutorial In SharePoint 2013, the theming engine was highly improved. You can Create Custom Themes by Creating Color palettes and Font Schemes, and uploading them to the Themes Gallery. Themes in SharePoint 2013 are defined two XML files: SPColor.xml -  defines the color palette, in which slots now have semantic names so that it’s more clear what UI elements will be affected when you change a color value. Also, themes now support setting opacity. SPFont.xml -  defines the font scheme and supports multiple languages, web-safe fonts, and web fonts. Because We’re So Good, Our Content gets Copied very Often. If you are not reading this on  LearningSharePoint.com  please read the Original article  Here for details, comments and updates on this post. How

Create a SharePoint 2013 Theme using Color Palette Tool (Web1)

Since SharePoint 2007, we have been introduced to different “Theme” engines within SharePoint. The idea behind the theming engine is great but is often underused. In other words, whether you are using the out-of-the-box Master Pages or created your own, Power Users can apply “Themes” to the core HTML that is the Master Page and change the look of their sites. In SharePoint 2013, the Theming Engine has been reworked once again, but this time making it much more accessible to everyone. You may find the option under “Change the Look” from the Site Settings. Change the Look of your SharePoint Site By now, you may have already heard about the styles or looks available as a gallery for Power Users of a SharePoint site. These available looks come with SharePoint. They are defined by .spcolor files in your Site Gallery under Site Settings. They are also called Composed Looks.  To change the look of your SharePoint Site, you simply click on the “Change the Look” link in your Site

Install CU's Process in SharePoint 2010/2013

First view Health Analyzer and repair the MissingFeatures, MissingAssemblys and MissingWebParts with the previos posts of this blog. Install SP1 or SP2 SharePoint service pack Install SP1 or SP2 SharePoint Language Pack Install SP2 Office Web Apps 2010 (Optional) 1. Open an Administrative command prompt.  2. Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN 3. Run  PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures Instal the CU's SharePoint 1. Open an Administrative command prompt.  2. Change directory to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN 3. Run  PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures Enjoy.

[MissingAssembly] Delete MissingAssembly issues from the SharePoint Health Analyzer using PowerShell

This script is prepared for drop the error. 3.- Run in PoweShell this command: .\MissingAssemblyDetail.ps1 -DBserver "INSTANCESQLNAME" -path "C:\Missing\inputassembly.txt" 2.- Create a txt file with this structure: COMPANY.GD.ERDocument, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e982416fbaf3e1a6;WSS_Content_tex.bannn.des 1.- Copy this script in MissingAssemblyDetail.ps1. param (     [string]$DBserver = $(throw "Missing server name (please use -dbserver [dbserver])"),     [string]$path = $(throw "Missing input file (please use -path [path\file.txt])") ) #Set Variables $input = @(Get-Content $path) #Addin SharePoint2010 PowerShell Snapin Add-PSSnapin -Name Microsoft.SharePoint.PowerShell #Declare Log File Function StartTracing {     $LogTime = Get-Date -Format yyyy-MM-dd_h-mm     $script:LogFile = "MissingAssemblyOutput-$LogTime.csv"     Start-Transcript -Path $LogFile -Force } #Declare SQL Query fun

[MissingSetupFile] - Delete MissingSetupFile issues from the SharePoint Health Analyzer using PowerShell

Paste this code in 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] } Set the parameters, sql instance name,  the sql contentdatabase  and the file path from the log of health analyzer: Run-SQLQuery -SqlServer "SQLSERVERINSTANCE" -SqlDatabase "WSS_Intranet01" -SqlQuery "SELECT * from AllDocs where SetupPath = 'Features\WebParts_WebPa

[MissingFeature] Database [*********] has reference(s) to a missing feature - Removing features from a content database in SharePoint 2010 using PowerShell

Open SharePoint PoweShell and paste this scripts: function Remove-SPFeatureFromContentDB($ContentDb, $FeatureId, [switch]$ReportOnly) {     $db = Get-SPDatabase | where { $_.Name -eq $ContentDb }     [bool]$report = $false     if ($ReportOnly) { $report = $true }         $db.Sites | ForEach-Object {                 Remove-SPFeature -obj $_ -objName "site collection" -featId $FeatureId -report $report                         $_ | Get-SPWeb -Limit all | ForEach-Object {                         Remove-SPFeature -obj $_ -objName "site" -featId $FeatureId -report $report         }     } } function Remove-SPFeature($obj, $objName, $featId, [bool]$report) {     $feature = $obj.Features[$featId]         if ($feature -ne $null) {         if ($report) {             write-host "Feature found in" $objName ":" $obj.Url -foregroundcolor Red         }         else         {             try {                 $obj.Features.Remove($feature.DefinitionId, $tr

STSADM Equivalent Commands in Powershell

This article lists Stsadm operations and their equivalent Windows PowerShell cmdlets. Where there is no one-to-one mapping between the operations and cmdlets, the table lists the specific Windows PowerShell parameters you must use to get the same functionality.   Stsadm operation Windows PowerShell cmdlet Activatefeature Enable-SPFeature Activateformtemplate Enable-SPInfoPathFormTemplate Addalternatedomain New-SPAlternateUrl Addcontentdb Mount-SPContentDatabase New-SPContentDatabase Adddataconnectionfile Install-SPDataConnectionFile Add-ecsfiletrustedlocation New-SPExcelFileLocation Add-ecssafedataprovider New-SPExcelDataProvider Add-ecstrusteddataconnectionlibrary New-SPExcelDataConnectionLibrary Add-ecsuserdefinedfunction New-SPExcelUserDefinedFunction Addexemptuseragent Add-SPInfoPathUserAgent Addpath New-SPManagedPath Addpermissionpolicy None Addsolution Add-SPSolution Addtemplate Install-SPWebTemplate Adduser New-SPUser