Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Content type not visible in new button with Add-PnpContentTypeToList #1101

Open
2 of 6 tasks
PaWeg opened this issue Sep 21, 2017 · 4 comments
Open
2 of 6 tasks

Content type not visible in new button with Add-PnpContentTypeToList #1101

PaWeg opened this issue Sep 21, 2017 · 4 comments
Assignees
Labels
type:enhancement New feature or enhancement of existing capability

Comments

@PaWeg
Copy link

PaWeg commented Sep 21, 2017

###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###

  1. Are you using Apply-SPOProvisioningTemplate or Get-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/OfficeDev/PnP-PowerShell/tree/master/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/officedev/PnP-Sites-Core/issues

Reporting an Issue or Missing Feature

When adding a content type to a list with the cmdlet Add-PnpContentTypeToList it is not marked as visible unless you set is as the default content type.
As workaround I added it as the default content type and used the cmdlet Set-PnpDefaultContentTypeToList to reset the original default content type, but this cmdlet doensn't change the default.

Expected behavior

Possibility to add content type that is visbile on the new button.
Use SetPnpDefaultContentTypeToList to change default content type

Actual behavior

Adding non-default content type is not visible in new button and changing default content type not working

Steps to reproduce behavior

Please include complete code samples in-line or linked from gists

Which version of the PnP-PowerShell Cmdlets are you using?

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name *pnppowershell* -ListAvailable)
2.18.1709.1

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • Installed through the PowerShell Gallery with Install-Module
  • Other means
@KashifMajeed24
Copy link

Hi,

Any time frame when this enhancement will be included? Thanks

Regards,

Kashif

@cimares
Copy link

cimares commented Mar 26, 2018

Hi Erwin,

I'm not sure this is an enhancement as I'm seeing different behaviours between two tenancies so potentially this is a server side issue? In my first release tenant, adding a new content type to a list automatically assigns it to both the New drop down in the library command bar and also makes the content type available in the property drop down in the modern library experience when editing a documents properties.

In a non-first release tenant, I'm seeing the same behaviour as PaWeg, the content type is added, but you have to manually make it available on the new bar through the UI.

Paul.

@joefedorowicz
Copy link

joefedorowicz commented Mar 26, 2018 via email

@cimares
Copy link

cimares commented Mar 26, 2018

I'm just testing this for a large DMS deployment, and in the tenant that is playing up, I have 6 content types assigned to the list. Only the default is showing as available on the new menu. If I add a new content-type to the list, but with the default flag selected.. ALL of the previously invisible content types are suddenly added to the new menu button (and all are suddenly ticked in the UI).

Removing the content type leaves everything corrected with all content types visible in the UI. Definitely server side and not an issue with the PNP cmdlet as I'm not seeing this behaviour in my other tenant with the same script/PNP dlls.

Paul.

#Update# Now it's doing the same in my first release tenant. Some weird results here. Going to test and see if it does the same using CSOM.

#Further Update# I've since recreated this problem using pure CSOM which has the same issue, therefore it looks like a bug with Microsoft's underlying CSOM rather than the PNP implementation.

For now, if you use Add-PNPContentTypeToList to add all the content types, then call Set-PnPDefaultContentTypeToList to set your default, it seems to enable all of the other content types at the same time. (workaround blogged here)

@VesaJuvonen VesaJuvonen added type:enhancement New feature or enhancement of existing capability and removed enhancement labels Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement New feature or enhancement of existing capability
Projects
None yet
Development

No branches or pull requests

6 participants