sp-starter-kit: MyLinks Unable to Add
Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.
(DELETE THIS PARAGRAPH AFTER READING)
Category
- Question
- Bug
- Enhancement
For the above list, an empty checkbox is [ ] as in <kbd>[</kbd><kbd>SPACE</kbd><kbd>]</kbd>. A checked checkbox is [x] with no space between the brackets. Use the
PREVIEW
tab at the top right to preview the rendering before submitting your issue.(DELETE THIS PARAGRAPH AFTER READING)
Expected or Desired Behavior
Able to add links
Observed Behavior
No Links added, the add dialog stays open Get an error in console
_Uncaught TypeError: Cannot read property ‘concat’ of undefined at t._saveEdit (portal-footer-application-customizer_3f174defe3730bc17f2d7c1335df1fc6.js:44) at Object.r (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at a (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at Object.s [as executeDispatchesInOrder] (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at f (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at m (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at Array.forEach (<anonymous>) at r (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at Object.processEventQueue (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646) at r (sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660) t.saveEdit @ portal-footer-application-customizer_3f174defe3730bc17f2d7c1335df1fc6.js:44 r @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 a @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 s @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 f @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 m @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 r @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 processEventQueue @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 r @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660 handleTopLevel @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660 i @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660 perform @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 batchedUpdates @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660 i @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:646 dispatchEvent @ sp-pages-assembly_en-us_d4876ad6641337ff9e7f2daa78ac3b66.js:660
Steps to Reproduce
Click arrows to open footer Click edit Click Add Fill in details Click Add
Submission Guidelines
Thanks for your contribution! Sharing is caring.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (1 by maintainers)
Closing this one as seems like solved. Issue most likely was simply on the naming of the user profile property as you cannot have two User Profile properties with the same name - the fact that SharePoint allowed you to create the second one, means that there was a typo on the original one, which is already deleted, so we can’t confirm your setup. Thanks anyway @spurr82 for following up on the status and good that you got it to work.
@spurr82 I understand you were able to get this working, outstanding, but the fix does not make sense. A user property “PnP-PortalFooter-Links” should not be needed as that is not found in the code unless you changed something in the provisioning process.
My suggestion is that you now remove the user property, PnP-PortalFooter-Links, and see what happens. Maybe there was a delay in the system accepting PnP-CollabFooter-MyLinks?
The specific error you originally encountered was triggered in \solution\src\common\myLinks\myLinksDialog.tsx, line 249. There was a state, “links” that was not being sent to this particular React component, “this.state.links.concat([]);”.
The links are originally retrieved when the extension is being initialized in “PortalFooterApplicationCustomizer.ts” found in \solution\src\extensions\portalFooter.
You will find a method, private async loadLinks(): Promise<ILinkGroup[]> {} that loads the links. What is strange is that in your case either this did not fire, did not return its promise properly, or somehow the results became null.
Assuming that the common list and the particular user property are available, you should be good.