Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Enable-PnPPageScheduling doesn't trigger creation of required fields #3447

Closed
1 of 6 tasks
PeterFlops opened this issue Sep 27, 2023 · 1 comment · Fixed by #3469
Closed
1 of 6 tasks

[BUG] Enable-PnPPageScheduling doesn't trigger creation of required fields #3447

PeterFlops opened this issue Sep 27, 2023 · 1 comment · Fixed by #3469
Assignees
Labels
bug Something isn't working

Comments

@PeterFlops
Copy link

PeterFlops commented Sep 27, 2023

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Invoke-PnPSiteTemplate or Get-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues

Sorry - not sure if this is a PowerShell or Framework issue so logging here first.

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting

Issue

Expected behavior

Please describe what output you expect to see from the PnP PowerShell Cmdlets

When the Page Scheduling feature is turned on, a column named "Publish Start Date" is created in the Site Pages library to store the publish date/time info.

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.

When using the Enable-PnPPageScheduling cmdlet, the column isn't created. This also means that the field is missing from the Page Details panel.

image
image
image

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

  1. Have page scheduling disabled
  2. Connect to site with "Connect-PnPOnline -url $targetSite -UseWebLogin -ForceAuthentication"
  3. Run "Enable-PnPPageScheduling"

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)

2.2.0

Which operating system/environment are you running PnP PowerShell on?

  • Windows (PowerShell 7 in VS Code)
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify
@PeterFlops PeterFlops added the bug Something isn't working label Sep 27, 2023
@ohaak2
Copy link

ohaak2 commented Oct 2, 2023

Same for me. Also running PnP.PowerShell 2.2.0.

I've compared the exported site template of two newly created communication site - one with scheduled news publishing enabled and on without. Difference in the template are two additional features (one with scope web and one with scope site) and two new fields '_ScheduledVersion' and '_PublishStartDate' along with their field reference in the site pages library.

Now calling Enable-PnPPageScheduling on the site without scheduled page publishing is activating the web feature 'e87ca965-5e07-4a23-b007-ddd4b5afb9c7' and the site feature '3e2f7031-13c0-40b6-87bd-0af42ac62b8d' just fine. It's also adding the required site fields, but seems to omit setting the fields '_ScheduledVersion' and '_PublishStartDate' to the site pages library.

I've applied the changes manually - so effectively running the following three commands on the site like this:

Enable-PnPPageSchedulingAdd-PnPField -List 'Site Pages' -Field '_ScheduledVersion'

Title                     InternalName      Id
-----                     ------------      --
Scheduled Publish Version _ScheduledVersion b8f74c00-78dd-4ee1-bd62-411df2ff97d2

❯ Add-PnPField -List 'Site Pages' -Field '_PublishStartDate'

Title              InternalName      Id
-----              ------------      --
Publish Start Date _PublishStartDate 1488b62f-b70f-4f75-a384-7a04fbada949

However - even doing this steps manually won't do the trick for me. Scheduled page publishing is still switched off as far as the site's user interace is concerned:

image

And unfortunatley it's not just the GUI. Feature is definitely still not working. Something else seems to be missing.

So I guess the provisioning template isn't showing us the whole picture. Otherwise applying the changes mentioned above would do the trick. Template wise both sites are then identical in terms of configuration, but still only the one where I've switched on scheduled page publishing using the SharePoint user interface is acutally doing scheduled page publishing.

While having a one stop command to enable the functionality would be nice I could absolutely live with a more hand made solution for the moment. But with the curical information not even included in the provisioning template I've no idea where else to look for a sufficient approad to solve the issue.

@gautamdsheth gautamdsheth self-assigned this Oct 4, 2023
gautamdsheth pushed a commit to gautamdsheth/powershell that referenced this issue Oct 4, 2023
KoenZomers added a commit that referenced this issue Oct 8, 2023
Fix #3447 : issue with page scheduling feature.
gautamdsheth added a commit that referenced this issue Dec 12, 2023
* Update index.md

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update index.md

* Update Build-Site.ps1

* Update Build-Site.ps1

* Update index.md

* Fixing documentation build warnings

* Fixing documentation build warnings

* Fixing documentation build warnings

* Fixing documentation build warning

* Added changed entry for PR 3455

* Adding required permissions

* Adding newline

* Adding alias template file

* Removing deprecation notice

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Added silent authentication

* Feature: added output types to page cmdlets

* Feature: added output types for Principals cmdlets

* Update authentication.md added documentation for MFA enabled

* Feature: add support for RAC in site cmdlets

* Feature: added output types for site scripts and designs

* Nightly publish to PowerShell Gallery

* Fix #3447 : issue with page scheduling feature.
Refactor some code

* [FileVersion] Get-PnPSite change for VersionPolicy

* Nightly publish to PowerShell Gallery

* Add new command get-pnpretentionlabel (#3459)

* Add new command get-pnpretentionlabel

* Added the Identity parameter and graph permissions

* Added    [RequiredMinimalApiPermissions("RecordsManagement.Read.All")] attribute

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Update Set-PnPSearchExternalItem.md

Updating sample text from Dutch to English

* Resolve comment

* Nightly publish to PowerShell Gallery

* Feature #1346 - Improved Remove-PnPFlow cmdlet to throw error and add verbose logging

* Update authentication.md added images as suggested by the reviewer

Update authentication.md added images as suggested by the reviewer

* Nightly publish to PowerShell Gallery

* Created a new folder for authentication images

* Added screenshots for authentication article

* Update authentication.md added images references as suggested by the reviewer

* Nightly publish to PowerShell Gallery

* Adding PR reference

* Added PR reference

* Resolve comment

* Added PR reference

* Nightly publish to PowerShell Gallery

* Add a new command Get-PnPSiteVersionPolicy, revert the change in Get-PnPSite

* Added entry for PnP Core PR 1290

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Feature: add GCC support for some cmdlets

* Nightly publish to PowerShell Gallery

* Clarified the error message when running a PnPAdminCmdlet so it also includes a hint towards checking for PIM activation as many customers are using that nowadays and forget to enable it (#3492)

* Fix retrieving error detail in Get-UPABulkImportStatus (#3494)

* Fix retrieving error detail in Get-UPABulkImportStatus

* Handle exceptions when setting the error message

* Update CHANGELOG.md

* Additional cmdlet support for GCC

* Added changelog entry

* Fix  Bug 3495

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Update Set-PnPTenantSite.md (#3501)

Added -DisableSharingForNonOwners to documentation

* Update CHANGELOG.md

* Nightly publish to PowerShell Gallery

* Fixes #3504 Add message "Team Not found" if team is not returned  (#3502)

* Throw Error If Team Not found

* Update GetTeamsTeam.cs

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Add an optional Retry-loop around executing the search query

* Feature #2683 : added support for containers (#3497)

* Feature #2683 : added support for containers

* Improved container image

* Added gitlens

* Improve image

* Improve container process

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Allow to specify additional properties to include in Get-PnPSiteCollectionAdmin (#3521)

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Changed GetContentType to inherit from PnPWebRetrievalsCmdlet (#3518)

* Changed GetContentType to inherit from PnPWebRetrievalsCmdlet

* Added PR reference

* Adding extra spacing for readability and consistency

* Updated documentation to include the -Includes parameter

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Antti/update submitsearchquery docs (#3527)

* Update documentation for Submit-PnPSearchQuery

* Changes sentence ending to be consistent 😅

* Document LCIDs used by -Culture switch

* Update Submit-PnPSearchQuery.md

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Fix #3503 : fix return type for field (#3510)

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Remove the logic to look into the exception specifics with Reflection and just simply always retry

* Update wait time to match documentation.

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Fix #3404 - Update main.css

* Add AllowExternalSenders, AutoSubscribeNewMembers and MailNickname

* Add property mailNickname

* Add mailnickname

* Update documentation

* correct case of mailnickname

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Fixes #3163 (#3530)

* Fixes the bug where all -UseWebLogin auth requests go to the root site collection and implements an override for site-relative auth URI

* Remove unused using

* Update ConnectOnline.cs

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Fix #3520 (#3533)

* Add a switch to override "validating" tenant admin url

* How did that get there? 😶

* Revert "How did that get there? 😶"

This reverts commit 00f899f.

* Revert "Add a switch to override "validating" tenant admin url"

This reverts commit 802a519.

* Implement @gautamdsheth's feedback :)

* Update RenameTenantSite.cs

* Update RenameTenantSite.cs

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Nightly publish to PowerShell Gallery

* Fixed namespaces

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Fixed typos Microsft

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Adding contributors entry

* Adding changelog entry

* Changing exceptions not to be swallowed but shown in verbose and the exception to be thrown if it still happens on the last attempt

* Added changelog entry

* Adding modern list template Ids

* Adding notice with the -Delta parameter

Adding notice with the -Delta parameter that using it in combination with -Select and -Filter has limitations

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Added `-BusinessConnectivityServiceDisabled` to `Set-PnPTenant` (#3562)

* Added BusinessConnectivityServiceDisabled to Set-PnPTenant

* Added PR reference

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Adding request file links properties to site and tenant output (#3557)

* Cleanup of the file. Removing separate private properties and replacing by get/set properties to simplify.

* Adding CoreRequestFilesLinkEnabled, CoreRequestFilesLinkExpirationInDays, OneDriveRequestFilesLinkEnabled and OneDriveRequestFilesLinkExpirationInDays

* Adding RequestFilesLinkEnabled and RequestFilesLinkExpirationInDays

* Adding changelog entry

* Added BusinessConnectivityServiceDisabled

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Added Information Barriers information to the output of `Get-PnPTenantSite` (#3556)

* Added Information Barriers information to the output of `Get-PnPTenantSite`

* Added PR reference

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Adding possibility to set SAN when using `New-PnPAzureCertificate` (#3555)

* Adding possibility to set the Subject Alternative Names on the self signed certificate

* Adding changelog entry

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Renaming Get-PnPWebhooksubscriptions to singular notation to align with the other cmdlets. Added an alias for backwards compatibility. (#3551)

Co-authored-by: Gautam Sheth <[email protected]>

* Rename and bugfixes in `Get-PnPFolder`, `Get-PnPFolderFolder` and `Get-PnPFolderFile` cmdlets (#3421)

* Bugfixes in Get-PnPFolder

* Renaming Get-PnPFolderFile and Get-PnPFolderFolder as discussed

* Updating documentation

* Updated changelog to new cmdlet names

* Added example on combinging Get-PnPFolder with Get-PnPFileInFolder

* Updated example 7 to use the ExcludeSystemFolders parameter

* Bugfix

* Changing recursive parameter to recurse to align with get-pnpfileinfolder and get-childitem

* Applying feedback to keep the cmdlet backwards compatible

* Bugfix

* Adding ignore for obsolete warning

* Changing code to be backwards compatible

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Adding `-Detailed` option to `Get-PnPTenantDeletedSite` (#3550)

* Adding -Detailed option to Get-PnPTenantDeletedSite to optionally fetch more information on the deleted sites

* Adding changelog entry

* Adding PR reference

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Changes as per review comments

* [FileVersion] Add command to get progress for set version policy

* Feature #1644 : Add support for batch requests in
Invoke-PnPSPRestMethod

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Adding changelog entry

* Added changelog entry

* Nightly publish to PowerShell Gallery

* Fixed fetching user with apostrophe in UPN

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Adding documentation on -BusinessConnectivityServiceDisabled

* Changes to move this fix to a lower level so it also fixes it for 2 other cmdlets

* Adding changelog entry

* Updating notice on PnP PowerShell support for Azure Functions

* Add files via upload

* Add files via upload

* Updated steps on adding a custom certificate to reflect the updated webUI

* Add files via upload

* Add files via upload

* Nightly publish to PowerShell Gallery

* Adding .NET 8

* Update buildpr.yml

Adding .NET 8 build for Core SDK

* Changing to Core SDK 8.0 reference

* Adding missing quotes

* Check fix with slash

* Fix path for .NET 8

* Update PnP.PowerShell.csproj

* Update PnP.PowerShell.csproj

* Update buildpr.yml

* Implementation

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Update documentation

* Added changelog entry

* Nightly publish to PowerShell Gallery

* fix for bug 3589

* Nightly publish to PowerShell Gallery

* Cleanup

* Added changelog entry

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Update builddocsite.yml

* Fix docs site navigation

* Fix docs site nav again

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Typo fix

* Destination path resolved wrongly on MacOs

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Update Add-PnPFile.md

Updated examples 4, 5 and 6. 

The date examples used were 1/1/2016

Where mm/dd/yyyy is required. Examples using 12/28/2026 are therefore clearer.

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* New cmdlet remove-pnpmicrosoft365GroupPhoto (#3607)

* New cmdlet remove-pnpmicrosoft365GroupPhoto

* Update SetTeamsTeamPicture.cs

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Update CHANGELOG.md

* Adding to contributors

* Adding extra notice to parameters part

* new cmdlet get-pnpcontainer

* Nightly publish to PowerShell Gallery

* Added `Manage` and `FullControl` to `Grant-PnPAzureADAppSitePermission` (#3617)

* Added Manage and FullControl to Grant-PnPAzureADAppSitePermission

* Adding PR reference

---------

Co-authored-by: Gautam Sheth <[email protected]>

* Cleanup

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Nightly publish to PowerShell Gallery

* Update PnP.PowerShell.Tests.csproj

* Update PnP.PowerShell.csproj

* Create PnP.PowerShell.Suggestions.2.3.0.json

---------

Co-authored-by: erwinvanhunen <[email protected]>
Co-authored-by: Kshitiz Kalra <[email protected]>
Co-authored-by: Gautam Sheth <[email protected]>
Co-authored-by: Jenny Wu <[email protected]>
Co-authored-by: Reshmee Auckloo <[email protected]>
Co-authored-by: Gautam Sheth <[email protected]>
Co-authored-by: Giacomo Pozzoni <[email protected]>
Co-authored-by: Dave Paylor <[email protected]>
Co-authored-by: Antti K. Koskela <[email protected]>
Co-authored-by: Erwin van Hunen <[email protected]>
Co-authored-by: Christian Veenhuis <[email protected]>
Co-authored-by: jennywu <[email protected]_odspmdb>
Co-authored-by: Daniel Cecil <[email protected]>
Co-authored-by: wilecoyotegenius <[email protected]>
Co-authored-by: Pieter Veenstra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants