listsharepointsharepoint-2013customcolumn

SharePoint 2013 - Feature schema contain wrong field name : feature name = [GUID], field name [Field Name]


I am trying to deploy a feature to my site collection. I get a error regarding one field in my list.

From ULS log:

03/27/2014 09:59:50.94 vssphost5.exe (0x1BA4) 0x2EE4 SharePoint Foundation General acq1f High Feature schema contain wrong field name : feature name = 246f9bce-9232-4397-8134-a5a8fb9f162e, field name GS1

When I remove that field from the list view the deployment works as expected (I can add the field manually than on the site). There is nothing special about that field other than the short name which I don't know if that can matter really. There are other fields that are very similar or of the same type as this field in the list and they all work without problems. The field XML definition is:

<Field Type="Text" DisplayName="GS1" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="Company Columns" ID="{1b2c1e14-24e2-40f4-bc9c-88828ad414aa}" SourceID="{1962f1e3-f792-4b14-88a2-f6886ff18448}" StaticName="GS1" Name="GS1">

Everything is deployed through Visual Studio 2012 (for now, the actual deployment will be through a .wsp package).

When I add the field manually on the site and look at the XML schema of that field in that list I can see that it looks like this:

<Field Type="Text" DisplayName="GS1" Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="Company Columns" ID="{1b2c1e14-24e2-40f4-bc9c-88828ad414aa}" SourceID="{1962f1e3-f792-4b14-88a2-f6886ff18448}" StaticName="GS1" Name="_x0047_S1" Customization="" ColName="nvarchar26" RowOrdinal="0" />

What surprises me about this is the Name="_x0047_S1" field. Which looks quite strange.

Thank you for any ideas how to solve this problematic column.


Solution

  • Here is a possible work around. I would remove the field and readd it. If the display name is fine, you can make the internal name different so you don't run into this issue:

    <Field Type="Text" DisplayName="GS1" ... StaticName="CustomGS1" Name="CustomGS1">
    

    Note: The static\internal name should match each other unless you have a compelling reason to do otherwise.

    Once you change the field internal\static name, remove the field from the list instance and re-add it.

    I would personally try this and see if this fixes it.