PnP-Sites-Core icon indicating copy to clipboard operation
PnP-Sites-Core copied to clipboard

Notebook link not working after applying provisioning template

Open StfBauer opened this issue 6 years ago • 4 comments

Which PnP repository should you use to report the issue?

Category

  • [x] Bug
  • [ ] Enhancement

Environment

  • [x] Office 365 / SharePoint Online
  • [ ] SharePoint 2016
  • [ ] SharePoint 2013

Expected or Desired Behavior

Notebook link on modern experience page should work after applying a provisioning Template Setting is to overwrite Navgiation.

Observed Behavior

When I export a provisioning template, the NoteBook link in the Navigation looks like this.

<pnp:NavigationNode Title="Notebook" Url="{site}/_layouts/15/WopiFrame.aspx?sourcedoc={7411ae66-047a-4a3a-a2f0-09914ffc06a0}&amp;action=editnew" IsExternal="true" />

It only happens when someone already clicked on the Notebook. When no one ever clicked on the Notebook link it looks like this:

{site}/_layouts/15/groupstatus.aspx?Target=NOTEBOOK

This link also exists on new created Group connected Sites. Once the provisioning template got applied no of both links work. I have to go manually to the Site Assets and relink the notebook.

The problem might be that the Group Connected Sites have some particular categories for "Notebook" and more, but these types cannot yet apply in the provisioning engine. It is also interesting where the "Group Status" is stored.

Steps to Reproduce

Create a new Group Connected Site Collection and export it as a Template. Apply the template on a new Group Connected Site Collection and see if the Notebook link works.

StfBauer avatar Sep 20 '18 06:09 StfBauer

I'm struggling with the same problem. As a workaround I'm deactivating and activating Site Notebook feature, which fixed the Notebook link for me. When managing the navigation with PnP template, Notebook link is added to the top of the navigation, when feature is activated.

And this is actually creates a new OneNote while activating a feature, so it's not a solution for this. Works as a quick and dirty workaround, if OneNotes are not used before.

mpaukkon avatar Nov 15 '18 12:11 mpaukkon

I too am finding this odd behavior frustrating. Having to manually go into each site after applying the template to fix the links is a PITA.

sheykh-sleky avatar Dec 26 '19 18:12 sheykh-sleky

The core could adjust some properties on StructuralNavigation node

<pnp:StructuralNavigation RemoveExistingNodes="false" UseTitleAsKey="true">
   <pnp:NavigationNode Title="Documents" Url="{site}/Shared Documents" />
   <pnp:NavigationNode Title="Notebook" Ignore="true" />
</pnp:StructuralNavigation>

With this, we could tell to pnp that don't add elements or just override node if exists and if it's notebook element to ignore the add/update on this node (with Ignore="true"), with this solution we keep SharePoint to able to manage this link throw the notebook feature.

Could be the solution?

stact avatar Jun 05 '20 11:06 stact

I just tested @StfBauer's suggestion of using {site}/_layouts/15/groupstatus.aspx?Target=NOTEBOOK instead of the exported link, and that seem to do the trick, whether or not there is a notebook already in Site Assets. If the notebook already exists, the link continues to work.

sympmarc avatar Jul 27 '20 13:07 sympmarc