What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
[ ] 💥 Internet Explorer
[X] 💥 Microsoft Edge
[X] 💥 Google Chrome
[X] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[ ] other (enter in the "Additional environment details" area below)
Additional environment details
browser version (not relevant)
SPFx version 1.18.1
Node.js version v16
Describe the bug / error
The site has document set feature enabled. Document library has document set content type. The document set has default view specified which has less columns than other views in the list. There is SPFX app with command bar extension deployed in the site (it can be sample SPFX command bar extension scaffolded using YO generator). When user navigates into document set a different view is displayed as expected. When user tries to navigate back to the library default view the error appears (most of the times). From that point all site navigation fails and user has to refresh whole page using F5.
The error show failed view rendering picture (aka. broken bicycle or dropped ice-cream).
Error message: "Uncaught TypeError: Cannot read properties of undefined (reading 'data')".
The console log show this error:
If SPFX app is uninstalled this error does not occur and everything works normally as expected.
Add some additional columns s to default view AllItems.aspx
Add document set content type to the library
Create new view in the library called view-docset with one column Name.
Set VIEW-DOCSET as default view for document set content type.
Create a few new document sets in the document library DOCSET1, DOCSET2.
Scaffold new SPFX command bar extension using YO generator, deploy to App Catalog and install the app to the site.
Open document library and do some navigation into DOCSET1 and DOCSET2. Notice that view is changed to view-docset when you enter the document set.
Try to navigate back default view of the document library (repeat steps 9-10 a few times if error does not appear).
ERROR: The error message is displayed "Uncaught TypeError: Cannot read properties of undefined (reading 'data')". The internal site navigation is broken.
Expected behavior
User should be navigated back to the list default view without error.
Additional investigation
Then SPFX command bar extension is enabled SharePoint internal list rendering tries to use some internal column caching and there is a bug, because not all columns are cached properly.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
The site has document set feature enabled. Document library has document set content type. The document set has default view specified which has less columns than other views in the list. There is SPFX app with command bar extension deployed in the site (it can be sample SPFX command bar extension scaffolded using YO generator). When user navigates into document set a different view is displayed as expected. When user tries to navigate back to the library default view the error appears (most of the times). From that point all site navigation fails and user has to refresh whole page using F5.
The error show failed view rendering picture (aka. broken bicycle or dropped ice-cream). Error message: "Uncaught TypeError: Cannot read properties of undefined (reading 'data')".
The console log show this error:
If SPFX app is uninstalled this error does not occur and everything works normally as expected.
Sample SPFX app used in demo: https://github.com/NerijusV/spfx-docset-commandbar
Steps to reproduce
view-docset
with one columnName
.DOCSET1
,DOCSET2
.DOCSET1
andDOCSET2
. Notice that view is changed toview-docset
when you enter the document set.Expected behavior
User should be navigated back to the list default view without error.
Additional investigation
Then SPFX command bar extension is enabled SharePoint internal list rendering tries to use some internal column caching and there is a bug, because not all columns are cached properly.