This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

The Style Builder screen does not open when editing a style for a form or view control.

Symptoms

The browser's console displays the following JS error when clicking on Styles:

Invalid XML (cannot represent object as string).

Troubleshooting Steps

To resolve this issue, please complete the following steps:
  1. Run a network trace from the browser.
  2. Reproduce the issue.
  3. Click on the request which should open up the Style Builder: StyleBuilderDialog.aspx
  4. Under Preview/Body, a server error is actually returned:

    Image
  5. Make sure that NewtonSoft.json.dll is present in [...\K2 blackpearl\K2 Designer\Bin\].
  6. If it does not exist, you may copy the assembly from [...\K2 blackpearl\K2 smartforms Runtime\Bin\].
  7. Restart the K2 blackpearl service.
  8. Clear the browser cache and then check if the issue persists.