"Drag and Drop file attachment control" breaks the K2 Designer.


Badge +4


 

Symptoms

 


 Installing the "Drag and Drop file attachment control" from community site breaks the K2 SmartForms Designer. Post-installation, when you try to open the designer, you will see thefollowing error...

Server Error
Could not load file or assembly 'Control' or one of its dependencies. The system cannot find the file specified.

 

 

Diagnoses

 


It is easy to reproduce the issue. I did it by simply installing the control on 4.6.9 and 4.6.10.

This does seem to be an issue with the control. In the "Definition XML", the assembly name is specified as "Control" instead of the actual output assembly name which is "DragAndDropControl.DragAndDropFile.Control, DragAndDropControl" for the solution.

SmartForms then tries to load an assembly called "Control" which does not exist and then throws the error.
 

 

Resolution

Just to get the designer going again, we de-registering the control and then removed all the DB entries using the "Form.DeleteControlType" stored proc and then we were able to open the designer again.

We have contacted the control owner and informed him of the bug. He will update the control and post it to the community site soon.

The issue is with the control's "FullName". Instead of "Control", it should be "DragAndDropControl.DragAndDropFile.Control, DragAndDropControl" in "DragAndDropFile_Definition.xml" file.

As a workaround, you can follow these steps to get things up and running again.

1.) If you have not added the control into any Views...

You should remove the control from the system using the following command...

"C:Program Files (x86)K2 blackpearlBincontrolutil.exe" deregister -control:DragAndDropFile"

The console app should tell that the control has been removed successfully. If you see any errors specifying that the control is in use, proceed to point 2.

After removing the control, update the source package's XML file (as shown above) and re-compile it and deploy.

2.) If the control is already in use...
- Start SQL server management studio and connect to the instance hosting your K2 DB(s)
- Expand "[server]" > "Databases" > "K2".
- Navigate to the "Form.ControlTypeImplementation" table.
- Look for the DragAndDropControl record under the "FullName" column.
- Update it to "DragAndDropControl.DragAndDropFile.Control, DragAndDropControl"

For both workarounds, you will need to perform an IISReset for the changes to take.

The current version of the control has been tested in 4.6.9 and 4.6.10.

 

 



 

0 replies

Be the first to reply!

Reply