2sxc
2sxc copied to clipboard
Code editor error when going to edit template
I'm submitting a ... [x] bug report => search github for a similar issue before submitting
...about [x] template editor
Current behavior
When I got to edit any template, I get the following alert error:
Had an error talking to the server (status 500). Message: An error has occurred. Detail: The 'ObjectContent'1' type failed to serialize the response body for content type 'application/json; charset=utf-8'. if you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug
Expected behavior To be able to edit templates in the editor.
Instructions to Reproduce the Problem Click on "Edit template"
Why change the behavior? Bug
Your environment Shared hosting
- 2sxc version(s): 14.07.04 (was also the same error in 14.03.00
- Browser: [all ]
- DNN: [9.10.2 ]
- Language: [any/all ]
Anything you would like to add
This is a site that uses Patrons features. I have DNN Minification and Composite files disabled. I have incremented the CDF version, cleared cache, and restarted the application but still have the same issue where I can't edit the templates.
I can confirm this, a recently install DNN 9.10.02 with 2sxc 14.7.4
I can't reproduce this issues and need more info.
Editor is calling several endpoints. One (or more) is throwing this exception. Probably .../api/2sxc/admin/AppFiles/AppFiles?appId=...
. I need more info about this exceptions from request and 2sxc insights.
From your issue, it looks that for some reason endpoint can not serialize response to json, so the goal is to find if that is 2sxc bug that we can fix, or it is related to iis configuration, security, something else...
Please can You (after this exception happens in your editor):
- open dev tools, Network tab
- filter Fetch/XHR (check there is one or more requests that returns status: 500, but first F5 reload if you do not see requests)
- Export HAR file (add .ZIP extension to HAR file and drop it here for upload)
Also please can you check 2sxc insights: log web-api, find request that throw exception and copy also its long content here.
I was able to create the problem that Aaron has reported by doing the following:
- Created new DNN v9.10.2 website with 2sxc v.14.07.04 LTS and all associated Apps and Content (Content v14.7.0).
- Created a page with an "Image | Text template". Added a photo and text:
- Clicked on the "<>" to go into edit mode and get the following error:
Thanks @ajplopez , @jeremy-farrance and @skarpik 👍👍👍. Obviously this issue affects many users and it breaks editor UI.
It looks that you are getting exception in new api/2sxc/admin/Code/InlineHelp
endpoint, that is WIP.
Unfortunately I am still not able to reproduce it in my dev and test environments.
So, I updated endpoint code to be more resilient on json serialization and other exceptions. Also added more logging to 2sxc insights for this webapi endpoint. Primary intention is to handle exception on server instead of bubble it to client UI.
Lets wait for next 2sxc release so you can see if this is enough.
I've made a pre-release of 14.07.05 https://github.com/2sic/2sxc/releases/tag/v14.07.05-pre1
Could you test it here to see if the issue persists? my guess is it's gone, but as we were not able to reproduce it, we cannot verify it ourselves.
@iJungleboy I just upgraded to 14.07.05 and it seems to be resolved.
Awesome. In this case it was related to some context info regarding language/portal which caused some trouble in 14.7.04 like #2829
Tested v14.07.05 on an en-ca and a bilingual en-ca/fr-ca website. Works perfectly. @iJungleboy thanks for resolving this issue (especially since you weren't able to replicate it yourself - those errors are the worst).
Had this issue occur on 2 sites today, one was in version 11.x when i started but DNN 9.10.1 and the other was in DNN 9.3 - I am unsure if it was exact same problem but seemed to occur when apps were installed for a version of 2sxc, then upgraded 2sxc to a newer version where the apps were not utilizing the new features in 2sxc v.13 plus.
We will test this pre-release version tomorrow after restoring the site back to version 11 and trying again with upgrading to this pre-release.
For what it's worth. Don't know that this was particularly tied to a 2sxc version mentioned 14.07.04, as it was occurring in 3 versions moving up from 11.x to that version. Seems more tied to DNN 9.10.x then a 2sxc version in my testing.