powerplatform-vscode icon indicating copy to clipboard operation
powerplatform-vscode copied to clipboard

Power Pages Actions Upload errors when using enhanced modelVersion = "2"

Open gashupl opened this issue 11 months ago • 11 comments

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?

gashupl avatar May 29 '25 06:05 gashupl

Hi @gashupl, thanks for opening the issue.

  1. 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
  2. Ensure that you are logged into both PAC and VS Code using the same account.
  3. After above steps, is your site showing under Other Sites or Active Sites?

priyanshu92 avatar May 30 '25 09:05 priyanshu92

Hi @priyanshu92

  1. Checked - my site Data Model = Enhanced
  2. 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.
  3. 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 avatar May 30 '25 11:05 gashupl

@gashupl Are you trying to upload the website to the same environment you downloaded it or to a different environment?

priyanshu92 avatar Jun 02 '25 06:06 priyanshu92

@priyanshu92 The same environment.

gashupl avatar Jun 02 '25 06:06 gashupl

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 avatar Jun 02 '25 06:06 priyanshu92

@priyanshu92 On the Power Pages management Portal site is visible in Active section:

Image

In Power Pages Pane in VS Code - "Other Sites":

Image

gashupl avatar Jun 02 '25 12:06 gashupl

Could you try logging out of pac and VS code and logging in back again?

priyanshu92 avatar Jun 03 '25 04:06 priyanshu92

@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:

  1. Default Data Model version for PAC CLI tools is "1" (Standard).
  2. 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
  3. 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"."

gashupl avatar Jun 03 '25 06:06 gashupl

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:

  1. The site is not being shown in Active Sites list.
  2. 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 avatar Jun 03 '25 07:06 priyanshu92

@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?

gashupl avatar Jun 09 '25 05:06 gashupl

Could you please create a support ticket for this issue?

priyanshu92 avatar Jun 09 '25 07:06 priyanshu92