Power Pages Actions Upload errors when using enhanced modelVersion = "2"
My new Power Pages portal uses enhanced model version = 2. I've successfully download local copy of its files with the following PAC CLI command: pac powerpages download --path '..\portal' --webSiteId $websiteId --overwrite true --modelVersion 2
However when I would like to upload it back using VS Code Power Pages "Upload" command from menu "pac pages upload" command is executed in the background without specifying modelVersion and it results with the following error:
Error: Power Pages entities for standard data model (v1) aren't available on this org, please install required packages on this org. If you are trying to upload to enhanced data model (v2), pass model version aFeedback, Suggestions, Issues: https://github.com/microsoft/powerplatform-build-tools/discussions
Could you please update Power Pages Actions to support enhanced model of Power Pages portals?
Hi @gashupl, thanks for opening the issue.
- Can you please verify if the site is using Enhanced Data Model or Standard Data Model? Determine whether your site is using the standard or enhanced data model
- Ensure that you are logged into both PAC and VS Code using the same account.
- After above steps, is your site showing under Other Sites or Active Sites?
Hi @priyanshu92
- Checked - my site Data Model = Enhanced
- I checked both VS Code Power Platform tools and PAC CLI command line - my environment is the same and I'm logged with the same account into it.
- My site is visible in "Other Sites" in Power Pages Actions section.
FYI: The exported portal configuration may be found here: https://github.com/gashupl/letsmeet/tree/main/portal/lets-meet---letsmeetdev and script used for export is here: https://github.com/gashupl/letsmeet/blob/main/scripts/portal-export.ps1 Maybe they will be somehow useful when investigating this issue.
@gashupl Are you trying to upload the website to the same environment you downloaded it or to a different environment?
@priyanshu92 The same environment.
Okay. Do you see the website under Active or Inactive sites in Power Pages Home? If you are uploading the website to the same environment you downloaded it from then I would expect it to show under Active or Inactive sites.
@priyanshu92 On the Power Pages management Portal site is visible in Active section:
In Power Pages Pane in VS Code - "Other Sites":
Could you try logging out of pac and VS code and logging in back again?
@priyanshu92 Yes. I've tried to do this but still no success. Nevertheless I'm not sure why we are checking all this things, when the problem is in my opinion quite simple and it is about Power Platform tools lack of support for power pages enhanced data model.
Let me explain this again:
- Default Data Model version for PAC CLI tools is "1" (Standard).
- My Site uses Enhanced Data Model so the only way to export it to the local drive is with "pac pages download --modelVersion 2" command
- When I try to upload Site using VS Code Extension - it executes "pac pages upload" command behind without specifying model version. The result is the mentioned-before error:
"Error: Power Pages entities for standard data model (v1) aren't available on this org, please install required packages on this org. If you are trying to upload to enhanced data model (v2), pass model version as "2"."
The support for Enhanced Data Model is already present. When you click on Upload, the extension figures out the data model version and issues an upload command using that version. There are 2 issues you are facing:
- The site is not being shown in Active Sites list.
- Even from other sites, when you upload, it should upload using Enhanced Data Model.
Note: When uploading from other sites, we check if Enhanced Data Model entities are present in the environment you are connected.
@priyanshu92 Ok. Any other things I could do? Are there any specific files or folder structures I could check which should identify the downloaded page as active one using enhanced model?
Could you please create a support ticket for this issue?