Use of cookies by SourceCode Technology Holdings, Inc. We use cookies to deliver our online services. Details and instructions on how to disable those cookies are set out here. By continuing to use this website you agree to our use of our cookies unless you have disabled them.

Hotfix: Duplicate sources created in XML

Issue DescriptionWhen binding or unbinding a control to a field, duplicate sources are created in the view definition XML.

CauseIf a control is bound to a SmartObject field, then the source has a context type of association. If it is not bound, then the context type of the source would be external. In the XML code, instead of changing the context type when a field is bound/unbound, K2 added a new (duplicate) source node to the view definition with the corresponding context type.

Repro Steps

Create a SmartObject.

Create an associated SmartObject.

Create a View from the first SmartObject.

Delete the Drop-Down control.

Add a new Drop-Down control.

Configure the data source to load the associated SmartObject.

Bind the control to the associated field.

Finish the View.

At this point the duplicate Source was created in the XML.

Correct behavior: there should be two sources (1 Primary, and 1 Association). Reproduced issue will result in three sources (1 Primary, 1 Association, 1 External).

The following can be executed in SQL to view the XML entries:

SELECTTOP 1000 [ID]

,[SPID]

,[DateTime]

,[UserID]

,[TypeID]

,[Message]

,[Data]

,[Xml]

,[ClientStack]

FROM [K2].[Form].[AuditLog]

ORDERBY ID DESC

Expand the top XML result:

Resolution

Ensure you have K2 4.7 installed.

Install the K2 4.7 February 2017 Cumulative Update.

Get the K2 4.7 February 2017 Cumulative Update FP3 from Regional Support.

Install the K2 4.7 February 2017 Cumulative Update FP3 to apply the fix.

Clear the Browser Cache.

This a preventative fix, that will prevent the duplicates from getting created, but will not fix any issues related to duplicate sources.