MBouwman
MBouwman

Reputation: 59

Contenttype in 2sxc gives: The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'

So someone added a dropdownfield to a content type in 2sxc and it seems to work. However in the admin, when we click on the content type on the data screen it will give a 500 error. And also when we click on the Fields for this content item.

When I do an export, or call the content type through the api list function, it still gives valid xml and json. So my guess it is an error in the definition of the data type. So I exported the content type and tried to import it again on another installation. I did this under Export or Import parts of this app, and when I tried to upload, it also gave me a 500 error. So can anyone (from 2sxc?) check what might be the issue?

The code is:

{"_":{"V":1},"ContentType":{"Id":"5d76c94c-2832-46eb-8ebd-b0def57dbc3f","Name":"PresSetText","Scope":"Default","Description":null,"Attributes":[{"Name":"HeadingType","Type":"String","InputType":"string-dropdown","IsTitle":true,"Metadata":[{"Id":148,"Version":2,"Guid":"5ef9fa64-cf55-49a3-9f3d-cc97d3a3d995","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"CustomJavaScript":{"nl-nl":""},"DefaultValue":{"nl-nl":""},"Information":{"nl-nl":""},"InputType":{"nl-nl":"string-dropdown"},"Name":{"nl-nl":"Heading type"},"Notes":{"nl-nl":"<p>Select which heading layer you want to use or whether it should be hidden.</p>"},"Placeholder":{"nl-nl":""},"Tooltip":{"nl-nl":""},"ValidationRegExJavaScript":{"nl-nl":""}},"Hyperlink":{"HelpLink":{"nl-nl":""}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"Disabled":{"nl-nl":false},"DisableTranslation":{"nl-nl":false},"Required":{"nl-nl":false},"VisibleInEditUI":{"nl-nl":true}}},"Owner":"dnn:userid=1"},{"Id":149,"Version":2,"Guid":"2551429a-a927-4c6c-90af-b004a1e95b25","Type":{"Name":"@String","Id":"@String"},"Attributes":{"String":{"DropdownValues":{"nl-nl":"Heading 1:h1\nHeading 2:h2\nHeading 3:h3\nHide title:hide"},"InputType":{"nl-nl":"dropdown"}},"Number":{"RowCount":{"nl-nl":1}}},"Owner":"dnn:userid=1"},{"Id":150,"Version":2,"Guid":"c72a4e84-e2af-44e6-b8b1-cb41ad358ed1","Type":{"Name":"@string-dropdown","Id":"@string-dropdown"},"Attributes":{"String":{"DropdownValues":{"nl-nl":"Heading 1:h1\nHeading 2:h2\nHeading 3:h3\nHeading 4:h4\nHide:hide"},"DropdownValuesFormat":{"nl-nl":""},"Separator":{"nl-nl":","}},"Boolean":{"AllowMultiValue":{"nl-nl":false},"EnableTextEntry":{"nl-nl":false}}},"Owner":"dnn:userid=1"},{"Id":151,"Version":1,"Guid":"54189f81-06ab-4593-accd-92aacb6e66c6","Type":{"Name":"@string-default","Id":"@string-default"},"Attributes":{},"Owner":"dnn:userid=1"}]},{"Name":"ImageLightbox","Type":"Boolean","InputType":"boolean-tristate","IsTitle":false,"Metadata":[{"Id":152,"Version":1,"Guid":"205a9903-4022-4be7-be36-9318fde9bff0","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"CustomJavaScript":{"*":""},"DefaultValue":{"*":""},"InputType":{"*":"boolean-tristate"},"Name":{"*":"image zoom mogelijk maken"},"Notes":{"*":"<p>Allows a large image view by clicking on the image.</p>"},"Placeholder":{"*":""},"ValidationRegExJavaScript":{"*":""}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"Disabled":{"*":false},"DisableTranslation":{"*":false},"Required":{"*":false},"VisibleInEditUI":{"*":true}}},"Owner":"dnn:userid=1"},{"Id":153,"Version":1,"Guid":"3d73ac4f-94e1-45f4-bd42-e0a999917f80","Type":{"Name":"@Boolean","Id":"@Boolean"},"Attributes":{"String":{"TitleFalse":{"*":"Click has no action"},"TitleIndeterminate":{"*":"Default - Opens the image in a lightbox"},"TitleTrue":{"*":"Opens the image in a lightbox"}}},"Owner":"dnn:userid=1"}]},{"Name":"TitleLightbox","Type":"Boolean","InputType":"boolean-tristate","IsTitle":false,"Metadata":[{"Id":154,"Version":1,"Guid":"8fb2ef48-e037-4e21-a0ca-cf3907b6dff5","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"CustomJavaScript":{"*":""},"DefaultValue":{"*":""},"InputType":{"*":"boolean-tristate"},"Name":{"*":"Toon titel in lightbox"},"Notes":{"*":""},"Placeholder":{"*":""},"ValidationRegExJavaScript":{"*":""}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"Disabled":{"*":false},"DisableTranslation":{"*":false},"Required":{"*":false},"VisibleInEditUI":{"*":true}}},"Owner":"dnn:userid=1"},{"Id":155,"Version":1,"Guid":"dfd69402-5405-460e-8113-3ee84eb9f617","Type":{"Name":"@Boolean","Id":"@Boolean"},"Attributes":{"String":{"TitleFalse":{"*":"Does not show the title in the lightbox"},"TitleIndeterminate":{"*":"Default - Shows the title in the lightbox"},"TitleTrue":{"*":"Shows the title in the lightbox"}}},"Owner":"dnn:userid=1"}]},{"Name":"Uitgelicht","Type":"String","InputType":"string-dropdown","IsTitle":false,"Metadata":[{"Id":6234,"Version":2,"Guid":"7b247c35-02b6-4168-8fa0-89f1ad48bfb1","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"CustomJavaScript":{"*":""},"DefaultValue":{"*":"niet"},"InputType":{"*":"string-dropdown"},"Name":{"*":"Uitgelicht"},"Notes":{"*":""},"Placeholder":{"*":""},"ValidationRegExJavaScript":{"*":""}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"Disabled":{"*":false},"DisableTranslation":{"*":false},"Required":{"*":false},"VisibleInEditUI":{"*":true}}},"Owner":"dnn:userid=1"},{"Id":6235,"Version":1,"Guid":"a401111d-5b91-458a-9c3a-72accac9a169","Type":{"Name":"@String","Id":"@String"},"Attributes":{"String":{"DropdownValues":{"*":""},"InputType":{"*":""}}},"Owner":"dnn:userid=1"},{"Id":6236,"Version":1,"Guid":"15f04302-b699-44c5-a2c2-a8dfad5845a1","Type":{"Name":"@string-dropdown","Id":"@string-dropdown"},"Attributes":{"String":{"DropdownValues":{"*":"uitgelicht px-4 py-4 my-4:Ja\nniet:Nee"},"DropdownValuesFormat":{"*":"value-label"}},"Boolean":{"EnableTextEntry":{"*":false}}},"Owner":"dnn:userid=1"}]},{"Name":"Kleur","Type":"Boolean","InputType":"boolean-default","IsTitle":false,"Metadata":[{"Id":10556,"Version":1,"Guid":"c66163bd-983a-4434-bcbb-5332633814c7","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"InputType":{"*":"boolean-default"},"Name":{"*":"Kleur"}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"VisibleInEditUI":{"*":true}}},"Owner":"dnn:userid=1"}]},{"Name":"Kleur2","Type":"String","InputType":"string-dropdown","IsTitle":false,"Metadata":[{"Id":10686,"Version":1,"Guid":"44909ed8-fb3c-4feb-b6c5-1017cf18ff03","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"InputType":{"*":"string-dropdown"},"Name":{"*":"Kleur2"}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"VisibleInEditUI":{"*":true}}},"Owner":"dnn:userid=1"},{"Id":10687,"Version":4,"Guid":"b2168873-b0d9-4593-99df-73b633a4ff5c","Type":{"Name":"@All","Id":"@All"},"Attributes":{"String":{"CustomJavaScript":{"nl-nl":""},"DefaultValue":{"nl-nl":""},"Information":{"nl-nl":""},"InputType":{"nl-nl":"string-dropdown"},"Name":{"nl-nl":"Kleur2"},"Notes":{"nl-nl":""},"Placeholder":{"nl-nl":""},"Tooltip":{"nl-nl":""},"ValidationRegExJavaScript":{"nl-nl":""}},"Hyperlink":{"HelpLink":{"nl-nl":""}},"Entity":{"Errors":{"*":[]},"Formulas":{"*":[]},"Warnings":{"*":[]}},"Boolean":{"Disabled":{"nl-nl":false},"DisableTranslation":{"nl-nl":false},"Required":{"nl-nl":false},"VisibleInEditUI":{"nl-nl":true}}},"Owner":"dnn:userid=1"},{"Id":10688,"Version":3,"Guid":"97186a3b-fc9e-44de-a74a-f75845cc642d","Type":{"Name":"@String","Id":"@String"},"Attributes":{"String":{"DropdownValues":{"nl-nl":""},"InputType":{"nl-nl":""}}},"Owner":"dnn:userid=1"},{"Id":10689,"Version":3,"Guid":"1c62365c-1d5a-4cd9-a5f4-9f9736268500","Type":{"Name":"@string-dropdown","Id":"@string-dropdown"},"Attributes":{"String":{"DropdownValues":{"nl-nl":"#1:turquoise\n#2:aarde"},"DropdownValuesFormat":{"nl-nl":"value-label"},"Separator":{"nl-nl":","}},"Boolean":{"AllowMultiValue":{"nl-nl":false},"EnableTextEntry":{"nl-nl":false}}},"Owner":"dnn:userid=1"}]}],"Metadata":[{"Id":215,"Version":1,"Guid":"2f15f5fb-ed51-467e-90ca-51461c8239c4","Type":{"Name":"ContentType","Id":"ContentType"},"Attributes":{"String":{"Description":{"*":"Instellingen voor alle templates met tekst (Tekst, tekst met plaatje rechts & links)"},"EditInstructions":{"*":""},"Label":{"*":"Presentatieinstellingen voor templates met tekst en plaatjes"},"ListInstructions":{"*":""},"Notes":{"*":""}},"Hyperlink":{"Icon":{"*":""},"Link":{"*":"https://github.com/2sic/2sxc-content-bootstrap3/wiki/Help"}}},"Owner":"dnn:userid=1","For":{"Target":"ContentType","TargetType":5,"String":"5d76c94c-2832-46eb-8ebd-b0def57dbc3f"}}]},"Entities":[]}

Upvotes: 0

Views: 34

Answers (1)

Jeremy Farrance
Jeremy Farrance

Reputation: 1108

Have you restarted the application? In the DNN PersonaBar, Settings/Server, click the Restart Application button in the upper right. Then make sure to wait until its done; 5 to 20 seconds, maybe 2 or 3 page refreshes. Then try again. If you are still getting an error, for better context, please include a screen shot and detail the exact steps that made the error appear.

Its also rare, but possible (and sounds like), that some data has gotten corrupted in 2sxc. If this is the case, I recommend opening a proper support ticket with 2sic/2sxc. Be aware that this type of thing will probably need to be paid support.

If you work with DNN regularly and are familiar with nvQuickSITE, you could also spin up another local DNN instance, install 2sxc, and carefully reconstruct things to see if it happens. This is a great way to find the right details that lead to the issue.

Upvotes: 0

Related Questions