InfoPath 2010 published as a content type & duplicated site columns.
-
2012년 3월 9일 금요일 오후 6:51
I am in need of some serious help. I haven't been able to find a decent fix aside from manually fixing this which takes forever.
Some background info:
InfoPath form is published as a content type to SharePoint 2010 Enterprise.
Form library at http://clientsite/projects/porequest has the published forms content type set to it as the default content type. The PO Request form library has a SharePoint Designer workflow attached to it (It is not attached to the content type).
At the end of the workflow process the InfoPath form file is moved from the above form library to the client's individual project site form library - example http://clientsite/projects/7008/porequest by way of a custom workflow action. Those PO Request libraries in the project specific sites all have the published content type applied to them as well.
Sometimes it seems when InfoPath deems necessary - it will create duplicate site columns which then are replicated to all the form libraries that have this content type applied. See the image below:
Note I cannot remove the columns from the UI. The only fix I have found is to delete the form library, and recreate it. However, sometimes when I republish the columns are duplicated again.
Seriously - why does this happen, how can I fix it, and most importantly, how can I prevent this from happening ever again (shy of not using InfoPath, which I am currently not opposed too).
I am here all day, ready to respond, help me figure this out forum gurus! Make me not want to punch InfoPath in the soul.
모든 응답
-
2012년 3월 9일 금요일 오후 11:25
-
2012년 3월 10일 토요일 오전 12:58
Can you check the definition of the content type first? Do you see duplicates over there?
Site Actions -> Site Settings -> Site Content Types
Based on the information I see above, you could have accidentally published the form to both the form library and as content type.- 편집됨 Jason Li - Canada 2012년 3월 10일 토요일 오전 1:12
-
2012년 3월 11일 일요일 오전 3:35Sadly, they are not in there multiple times. Then this would have been an easy fix =)
-
2012년 3월 11일 일요일 오전 3:37So on the Site Content Type no, there are not duplicates on the content type. However, if you look at the Site Columns, then there are duplicates in there. It has always been published as a content type. This problem seems to occur when the form fails to publish. I get the helpful 'Updating site content type failed' message and then if I go look at the Site Columns/Form Library Columns there are the duplicates there.
-
2012년 3월 11일 일요일 오전 3:49
I think your impression of "However, sometimes when I republish the columns are duplicated again." could be incorrect. If don't see duplicates in the content type, then the content type is correct.
As to "look at the site columns, there are duplicates in there". That is because "site columns" from site settings includes all columns defined by all content types and all libraries/lists.
-
2012년 3월 11일 일요일 오전 4:13Okay - so my screenshot above, that is taken from the form library. What would cause those duplicates to show up after a publish of the form?
-
2012년 3월 11일 일요일 오전 7:20
Except my speculation above, I really cannot put anything else forward.
If you go the document library, I guess you see something like below (duplicates)
- Current Step,single line of text
- Current Step,Single line of text,Project Management P.O Request
How about you try to remove your content type from that document library? Will you only see the first line after that? If that is the case, it means another exact same set of site columns were created to the document library. Even I don't know what caused that. I guess you have kind of implied that you never published the InfoPath form to the document library directly.
- 편집됨 Jason Li - Canada 2012년 3월 11일 일요일 오전 7:20
- 편집됨 Jason Li - Canada 2012년 3월 11일 일요일 오전 7:22
-
2012년 3월 12일 월요일 오후 3:20
Thanks Jason for the help so far!
So I would but those columns are read only so I can't edit them. I could use SharePoint Manager or the API to flip the bool and make those fields editable, or what I did last week which was to delete the form libraries and recreate them, then re-add the content type back to it. That worked great until I published the form again and it for whatever reason I ended up having the duplicates created again.
It seems to me that the best solution is just to avoid promoted columns at all costs? -
2012년 3월 12일 월요일 오후 5:24
I just got off the phone with MS Support and here is what they told me.
This is a known issue when publishing a form between environments (dev/test/production). The solution is to have a form template created for each environment you want to publish to. He said what happens when you change environments that you publish to is that it will lose the mappings for the site columns and create new ones.
So the lesson learned here is to avoid publishing one form between environments, make extra work for yourselves & have a form tied to each environment just like SharePoint Designer Workflow!
- 답변으로 표시됨 Emir LiuMicrosoft Contingent Staff, Moderator 2012년 3월 13일 화요일 오후 12:03
-
2012년 3월 13일 화요일 오후 5:45
Thanks for sharing c_pound. I didn't realize that you had the same InfoPath form published multiple times to different environments.
If you have multiple environments (DEV/TEST/PROD) and, for whatever reasons are, you have to do your development in DEV and migrate it over to IST/PROD, you don't have to have a form template for each environment.
I developed some PowerShell scripts and migrate my InfoPath forms from DEV to IST/PROD.
-
2012년 3월 13일 화요일 오후 5:52Do the Powershell scripts change anything in the manifest.xsf file when publishing? I would like to take a look at them and see how they operate. Well, the client would ideally like to have a dev environment to test functionality in, and then migrate the form to production when it passes testing. If Powershell scripts can help with that part of the task I certainly would be interested in finding out more. Any places you could point me to?
-
2012년 3월 13일 화요일 오후 9:26I will see if I can write up something for you on this over the next few days.
-
2012년 9월 20일 목요일 오전 8:05Word of caution to would be InfoPath "Guru's" is to NOT deploy infopath as a content type over many different sites. Because of the error above which has existed unfixed for several generations of infoPath forms your application runs the risk of suddenly flaking out. That is when you have the same form content type published over hundreds of sites and then the duplicate field name issue appears after what was to be a simple form improvement and admin publish, you and your happy little application are up a creek. Especially when there are workflows attached to the library. It's a real deal breaker and can destroy what seemed like a good idea at the time. Imagine needing to fix multiple promoted duplicated site columns over hundreds of sites one guid site column at a time... All the workflows attached are broken and columns are no longer promoting properties correctly. You're done.
-
2012년 11월 29일 목요일 오전 6:55
Promoting Infopath form fields to SharePoint - with out duplication
http://microsofttechnologies.blogspot.com.au/2012/11/promoting-infopath-form-fields-to.html
Khalil

