Fix SharePoint Document Library Web Part Error When Opening Folders
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.

- 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.
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.
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.
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.
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.
Click the 'Delete' or 'Close' button on the toolbar to completely remove the corrupted web part from the page.
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.

Create a Support Ticket in the Microsoft 365 Admin Center
If the issue persists across multiple pages or specifically affects one tenant, it requires a backend investigation by Microsoft support engineers.
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. Download the Software: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install and Launch: Run the installer, complete the setup process in minutes, and open WPS Office.
- 3. Open Your Files: Drag and drop your Microsoft Office files directly into the application to start editing seamlessly.

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.




