Apply-PnPProvisioningTemplate : A list, survey, discussion board, or document library with the specified title already exists in this Web site. Please choose another title

Jurgen Verhelst 326 Reputation points
2020-12-26T01:29:49.69+00:00

Hi,

Trying to apply a template where the 'documents' library had an extra column and an extra view

Not always but most op the time the action fails

Apply-PnPProvisioningTemplate : A list, survey, discussion board, or document library with the specified title already   
exists in this Web site.  Please choose another title  
  

all config in the template for 'documents' and everything below that is not applied

51351-screenshot-2020-12-26-022242.png

It might be expected behavior, although it did work some times, so I tried other ways

  1. tried deleting 'documents' then apply, 'unable to delete' (Remove-PnPList -Force -Identity Documents)
  2. now thinking of removing the doc lib 'documents' from the template xml and adding the columns and views seperately

but that is kind of a pitty as it is this cmdlet job right

any help appreciated

regards,

Jurgen

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,621 questions
0 comments No comments
{count} votes

Accepted answer
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-12-28T05:49:19.67+00:00

    I ran this cmdlet several times, but the problem did not be reproduced.
    51408-image.png
    I generated a new template.xml and applied it to the same site:
    51527-image.png
    Could you share more information to help us reproduce your issue?


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


2 additional answers

Sort by: Most helpful
  1. Jurgen Verhelst 326 Reputation points
    2021-01-03T01:55:39.44+00:00

    Hi Amos,

    Thanks for helping out

    Did you create a custom field and views in the default 'Documents' Lib before creating the template?

    that triggered the error with me

    When I create a template from a Site where I did not change the document library it has no problem, also when I create new doc libs with a different name as the default 'Documemts' its fine


  2. Jurgen Verhelst 326 Reputation points
    2021-01-04T03:27:49.187+00:00

    Strange,

    I did the workaround to remove the alterations to documents in the XML and then add then via add-PnpView and the column

    now I know it has something to do with my template site and need to investigate further

    thanks for helping out!