In other news in Simpsons: SharePoint Search stopped indexing some properties again.

Issues with User Profile Property visibility in Search-powered functionalities

This article applies to a lot of different issues you might be having with your SharePoint-powered site, or even custom functionality like mobile apps using SharePoint’s search index. I’ll list a few of the situations, which could be caused by these issues, below: You’re using Search to show a list of User Profiles with their properties, but it’s showing outdated or missing information Your intranet has the classic “Upcoming Birthdays” -webpart (only weather and lunch lists are more classic than that!) This webpart is not […]

Broken SharePoint - it's basically an art form

Problematic behavior of web.AddSupportedUILanguage(int lcid) in SharePoint 2013 and 2016

Every now and then, an API or a method call comes along, that you need to be very careful with. “Microsoft.SharePoint.Client.Web.AddSupportedUILanguage()” seems to be one of them. In this post, I’ll try and document my findings and workarounds for said method!  Issues and solutions Posts Related to “Problematic behavior of web.AddSupportedUILanguage(int lcid) in SharePoint 2013 and 2016”:SharePoint Localization – a (somewhat) comprehensive how-to!The Scary Anatomy of a Microsoft License Fraud4 ways to enable Custom Scripts for a SharePoint site collection

Let me explain SharePoint...

5 ways to enable Custom Scripts for a SharePoint site collection

This article explains how to enable custom scripting for any SharePoint site collection. This is functionally equivalent with setting setting “-DenyAddAndCustomizePages 0” or disabling the NoScript feature. Different instructions and solutions apply to SharePoint Online, and on-premises scenarios (SharePoint Server 2013, 2016 and probably 2019) – so see below for all of them. Different solutions are required to resolve the issue for different target sites: Modern SharePoint Team Sites (attached to Office Groups if on SharePoint Online, and without one if On-Premises) Modern SharePoint Communication […]

MFW another API just stops working without returning any errors

How to fix Twitter embed in SharePoint

Twitter embed has a stupid, built-in failure condition: if the User Agent contains IE10 or older, the embed script will not load. This causes SharePoint embeds to fail. This post describes how to fix that.

How to show a pop-up in SharePoint

This ages old trick deserves to be published – since it makes it easy to quickly show info from pretty much any another page on pretty much any Classic SharePoint page (in a SharePoint-compatible pop-up). So, here goes: Using SharePoint’s JavaScript library to open an arbitrary pop-up Yes – SharePoint contains all the functionality out-of-the-box, and you almost don’t have to do anything yourself! Let’s see how this works. Okay – long story short. On all Classic SharePoint pages, you can call this function: SP.UI.ModalDialog.ShowPopupDialog(). Like […]

SharePoint doesn't work as intended

Opening a web part page in maintenance mode

Can’t access a web part page because of a broken web part? Yeah, that’s a classic issue – and it’s nicely ported into Modern world, too! In these cases, web part page maintenance mode comes in handy! There’s a query parameter available for accessing it. For whatever reasons, it’s different for Classic and Modern mode, though. Why make things easy if you can make them dificult, right? :)  Posts Related to “Opening a web part page in maintenance mode”:SharePoint-Teams -integration using a tabThe Scary Anatomy […]

Let me explain SharePoint...

Don’t remove the root web of your classic SharePoint Site Collection!

A quick heads-up – if you remove the root site (or RootWeb, like it’s called in the code) of your classic SharePoint Site Collection, that’s going to cause you some grey hairs. It might even, in some rare cases, be unrecoverable! Why? Whereas you can always restore a normal site from the site collection recycle bin, the root site you can’t. You actually can’t access the recycle bin after removing the root site, nor can you make magic happen with PowerShell commandlets anymore. The Recycle […]

PowerShell header

Using PowerShell to set ULS logging level to “extra verbose” to catch all the events in the logs

This blog post describes how set the SharePoint’s ULS level to “Extra Verbose” (VerboseEx) using PowerShell. This is not possible using the browser UI, so some POSH magic is required! Luckily, it’s quite straightforward, but to avoid filling your hard drive(s) with huge log files, you should reset the level when you’re done debugging! Description of the solution By default, ULS logging is somewhat non-detailed. This means that a lot of data that could be used to debug issues is omitted. The UI cannot be […]

Anonymous access in SharePoint 2013

Using PowerShell to modify anonymous access permissions on SharePoint On-Premises

This post is about managing Anonymous Access on a SharePoint site (SPWeb) using PowerShell commandlets. It’s often a lot more feasible and even easier than using the browser interface! In some cases, it’s borderline impossible to avoid it anyway – since accessing the GUI switch might not be possible. Description Assume you have a site collection that’s you have published to the whole world. You’ll have anonymous access enabled at both web application and site collection -levels, and configured permissions at the root web -level. […]

Malformed web.config causing a Parser Error

“Server Error in ‘/’ Application” or “Parser Error” – it’s actually a malformed web.config killing your ASP.NET-application or SharePoint

This post describes how to resolve a kind of cryptic and oddly misdescriptive error message about Parser Error on your ASP.NET application or (an On-Premises) SharePoint site. I ran into this after deploying wsp-packages to a SharePoint farm, but you can apparently get this on ASP.NET MVC sites, too. The error doesn’t actually tell you what’s wrong, so figuring it out took a while. Hopefully it’ll help you, though! Symptoms: Parser Error from a random-looking location Once you navigate to your web- or SharePoint site, you only […]

PowerShell logo

Quickest way to download all the wsp-packages in a SharePoint farm

Sometimes – pretty often in the good old on-premises world, actually – you’ll need to have a copy of all the packages that are deployed to a certain farm. So – how to download all of the deployed farm solutions (essentially, cabinet files renamed to .wsp) from a farm? Luckily, it’s quite easy! Solution To download all deployed farm solutions (wsp-packages) from a SharePoint farm is pretty simple using PowerShell. No need to download individual packages through cumbersome interfaces! You don’t even have to open […]

SharePoint2013

How to properly use SPWeb.AllowUnsafeUpdates?

At times you may need to allow unsafe updates for SPWeb objects to get your code to run. This, in SharePoint’s C# full-trust code, is done by setting SPWeb.AllowUnsafeUpdates to true. However, as this is an exception to security settings, you should generally avoid it. When you can’t, it’s a good practice to limit the change to as small a scope as possible. This is true even though the setting is only persisted for the duration of the request (unless the SPWeb object was gotten […]

SharePoint List Field Name creation dialog - the internal names for created fields are generated from the display name, and often end up being quite messy!

Programmatically creating readable internal names for new SharePoint fields

This post is about a small programmatic workaround to creating new SPFields for SPLists in SharePoint with human-readable internal names. This is mainly a usability improvement for your editors (and doesn’t change your life that much), but at the very least they will probably appreciate it! In short, I’ll show you how to avoid SharePoint’s dirty encoding (like replacing a space with “_x0020_”). This appliesto when you’re using server-side code to generate fields. Problem: non-readable internal names for SharePoint list fields When you create a […]