When you modernize a classic SharePoint site, the navigation menu often stops working correctly. Links disappear, custom nodes fail to load, or the entire navigation bar renders as a blank area. This happens because the modern user interface uses a different navigation engine than the classic experience. This article explains why navigation breaks during site modernization and provides specific workarounds to restore and stabilize your menu structure.
Key Takeaways: Classic Site Navigation After Modernization
- Structural navigation vs. managed navigation: Structural navigation from classic sites is not supported in modern pages and must be replaced.
- SharePoint admin center > Settings > Classic site settings: The toggle to enable structural navigation on modern pages is available but limited.
- PowerShell command Set-SPOModernNavigation: Use this to force a specific navigation type for a site collection.
- Custom script and JavaScript links: These stop working after modernization because the modern UI blocks them by default.
Why Modernization Breaks Classic Navigation
Classic SharePoint sites use structural navigation, which displays subsites and pages in a hierarchical tree. The modern experience uses hub navigation and megamenu styles that rely on a flat, site-collection-level structure. When you apply a modern template to a classic site, SharePoint tries to convert the old navigation, but the conversion is incomplete. The modern UI reads navigation from a different data source: the SharePoint Online navigation term store instead of the site’s SharePoint Server-style navigation settings.
Three specific causes lead to broken navigation:
Structural Navigation Is Not Supported
Classic sites often use structural navigation to show subsites in a drop-down list. Modern pages do not support this display mode. If your classic site relied on structural navigation, the menu will appear empty or incomplete after switching to a modern template.
Custom Script Links Are Blocked
Many classic sites add custom JavaScript or CSS via the navigation settings. Modern SharePoint blocks custom scripts by default for security reasons. Any link that pointed to a script file or an external URL with a script handler will break.
Term Store Changes Are Not Applied Automatically
Modern navigation is driven by the term store in the SharePoint admin center. When you modernize a site, the existing navigation nodes are not automatically migrated to the term store. You must manually recreate the navigation hierarchy in the term store or use PowerShell to move it.
Steps to Restore Navigation After Modernization
Follow these steps in order to fix navigation that broke during site modernization.
- Check the current navigation type
Go to Site Settings > Navigation. If the page shows a message like “Structural navigation is not supported on modern pages,” you have a classic navigation structure. Note whether it uses structural navigation or managed navigation. - Switch to managed navigation if needed
If your site uses structural navigation, you must convert it to managed navigation. In the SharePoint admin center, go to Content > Term store. Create a new term group for your site’s navigation. Add terms and subterms that match your old menu structure. Then, on the site, go to Site Settings > Navigation and select Managed Navigation. Point the navigation to your new term set. - Enable modern navigation via PowerShell
Open SharePoint Online Management Shell. Run the commandSet-SPOModernNavigation -SiteUrl "https://yourtenant.sharepoint.com/sites/yoursite" -NavigationType "Hub". This forces the site to use hub navigation. If you prefer the megamenu style, use"Megamenu"instead. This step ensures the site reads from the term store. - Re-add custom links as simple links
If your classic navigation included custom links to external sites or internal pages, add them again in the modern navigation editor. Go to Site Settings > Navigation. Under Managed Navigation, click Add Link. Enter the URL and display text. Do not add JavaScript or script references. - Test the navigation on multiple devices
Open the site in a private browser window. Click each menu item to verify it goes to the correct page. Check that the mobile view shows a hamburger menu with all links. If any link is missing, return to the term store and verify the term is published and the URL is correct.
If Navigation Still Has Issues After the Main Fix
Some navigation problems require additional steps beyond the basic conversion. The following issues are common after site modernization.
Navigation Shows Only the Site Name and No Links
This usually means the term store navigation is set up but the site is still using structural navigation. Run the PowerShell command Get-SPOModernNavigation -SiteUrl "https://yourtenant.sharepoint.com/sites/yoursite" to see the current navigation type. If it returns “Structural,” run the Set command again with the correct navigation type.
Subsite Links Disappear After Modernization
Modern navigation does not automatically include subsites. You must add each subsite as a term in the term store. Create a term for each subsite and set the URL to the subsite’s address. Then publish the term group. The subsite links will appear after the site cache refreshes, which can take up to 15 minutes.
Custom CSS for Navigation Stops Working
Modern SharePoint does not load custom CSS files that were referenced in classic navigation settings. To apply custom styling, use the SharePoint modern theming feature. Go to Site Settings > Change the Look. Select a theme that matches your brand. For advanced CSS, create a SharePoint Framework extension that injects custom styles into the modern navigation component.
Navigation Links Point to the Wrong Pages
This occurs when the URL in the term store is outdated. Open the term store in the SharePoint admin center. Find the term with the wrong URL. Edit the term and update the URL. Click Save and then Publish. The change takes effect immediately for most users, but some may need to clear their browser cache.
| Item | Classic Navigation | Modern Navigation |
|---|---|---|
| Navigation engine | Structural (hierarchical subsites) | Term store (flat or hub-based) |
| Custom script support | Allows JavaScript and CSS in navigation | Blocks custom scripts by default |
| Subsite display | Automatic with structural navigation | Manual via term store entries |
| Mobile rendering | Full menu on mobile | Hamburger menu with same links |
| Administration interface | Site Settings > Navigation | Term store + PowerShell |
You can now restore navigation on any modernized classic site by switching to managed navigation and rebuilding the menu in the term store. Check your site’s navigation type first with the Get-SPOModernNavigation PowerShell command. If you have many sites, consider using a hub site to share a single navigation structure across all modernized sites. The hub navigation feature syncs automatically and reduces the need to edit each site’s term set individually.