SharePoint maintenance mode to track webpart issue

As a SharePoint consultant, I often bump into issues with pages in SharePoint OnPrems and Online. To resolve these cases, we – SP consultants – need to deploy our super magic powers (what our clients think we have) 🙂

Most of the page, an error in a page is due to a bug in a webpart raising an exception, sometimes it’s a delegate control but this is another story for another blog post. Here is one magic trick to debug the pages and identify which webpart is running wrong.

SharePoint OnPrems / Classic

Starting from SP 2010, and for next version of OnPrems installation, just add ?contents=1 at the end of the page URL. This will open the page in maintenance mode and display all webparts in this page.

Modern SharePoint

Like a lots of developers I tried the old way and failed … thanks to this Microsoft support article, it gives you the right URL suffix to add to your URLs to enter the web part maintenance mode

In the address line of your browser, append ?maintenancemode=true to the end of the URL for the page. Checkout the Environment property in the mainten

You can find more documentation on these links ➡️ Maintenance mode for client-side web parts | Microsoft Docs and ➡️ Open and use the web part maintenance page (microsoft.com)

Bonus : how to disable SPFx web parts ans extensions

Ayt the end of this nice Microsoft article there is a golden tips ➡️ « If you need to troubleshoot a SharePoint page to see if there is a SharePoint Framework extension or web part causing issues you can append ?disable3PCode=1 to the URL to disable loading of SPFx components » that helped me a lot recently, so I share it to you.

Master piece : all useful SharePoint URLs

You can find every useful SharePoint URLs to save your life every day with SharePoint developement :Useful SharePoint URLs – SharePoint Stuff