Error "When RenderChoiceAs is set to SingleCheckBox, th

Posted by Community Admin on 04-Aug-2018 13:55

Error "When RenderChoiceAs is set to SingleCheckBox, there should be only one ChoiceItem in the collection" when add/edit news in default news module

All Replies

Posted by Community Admin on 25-Feb-2017 00:00

I am using
-          Sitefinity v9.2.6220.0 Standard Edition
-          SQL server 2008 R2
-          IIS 7.5

I encountered an issue with the default News module when I added a custom classification field to the module.
After adding a “subcategory” classification, when I proceed to add news item or edit existing item, I got the error “When RenderChoiceAs is set to SingleCheckBox, there should be only one ChoiceItem in the collection” on screen.
After some troubleshooting and googling (knowledgebase.progress.com/.../Exception-is-thrown-when-editing-or-creating-a-new-user), I went to Administration > Settings > Advanced > News > Controls > NewsBackend > Views > NewsBackendEdit > Sections > MoreOptionsSection > Fields > AllowComments, IncludeInSitemap, AllowMultipleUrls, AllAditionalUrlsRedirectoToTheDefaultOne > choicesConfig > Item 0, Item 1,Item 2,Item 3,Item 4,Item 5… Item 120…
I think there should only be Item 0 under these 4 choicesConfig and not sure what triggered the extras to be added. So I had to manually delete them like what was mentioned in the url mentioned above, after which I was able to add/edit the news items again.
However, I think somehow the system became “corrupted”. When I go “Custom Fields for news” and try to (1) add another custom field (2) edit the default fields (e.g. hide IncludeInSitemap), the same issue repeated and I am no longer able to delete the extra nodes. It seems like there is some infinite looping bug and everytime I tried to click delete node item (under choicesConfig), the number of items just seem to multiply instead (can refer to my attached screenshot).   
Does anyone know why or experience that before? Thank you.

Posted by Community Admin on 03-Mar-2017 00:00

After testing in another instance of Sitefinity, seems like it is a combo of editing the News Settings and  editing custom fields for News that trigger this issue. For my case, I added a custom classification to News and under Settings, edit NewsFrontendList's sort expression, compile my project, return to made some changes to custom fields for News, go back to Add/Edit news.

Can someone shed light on this?

This thread is closed