does this fix the -autoinclude?
I still get pages auto included even if I set it to $false.
Basically each page that gets newly created has the -autoinclude switch.
If I set it to $false, the page still appears twice in the menu, because I manually “get” it in the order I want.
-AutoInclude is a switch. Are you just removing it or setting it like: -AutoInclude:$false? I can try it in a sec. I didn’t realize it was a problem.
I’ve noticed that saving a page edited in web, takes a long time. or at least it takes a long time for the animation of the save button to finish, but the actual page is refreshed and updated quick.
Didnt see it in the changelog but just tested the authentication issues again, and still cant get access to scripts on 5.6.7 with the following permissions:
Not seeing this behavior. I’m only trying a simple app so maybe I’m not understanding how to recreate it. App only includes one page manually and that page is not auto-included.
# Only includes one page but auto includes the other.
New-UDApp -Pages @(
Get-UDPage -Name "Test1234"
)
# No auto include
New-UDPage -Url "/test123" -Name "Test1234" -Content {
'Hello, world!!~!!!!!'
}
# Auto included
New-UDPage -Url "/test2" -Name "Test" -Content {
'Hello, world!'
} -AutoInclude
It looks like Adam was replying to someone else when he mentioned being fixed in 5.6.8. For your issue, you advised that you’re setting it as “-AutoInclude $false”. This is incorrect syntax for a switch parameter. Have a look at a sample I put together; you can run it to see the results as commented.
To summarize; if you don’t want to include a switch in a command, simply omit it from your command. Alternatively, you need to use the syntax of -SwitchName:$false to include it as false.
function test {
param(
[Parameter(Mandatory=$false)][switch]$testSwitch
)
if ($testSwitch) {
Write-Information -MessageData "Switch activated!" -InformationAction Continue
} else {
Write-Information -MessageData "Switch not activated!" -InformationAction Continue
}
}
test # not activated
test -testSwitch # activated
test -testSwitch:$false # not activated
test -testSwitch $false # error due to incorrect syntax
Thank you.
You are right, my Syntax was wrong.
But meanwhile I have tried with the correct syntax and as well with splatting or just omitting the switch.
Thing is:
When creating a new page, it comes with the Auto include parameter by default.
And whatever I try, I can’t get rid of the auto-included page in the menu.