[BUG] - Set-PnPPageTextPart and Set-PnPClientSideText don't working to update text on pages #1079
Unanswered
WagnerJoseS
asked this question in
Q&A
Replies: 1 comment
-
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I hope I'm sending this problem to the right place :)
I'm trying to change the texts in the text webparts and unfortunately it's not working for me or in Azure functions.
Connect-PnPOnline $siteURL -ClientId $clientId -ClientSecret $clientSecret
$newPage = Get-PnPClientSidePage "$pageTitle.aspx"
$textControls = $newPage.Controls | Where-Object {$_.Type.Name -eq "PageText"}
foreach ($textControl in $textControls){
Set-PnPPageTextPart -Page $newPage -InstanceId $textControl.InstanceId -Text "Any text"
}
The error that shows
Set-PnPPageTextPart : CSOM service exception
No linha:4 caractere:5
• Set-PnPPageTextPart -Page $newPage -InstanceId $textControl.Insta ...
• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
• CategoryInfo : WriteError: (:) [Set-PnPPageTextPart], CsomServiceException
• FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Pages.SetClientSideText
I also tried to use the command but it shows the following message
Set-PnPClientSideText -Page $newPage -InstanceId $textControl.InstanceId -Text "Any text"
AVISO: Please use 'Set-PnPPageTextPart'. The alias 'Set-PnPClientSideText' will be removed in the 1.5.0 release
Set-PnPClientSideText : CSOM service exception
No linha:3 caractere:5
• Set-PnPClientSideText -Page $newPage -InstanceId $textControl.Ins ...
• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
• CategoryInfo : WriteError: (:) [Set-PnPPageTextPart], CsomServiceException
• FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Pages.SetClientSideText
How do I update the texts on a page?
[]
Wagner José
Notice
Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:
Invoke-PnPSiteTemplate
orGet-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.Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
Expected behavior
Please describe what output you expect to see from the PnP PowerShell Cmdlets
Actual behavior
Please describe what you see instead. Please provide samples of output or screenshots.
Steps to reproduce behavior
Please include complete script or code samples in-line or linked from gists
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name "PnP.PowerShell" -ListAvailable
)Which operating system/environment are you running PnP PowerShell on?
Beta Was this translation helpful? Give feedback.
All reactions