SOLVED

Enable modern site pages

Highlighted
Occasional Contributor

In my tenant i have several site collcetions, but for some of them i cant create modern site pages.

 

Is there anye Site features that has to be enabled disabled to get the modern site pages?

Or is there another explanation to this?

 

Thanks

14 Replies
Highlighted
If modern experience is the default one in the tenant (you can check this on the SPO tenant settings), you don't need to enable at a site collection level...but bear in mind that if you have any customizations in your site collections, it could happen that the new stuff is not exposed to you...in those site collections: do you see the classic UI or the new one for Document Libraries?
Highlighted

In all the site-collection I have the modern layout on list and libraries.

 

I use the gear in top right corner and choose Add new page, on some sites it opens a modern page but for some it only give me option to set page name.

Highlighted
Do you have any customizations applied to those sites where you are trying to create a modern page? Any feature you have enabled there? Which templates are the sites based on?
Highlighted

@Juan Carlos González Martín is right but could it also be a caching issue? i had some like issue couple of days ago first i had modern view then switch to classic to go back to modern but it did not go back untill a day later....

Highlighted
Best Response confirmed by Odd Arne Nohr (Occasional Contributor)
Solution

I had the same problem. I had to activate the SitePage feature in the site settings (see attached pic)

Highlighted

I have a similar issue.

1. Are you saying that classic sites that are migrated to SPO containing cusomizations (CSS) do not have the ability to utilize the new modern pages?

2. I have a subsite of this custom site that does not contain a custom CSS. I am able to create a new modern page with a name and save, but cannot edit the page. For example, I can add a Text element but cannot add text. I ensured that the Site Pages feature is enabled. 

3. I assume the new UX has been turned on for the site collection since I can create a new page in the subsite not containing the custom CSS. But not being able to edit it is baffling. 

Highlighted

Katie,

 

maybe you should refer to this topic as we discuss similar issues. 

Highlighted
I read through that topic before posting as it does not explicitly answer the questions I listed here.
Highlighted

I also just discovered that if you enable SharePoint Server Publishing in Site Features, you cannot create the new modern pages in your site. If you disable it, it works right away.

Highlighted
I will check this out. Thank you.
Highlighted

Hi 

Below powershell script worked for me.. I got it from microsoft technical team.

 

# Load SharePoint Online Client Components SDK Module
Import-Module 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll'

# Set script constants
$sitePagesFeatureIdString = 'B6917CB1-93A0-4B97-A84D-7CF49975D4EC'

# Set up client context
$userName = Read-Host "Username"
$password = Read-Host "Password" -AsSecureString
$siteUrl = Read-Host "Site Url"
$webUrl = Read-Host "Server-Relative Web Url"
$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName, $password)
$context.Credentials = $credentials

# Get the list of existing features
$web = $context.Site.OpenWeb($webUrl)
$features = $web.Features
$context.Load($features)
$context.ExecuteQuery()

# Verify that the Site Pages feature is not present in the web
if(($features | ? { $_.DefinitionId -eq $sitePagesFeatureIdString }).Count -gt 0)
{
Write-Host "The Site Pages feature is already enabled in this web"
return
}

# Add the Site Pages feature back to the web
$features.Add((new-object 'System.Guid' $sitePagesFeatureIdString), $false, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None)
$context.ExecuteQuery()

# Verify that the Site Pages feature is now present in the web
$web = $context.Site.OpenWeb($webUrl)
$features = $web.Features
$context.Load($features)
$context.ExecuteQuery()

if(($features | ? { $_.DefinitionId -eq $sitePagesFeatureIdString }).Count -gt 0)
{
Write-Host "The Site Pages feature has been successfully enabled"
}
else
{
throw "The Site Pages feature failed to be enabled"
}

 

Highlighted

Hi, from a functional perspective, what exactly does this script do? Does it enable a certain feature or does it directly make a specific site collection as root site collection ... ?

 

Thanks for your feedback!

Highlighted

This script enables the feature in the target site. With PNP powershell cmdlets we can achieve this just in few lines. Please refer to the script using pnp cmdlets below.

 

# Connect to a site
$cred = Get-Credential
Connect-PnPOnline -Url <Site URL> -Credentials $cred

 

# Enable site pages feature at web
Enable-PnPFeature -Identity B6917CB1-93A0-4B97-A84D-7CF49975D4EC -Scope Web

 

Highlighted

@Rajashekhar Sheelvant  This is the usual muddled, poorly designed user experience we've come to expect from Msft. No competent company would release 2 incompatible parallel ui's into production environments. None of the questions asked here should have to be asked. Total fail.