Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FilePicker defaultFolderAbsolutePath does not work Out of context #1023

Closed
Ofer-Gal opened this issue Sep 26, 2021 · 2 comments
Closed

FilePicker defaultFolderAbsolutePath does not work Out of context #1023

Ofer-Gal opened this issue Sep 26, 2021 · 2 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Milestone

Comments

@Ofer-Gal
Copy link

Ofer-Gal commented Sep 26, 2021

Category

[ ] Enhancement
[X] Bug
[ ] Question

Version [ 3.3.0 ]

Expected / Desired Behavior / Question

Assigning defaultFolderAbsolutePath to a folder not in the current context, should work regardless of where the webpart is running at.

Observed Behavior

Assigning defaultFolderAbsolutePath to a folder not in the current context, causes errors and shows no files.

Steps to Reproduce

if I run the webpart from https://ecgmcdev.sharepoint.com/_layouts/15/workbench.aspx
and defaultFolderAbsolutePath='https://ecgmcdev.sharepoint.com/teams/1689.006/DPCDocuments'
Shows error:
This folder is empty " and the console show

dist/node_modules/@pnp/spfx-controls-react/lib/services/FileBrowserService.js:234
[FileBrowserService.getSiteLibraryNameByInternalName]: Err='Something went wrong when executing request. Status='404''
dist/node_modules/@pnp/spfx-controls-react/lib/services/FileBrowserService.js:148
[FileBrowser._getListItems]: Something went wrong when executing request. Status='[HTTP]:404 -  [CorrelationId]:d84ef39f-d095-1000-0e66-d2dcff945c5b [Version]:16.0.0.21715'
dist/node_modules/@pnp/spfx-controls-react/lib/services/FileBrowserService.js:234
[FileBrowser._getListItems]: Something went wrong when executing request. Status='[HTTP]:404 -  [CorrelationId]:d84ef39f-10f2-1000-13fd-01686a7b6fd7 [Version]:16.0.0.21715'
dist/node_modules/@pnp/spfx-controls-react/lib/services/FileBrowserService.js:234
[FileBrowser._getListItems]: Something went wrong when executing request. Status='[HTTP]:404 -  [CorrelationId]:d94ef39f-8093-1000-13fd-05580cc2f387 [Version]:16.0.0.21715'

But if I run the webpart from https://ecgmcdev.sharepoint.com/teams/1689.006/_layouts/15/workbench.aspx
I see the files in the https://ecgmcdev.sharepoint.com/teams/1689.006/DPCDocuments library. like expected.

Thanks!

@ghost
Copy link

ghost commented Sep 26, 2021

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 26, 2021
AJIXuMuK added a commit that referenced this issue Oct 23, 2021
Fix #1023 - issue with root site and default folder path
@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. and removed Needs: Triage 🔍 labels Oct 23, 2021
@AJIXuMuK AJIXuMuK added this to the 3.5.0 milestone Oct 23, 2021
@AJIXuMuK
Copy link
Collaborator

Thank you @Ofer-Gal for reporting the issue.
It has been fixed and will be included in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

No branches or pull requests

2 participants