pnp / sp-starter-kit

Modern SharePoint Starter Kit - End-to-end showcase solution to get started with modern experiences.
MIT License
761 stars 535 forks source link

PortalFooter not displaying in the hub site #144

Closed gayathrak closed 6 years ago

gayathrak commented 6 years ago

Category

Category

I'm trying to deploy only the PortalFooter extension to my dev tenant without using the starter kit (not retrieving from the starter kit). I have created a new extension called PortalFooter and copy the PortalFooter code from the starter kit and added the required folders only for the PortalFooter. After i did npm install and gulp serve to check from my workbench, could not see the footer appearing in the hub site. No errors. Already have the list called "PnP-PortalFooter-Links" What should i need to change or add (files) in order to get this extension deployed as a separate extension (without using starter kit) to my dev tenant?

Thanks

bcameron1231 commented 6 years ago

Can you clarify how you are trying to test this extension? Extension do not load in the workbench, did you configure the serve.json file support your testing?

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/debug-modern-pages

gayathrak commented 6 years ago

Thanks..
I have configured the serve.json to have below now

{ "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json", "port": 4321, "https": true, "serveConfigurations": { "default": { "pageUrl": "<>", "customActions": { "80f37756-0fbc-434d-9835-55401b47e5bb": { "location": "ClientSideExtension.ApplicationCustomizer", "properties": {} } } }, "portalFooter": { "pageUrl": "<>", "customActions": { "80f37756-0fbc-434d-9835-55401b47e5bb": { "location": "ClientSideExtension.ApplicationCustomizer", "properties": {} } } } } }

i did gulp serve --config=portalFooter

Page loads up but cannot footer did not load.

What will be the best process to get only one extension from starter kit and deploy that particular extension to my dev tenant?

Thanks

bcameron1231 commented 6 years ago

Generally, I create a new solution and mover the files that I want for the PortalFooter. If I can find some time, I may be able to do that for you.

When the page loaded, did the "allow debug scripts" show up?

gayathrak commented 6 years ago

Yes, it showed up and after selecting "Load debug scripts" i get the page alright but cannot see the portal footer. I have already got PnPPortalFooterLinks list with 1 item in it.

Thanks Beau..

bcameron1231 commented 6 years ago

If you open up Dev Tools in your browser (F12) are you noticing an errors? Maybe unable to load manifest, or another javascript error?

gayathrak commented 6 years ago

Thanks @bcameron1231.. Very helpful

I have attached the error messages. Below is my debug url with properties

debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js&loadSPFX=true&customActions=%7B"a935ac7b-8b7d-4e17-bef0-357126b93843"%3A%7B"location"%3A"ClientSideExtension.ApplicationCustomizer"%2C"properties"%3A%7B"linksListTitle"%3A"PnP-PortalFooter-Links"%2C"copyright"%3A"%40GDM"%2C"support"%3A"support"%2C"personalItemsStorageProperty"%3A"PnP-CollabFooter-MyLinks"%7D%7D%7D

In the starter kit there is a hubsite.xml under provisioning. Do the properties in the above url is sufficient to load the PortalFooter?

error2 error1

gayathrak commented 6 years ago

Hi @bcameron1231 Thanks.

I got this working and now the portalfooter is displaying properly. I think I had dependencies incorrect in my package.json where i have copied some starterkit values which are not the correct ones i have update d. Changed the values to be itself and it did work.

Thank for your help and was very supportive. Starter kit is very useful for any intranet..

Just a small question, if I have more than 1 hub site say about 4 hubsites that i want this portalfooter to be displayed, do I have to maintain 4 separate lists (PnP-PortalFooter-Links) in each hub site?

Thanks

bcameron1231 commented 6 years ago

Hi @gayathrak Glad to hear you got it working!! The portal footer is per hub site. How the code works, is it grabs the current sites hubsitedata object and references that list in the hub site.

I've been working on a solution which is a mix of the Collab Footer + the Portal Footer... so that we can have the UI/UX of the Portal Footer, but use the Term Store for managing the content of the footer, across all sites in the tenant.

gayathrak commented 6 years ago

Thanks @bcameron1231 that will be helpful for lot of users..