sppnp-extract-configuration does not work with server relative list URLs
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
I want to export a list with all its items. The configuration schema states, that I should be able to use /Lists/<Internal Name>, but nothing is being exported. This is my current configuration:
{
"$schema":"https://aka.ms/sppnp-extract-configuration-schema",
"persistAssetFiles": true,
"handlers": [
"Lists"
],
"lists": {
"lists": [
{
"title": "/sites/xyz/Lists/MyList",
"includeItems": true
}
]
}
}
For title I tried:
/sites/xyz/Lists/MyList/Lists/MyListLists/MyListlists/MyList/MyListMyList
Only the display name works.
I found this line, which should actually perform this check: https://github.com/pnp/pnpframework/blob/ac4dc39f564fcaa55e140bd7d778149360a265f7/src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectListInstanceDataRows.cs#L246
With pnpjs:
import { sp } from "@pnp/sp/presets/all"
(() => {
sp.web.getList('/sites/xyz/Lists/MyList').rootFolder
.get()
.then(console.log)
})()
prints: { ..., ServerRelativeUrl: "/sites/xyz/Lists/MyList", ... }
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/lib/PnP.Framework/Provisioning/ObjectHandlers/ObjectListInstanceDataRows.cs around line 246 and compare the documented server-relative list URL forms with the supplied configuration. Use the configuration and pnpjs example from the report to reproduce the behavior; done means a server-relative URL such as /Lists/MyList exports the list items as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100