SharePoint Document Issues

Fix SharePoint Document Library Web Part Error When Opening Folders

Amos GikundaAmos Gikunda Nov 2, 2026 870 views

Question details

Users encounter an error when attempting to open folders within a SharePoint document library web part, even though the files display correctly and the folders open normally via Site Contents.

How to Fix SharePoint Document Library Web Part Error When Opening Folders
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Accessing and navigating nested folders within a document library web part placed on a SharePoint site page.
Observed behavior
The web part displays a 'Sorry, something went wrong' error message when a folder is selected, and recreating the page or web part normally does not resolve the issue.
Before you start

Ensure you have Site Owner or Full Control permissions to edit the affected SharePoint page, and have a Global Administrator account ready if you need to contact Microsoft Support.

Solution 1Recommended

Remove and Re-add the Web Part via the Maintenance Page

Using the hidden Web Part Page Maintenance view allows you to cleanly remove corrupted web parts that standard page editing mode fails to fix.

Sometimes a web part becomes corrupted in a way that standard page edits cannot fully clear. Accessing the backend maintenance page forces SharePoint to show all web parts, allowing you to forcefully delete the faulty instance.

1
Access the Maintenance Page

Navigate to the exact SharePoint page URL where the faulty document library web part is located. Click on your browser's address bar, type '?contents=1' at the very end of the URL, and press Enter.

2
Locate the Faulty Web Part

On the Web Part Page Maintenance screen, look through the list of deployed web parts and check the box next to the affected document library web part.

3
Delete the Web Part

Click the 'Delete' or 'Close' button on the toolbar to completely remove the corrupted web part from the page.

4
Re-add the Document Library

Return to the normal page view by removing the '?contents=1' parameter. Click 'Edit' on the page, insert a fresh document library web part, and configure it to display your target library.

Remove and Re-add the Web Part via the Maintenance Page
Safe Deletion: Deleting a web part from the maintenance page only removes its display module. Your actual files and folders stored in the underlying document library are completely safe.
Free Microsoft Office alternative

Seamlessly Manage and Edit Your Documents with WPS Office

While SharePoint backend issues might temporarily disrupt your workflow, you can rely on WPS Office as a free, lightweight, and highly compatible alternative to Microsoft Office. Edit your downloaded documents effortlessly without worrying about complex subscriptions.

  1. 1. Download the Software: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install and Launch: Run the installer, complete the setup process in minutes, and open WPS Office.
  3. 3. Open Your Files: Drag and drop your Microsoft Office files directly into the application to start editing seamlessly.
Fully compatible with Microsoft Word, Excel, and PowerPoint file formats.Lightweight installation ensures fast startup and smooth performance.Familiar and intuitive user interface with virtually zero learning curve.Built-in PDF editing tools for comprehensive document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why do folders open fine in Site Contents but trigger an error in the web part?

This discrepancy usually indicates corruption specific to the web part instance or a rendering glitch on the modern site page, rather than an issue with the underlying document library's structure or permissions.

Will deleting a web part delete the files inside the document library?

No. A web part is merely a display 'window' on a page. Deleting it only removes the module from that specific page, while the actual document library and all its files remain safely stored in Site Contents.

What does appending '?contents=1' to a SharePoint URL do?

It accesses the hidden Web Part Page Maintenance view. This page allows site administrators to view, troubleshoot, close, or force-delete corrupted web parts that are preventing standard page editing.