-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Duplicate Field Error #1022
Comments
A few questions: What is the underlying site template of the site you created the template from? (like STS#0, etc.) |
Hi Erwin BLANKINTERNET#0 Regards Nigel From: Erwin van Hunen [mailto:notifications@github.com] A few questions: What is the underlying site template of the site you created the template from? (like STS#0, etc.) — |
Don't forget I am On-Premises |
Don't forget I am On-Premises - I don't know what Tobias is ? |
In this case, the attendees field is a field you added yourself to the userinfo list before applying the template? As part of a solution? |
No – It was generated when I did a Get-ProvisioningTemplate From: Erwin van Hunen [mailto:notifications@github.com] In this case, the attendees field is a field you added yourself to the userinfo list before applying the template? As part of a solution? — |
Sorry, I meant the field was already there, otherwise Get-SPOProvisioningTemplate cannot add the field to the template. How did that field end up in that list? Given that the field is added to an (to me) unknown group "DH Columns" I assume it's a custom field that has been provisioned one way or the other to the site, or has been added to the BLANKINTERNET#0 site definition or is being introduced in the site through feature stapling. |
It is a Group /Person field created using the GUI. “UserInfo” list is an OOTB (hidden) list. From: Erwin van Hunen [mailto:notifications@github.com] Sorry, I meant the field was already there, otherwise Get-SPOProvisioningTemplate cannot add the field to the template. How did that field end up in that list? Given that the field is added to an (to me) unknown group "DH Columns" I assume it's a custom field that has been provisioned one way or the other to the site, or has been added to the BLANKINTERNET#0 site definition or is being introduced in the site through feature stapling. — |
Okay, and has that field also been added to the user info list in the target site before you to applied the template to it? I'm trying to figure out if the engine tried to update an existing field, or that it thought it had to create it because it couldn't find it. |
On this farm we were using a Content Type Hub which, as soon as a site is created, dives in and creates all of the site columns and Content Types. Apply-ProvisioningTemplate comes in later and tries and create all of the site columns and Content Types it thinks that the site needs. This is probably the only field which is in both. I will check both definitions. |
What I not understand, in the field object handler we check if field with field-id from template exists not on context web fields collection. |
My suggestion here would be, that we double check in CreateField if field with id not exist in web.Fields, so we are prepared for a race with ct hub job or feature stapler closer to the AddFieldfAsXml, and if exist we call the FieldUpdate from there also. |
Another idea, before we save the ct definition to the template, would it be possible to check if this ct comes from an ct hub; but i think if the ct comes from a stapler we have no chance for detection |
I don't user feature stapling. So this should be fine. |
On the other side in o365 we have found that the provision of ct from ct hub to a new sc, depends not on the creation tooling - UI or csom.. In worst case after hours the job will finishing.. |
I get the "field already exists" error in SPO with taxonomy fields. Scenario: taxonomy site column created manually on site; site column added to a custom list with test item created; site saved as template using the provisioning engine; new site collection created and template applied, resulting in this error. |
Yep, same issue, resolved as per prbnsn. Now have an issue with a duplicate content type error I assume because we are also using a CT hub. |
Same issue here happening as soon as I Get/ApplyProvisioningTemplate on a Web in which I created a Managed Metadata site column (in a Team Site, just using the browser interface) |
@paulpascha, @GavinHaak : are you running both on-prem? It almost sounds like the on-prem CSOM SDK behaves differently from the O365 version, where the on-prem version creates the corresponding note field (hidden field, used to store the guids of the terms picked in the taxonomy field) automatically. |
In my case it's an Office 365 (Developer) Subscription... |
Okay, I've pinpointed down the issue. If the note field is before the taxonomy field in the template, no issue occurs. I've found however that omitting the note field at all indeed creates the note field too (this is new from my understanding in the SDK and I wasn't aware of this until now). I will work on a fix in the engine to tackle this specific issue (won't happen today though) |
Thanks Erwin |
I merged a fix and it's available in the dev branch now. Please test and report back if this solves the issue for you. If all good I will close this issue. The PR can be found at #1054 Notice that it requires that you extract/generate a new template. Existing templates with the note defined after the taxonomy field will still fail. |
O365 unfortunately. On Fri, 17 Jul 2015 at 22:55 Erwin van Hunen notifications@github.com
|
Closing this issue due to age. If you believe this is still an issue in the latest release please re-open and let us know. |
Hi.. I am facing the same issue as I am working on SharePoint 2013 on premises, the site Field of Type Taxonomy in the template file has been saved with the Hidden column of Type Note. |
Same issue here guys, i noticed that in list has a pnp:Field, this field has the StaticName filled with the same name of the StatusFieldName attribute of pnp:WorkflowSubscription node, after the provision finishes on the list settings I can see two fields with the same display name. This issue ocorrs on SharePoint OnPremisses Farm Build Version: 15.0.4841.1000 |
I have a similar problem - when apply-spoprovisioningtemplate I get error Duplicate Field Name XXXX Found SharePoint Online April 2017 PowerShell version |
Hi we have a similar issue. we have activated the content center feature on the root site and we are getting field with the same name exists.. the affected field is Model name. |
Applying a template to a site, you get an error "Field Already Exists". In my case it is the "Attendees" field. I delete the field out of the Provisioning Template, and point the Attendees FieldRef to the GUID of the existing "Attendees" field and it all works.
The text was updated successfully, but these errors were encountered: